return aop;
}
-/* #define LAZY_DPS_OPT */ /* turn this on after some more testing. */
+/* #define LAZY_DPS_OPT */ /* turn this on after some more testing. */
static int _currentDPS; /* Current processor DPS. */
static int _desiredDPS; /* DPS value compiler thinks we should be using. */
}
-#if 0
-/*-----------------------------------------------------------------*/
-/* pointToEnd :- points to the last byte of the operand */
-/*-----------------------------------------------------------------*/
-static void pointToEnd (asmop *aop)
-{
- int count ;
- if (!aop)
- return ;
-
- aop->coff = count = (aop->size - 1);
- switch (aop->type) {
- case AOP_R0 :
- case AOP_R1 :
- while (count--)
- emitcode("inc","%s",aop->aopu.aop_ptr->name);
- break;
- case AOP_DPTR :
- while (count--)
- emitcode("inc","dptr");
- break;
- }
-
-}
-#endif
-
/*-----------------------------------------------------------------*/
/* reAdjustPreg - points a register back to where it should */
/*-----------------------------------------------------------------*/
}
}
+ _startLazyDPSEvaluation();
while(size--)
{
emitcode("pop", "acc");
aopPut(AOP(IC_RESULT(ic)), "a", --offset);
}
+ _endLazyDPSEvaluation();
}
adjustArithmeticResult(ic);
size = AOP_SIZE(result);
offset = 0 ;
+ _startLazyDPSEvaluation();
while (size--) {
+
+ genSetDPTR(0);
+ _flushLazyDPS();
+
emitcode("movx","a,@dptr");
aopPut(AOP(result),"a",offset++);
if (size)
emitcode("inc","dptr");
}
+ _endLazyDPSEvaluation();
}
freeAsmop(result,NULL,ic,TRUE);
while (size--) {
char *l = aopGet(AOP(right),offset++,FALSE,FALSE,TRUE);
MOVA(l);
+
+ genSetDPTR(0);
+ _flushLazyDPS();
+
emitcode("movx","@dptr,a");
if (size)
emitcode("inc","dptr");
size = AOP_SIZE(right);
offset = 0 ;
+ _startLazyDPSEvaluation();
while (size--) {
char *l = aopGet(AOP(right),offset++,FALSE,FALSE,TRUE);
MOVA(l);
+
+ genSetDPTR(0);
+ _flushLazyDPS();
+
emitcode("lcall","__gptrput");
if (size)
emitcode("inc","dptr");
}
+ _endLazyDPSEvaluation();
}
freeAsmop(right,NULL,ic,TRUE);
(AOP_TYPE(result) != AOP_REG) &&
(AOP_TYPE(right) == AOP_LIT) &&
!IS_FLOAT(operandType(right))
-#ifndef LAZY_DPS_OPT
+#ifndef LAZY_DPS_OPT
&& (lit < 256L)
#endif
)
{
-#ifdef LAZY_DPS_OPT
+#ifdef LAZY_DPS_OPT
D(emitcode(";", "Kevin's better literal load code"););
_startLazyDPSEvaluation();
while (size && ((unsigned int)((lit >> (offset*8)) & 0xff) != 0))