"AOP_HLREG",
"AOP_SIMPLELIT",
"AOP_EXSTK",
- "AOP_PAIRPT"
+ "AOP_PAIRPT",
+ "AOP_DUMMY"
};
static bool
return;
}
- /* else spill location */
- if (sym->usl.spillLoc && getSize(sym->type) != getSize(sym->usl.spillLoc->type)) {
- /* force a new aop if sizes differ */
- sym->usl.spillLoc->aop = NULL;
- }
- sym->aop = op->aop = aop =
- aopForSym (ic, sym->usl.spillLoc, result, requires_a);
+ if (sym->usl.spillLoc)
+ {
+ if (getSize(sym->type) != getSize(sym->usl.spillLoc->type))
+ {
+ /* force a new aop if sizes differ */
+ sym->usl.spillLoc->aop = NULL;
+ }
+ sym->aop = op->aop = aop =
+ aopForSym (ic, sym->usl.spillLoc, result, requires_a);
+ aop->size = getSize (sym->type);
+ return;
+ }
+
+ /* else must be a dummy iTemp */
+ sym->aop = op->aop = aop = newAsmop (AOP_DUMMY);
aop->size = getSize (sym->type);
return;
}
/* depending on type */
switch (aop->type)
{
+ case AOP_DUMMY:
+ tsprintf (buffer, sizeof(buffer), "!zero");
+ return traceAlloc(&_G.trace.aops, Safe_strdup(buffer));
+
case AOP_IMMD:
/* PENDING: re-target */
if (bit16)
/* depending on where it is ofcourse */
switch (aop->type)
{
+ case AOP_DUMMY:
+ _moveA (s); /* in case s is volatile */
+ break;
+
case AOP_DIR:
/* Direct. Hmmm. */
wassert (IS_GB);
static void
genDummyRead (iCode * ic)
{
- emit2 ("; genDummyRead not implemented");
+ operand *right;
+ int size, offset;
- ic = ic;
+ right = IC_RIGHT (ic);
+ aopOp (right, ic, FALSE, FALSE);
+
+ /* general case */
+ size = AOP_SIZE (right);
+ offset = 0;
+
+ while (size--)
+ {
+ _moveA (aopGet (AOP (right), offset, FALSE));
+ offset++;
+ }
+
+release:
+ freeAsmop (right, NULL, ic);
}
enum
break;
case DUMMY_READ_VOLATILE:
+ emitDebug ("; genDummyRead");
genDummyRead (ic);
break;