* src/SDCCast.c: reverted back to 1.156
* src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2178
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-01-26 <johan@balder>
+
+ * src/SDCCglue.c: reverted back to 1.124
+ * src/SDCCast.c: reverted back to 1.156
+ * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
+
2003-01-25 <johan@balder>
* src/SDCCglue.c: A better fix for bug #661910
2003-01-25 <johan@balder>
* src/SDCCglue.c: A better fix for bug #661910
memmap *segment=SPEC_OCLS(sym->etype);
deleteSetItem(&segment->syms, sym);
}
memmap *segment=SPEC_OCLS(sym->etype);
deleteSetItem(&segment->syms, sym);
}
-
- return decorateType(resolveSymbols (rast));
+ return decorateType (resolveSymbols (rast));
{
/* resolve the symbols in the ival */
{
/* resolve the symbols in the ival */
resolveIvalSym (sym->ival);
resolveIvalSym (sym->ival);
/* if this is a static variable & has an */
/* initial value the code needs to be lifted */
/* if this is a static variable & has an */
/* initial value the code needs to be lifted */
// a function's address will never change
return TRUE;
}
// a function's address will never change
return TRUE;
}
- if (IS_AST_SYM_VALUE(cexpr) && IS_ARRAY(AST_SYMBOL(cexpr)->type)) {
- // an array's address will never change
- return TRUE;
- }
if (IS_AST_SYM_VALUE(cexpr) &&
IN_CODESPACE(SPEC_OCLS(AST_SYMBOL(cexpr)->etype))) {
// a symbol in code space will never change
if (IS_AST_SYM_VALUE(cexpr) &&
IN_CODESPACE(SPEC_OCLS(AST_SYMBOL(cexpr)->etype))) {
// a symbol in code space will never change
resolveIvalSym (sym->ival);
printIval (sym, sym->type, sym->ival, out);
noAlloc--;
resolveIvalSym (sym->ival);
printIval (sym, sym->type, sym->ival, out);
noAlloc--;
- // now we don't need sym->ival anymore
- deleteSetItem(&map->syms, list2val(sym->ival)->sym);
}
else {
/* allocate space */
}
else {
/* allocate space */
return rs;
case AOP_DPTR:
return rs;
case AOP_DPTR:
+ if (aop->code && aop->coff==0 && offset>=1) {
+ emitcode ("mov", "a,#0x%02x", offset);
+ emitcode ("movc", "a,@a+dptr");
+ return (dname ? "acc" : "a");
+ }
+
while (offset > aop->coff)
{
emitcode ("inc", "dptr");
while (offset > aop->coff)
{
emitcode ("inc", "dptr");