+2001-11-03 Michael Hope <michaelh@juju.net.nz>
+
+ * support/regression/tests/bug-477927.c: Added.
+
+ * src/z80/peeph.def: Added minor rules.
+
+ * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
+
+ * src/z80/peeph.def: Added jump optimisation modification.
+
+2001-11-01 Michael Hope <michaelh@juju.net.nz>
+
+ * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
+
+2001-10-30 Michael Hope <michaelh@juju.net.nz>
+
+ * support/regression/tests/funptrs.c: Added.
+
+2001-10-29 Michael Hope <michaelh@juju.net.nz>
+
+ * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
+
2001-10-28 Michael Hope <michaelh@juju.net.nz>
* src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
AOP_SIZE (IC_LEFT (ic)) > 1)
return FALSE;
+ /* If the result is in a register then we can load then increment.
+ */
+ if (AOP_TYPE (IC_RESULT (ic)) == AOP_REG)
+ {
+ aopPut (AOP (IC_RESULT (ic)), aopGet (AOP (IC_LEFT (ic)), LSB, FALSE), LSB);
+ while (icount--)
+ {
+ emit2 ("inc %s", aopGet (AOP (IC_RESULT (ic)), LSB, FALSE));
+ }
+ return TRUE;
+ }
+
/* we can if the aops of the left & result match or
if they are in registers and the registers are the
same */
aopOp ((right = IC_RIGHT (ic)), ic, FALSE, FALSE);
aopOp ((result = IC_RESULT (ic)), ic, TRUE, FALSE);
- emitDebug ("; genCmpEq: left %u, right %u, result %u\n", AOP_SIZE(IC_LEFT(ic)), AOP_SIZE(IC_RIGHT(ic)), AOP_SIZE(IC_RESULT(ic)));
+ emitDebug ("; genCmpEq: left %u, right %u, result %u", AOP_SIZE(IC_LEFT(ic)), AOP_SIZE(IC_RIGHT(ic)), AOP_SIZE(IC_RESULT(ic)));
/* Swap operands if it makes the operation easier. ie if:
1. Left is a literal.
--- /dev/null
+/* Tests an uninitalised variable bug.
+ t is not initalised in all paths in the do loop, causing the while
+ conditional to fail unpredictably.
+
+ Doesn't actually test, is really an example.
+ */
+#include <testfwk.h>
+
+typedef unsigned char UBYTE;
+
+UBYTE
+randish(void)
+{
+ static int count;
+
+ if ((++count)&3) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+void
+spoil(UBYTE ignored)
+{
+ UNUSED(ignored);
+}
+
+UBYTE accu[2];
+
+void
+testLoopInit(void)
+{
+ UBYTE t, r;
+
+ do {
+ r = randish();
+
+ if(r != 1) {
+ t = ++accu[r];
+ spoil(t);
+ }
+ }
+ while(t != 3);
+}
+
+