static void
toBoolean (operand * oper)
{
- int size = AOP_SIZE (oper) - 1;
- int offset = 1;
+ int size = AOP_SIZE (oper) - 1;
+ int offset = 1;
+ bool usedB = FALSE;
/* The generic part of a generic pointer should
* not participate in it's truth value.
}
_startLazyDPSEvaluation ();
- if (AOP_NEEDSACC (oper))
+ if (AOP_NEEDSACC (oper) && size)
{
+ usedB = TRUE;
emitcode ("push", "b");
emitcode ("mov", "b, %s", aopGet (AOP (oper), 0, FALSE, FALSE, FALSE));
}
}
while (size--)
{
- if (AOP_NEEDSACC (oper))
+ if (usedB)
{
emitcode ("orl", "b,%s", aopGet (AOP (oper), offset++, FALSE, FALSE, FALSE));
}
}
_endLazyDPSEvaluation ();
- if (AOP_NEEDSACC (oper))
+ if (usedB)
{
emitcode ("mov", "a,b");
emitcode ("pop", "b");
operand *cond = IC_COND (ic);
int isbit = 0;
- D (emitcode (";", "genIfx ");
- );
+ D (emitcode (";", "genIfx "););
aopOp (cond, ic, FALSE, FALSE);