+2001-11-04 Michael Hope <michaelh@juju.net.nz>
+
+ * support/regression/tests/bug-478094.c: Added.
+
+ * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
+
2001-11-04 Bernhard Held <bernhard@bernhardheld.de>
* sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
static void
commitPair (asmop * aop, PAIR_ID id)
{
- if (id == PAIR_HL && requiresHL (aop))
+ /* PENDING: Verify this. */
+ if (id == PAIR_HL && requiresHL (aop) && IS_GB)
{
emit2 ("ld a,l");
emit2 ("ld d,h");
}
else
{
- aopPut (aop, _pairs[id].l, 0);
- aopPut (aop, _pairs[id].h, 1);
+ /* Special cases */
+ if (id == PAIR_HL && aop->type == AOP_IY && aop->size == 2)
+ {
+ char *l = aopGetLitWordLong (aop, 0, FALSE);
+ wassert (l);
+
+ emit2 ("ld (%s),%s", l, _pairs[id].name);
+ }
+ else
+ {
+ aopPut (aop, _pairs[id].l, 0);
+ aopPut (aop, _pairs[id].h, 1);
+ }
}
}