if (size > 1)
{
emitcode ("mov", "b,%s", fReturn[1]);
+ _G.bInUse++;
}
+ _G.accInUse++;
aopOp (IC_RESULT (ic), ic, FALSE, FALSE);
+ _G.accInUse--;
+
+ if (size > 1)
+ _G.bInUse--;
+
aopPut (AOP (IC_RESULT (ic)), "a", 0);
if (size > 1)
{
bool dp1InUse, dp2InUse;
bool useDp2;
-
+
// First, generate the right opcode. DPTR may be used if neither left nor result are
// of type AOP_STR.
// We've op'd the left & right. So, if left or right are the same operand as result,
// we know aopOp will succeed, and we can just do it & bail.
- if (isOperandEqual(IC_LEFT(ic),IC_RESULT(ic)) ||
- isOperandEqual(IC_RIGHT(ic),IC_RESULT(ic)))
- {
+ if (isOperandEqual(IC_LEFT(ic),IC_RESULT(ic)))
+ {
+ aopOp (IC_RESULT (ic), ic, TRUE, AOP_USESDPTR2 (IC_LEFT (ic)));
+ return TRUE;
+ }
+ if (isOperandEqual(IC_RIGHT(ic),IC_RESULT(ic)))
+ {
// D(emitcode(";", "aopOp3: (left | right) & result equal"););
- aopOp(IC_RESULT(ic),ic,TRUE, FALSE);
+ aopOp(IC_RESULT(ic),ic,TRUE, AOP_USESDPTR2 (IC_RIGHT (ic)));
return TRUE;
- }
+ }
// Operands may be equivalent (but not equal) if they share a spill location. If
// so, use the same DPTR or DPTR2.