From: johanknol Date: Sun, 2 Feb 2003 12:39:12 +0000 (+0000) Subject: Now the regression tests could go online again X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1a3b9eb37b3b587b3e794cd84521155fd68860c5;p=fw%2Fsdcc Now the regression tests could go online again git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2200 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 132a8990..32313a47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-02-02 + + * src/mcs51/ralloc.c (packForPush): fixed bug #631653, maybe other ports need this too? At least now some new alerts in SDCCBBlock.c and SDCCicode.c gives an early warning + * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore + * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests + * src/z80/gen.c (genZ80Code): added c-lines in asm comments + * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests + * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think) + 2003-02-01 Jesus Calvino-Fraga * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps diff --git a/as/z80/asm.h b/as/z80/asm.h index 520f52c4..57e68e78 100644 --- a/as/z80/asm.h +++ b/as/z80/asm.h @@ -72,7 +72,7 @@ /* #define NCPS 32 */ /* Chars. per symbol */ #define HUGE 1000 /* A huge number */ #define NERR 3 /* Errors per line */ -#define NINPUT 128 /* Input buffer size */ +#define NINPUT 1024 /* Input buffer size */ #define NCODE 128 /* Listing code buffer size */ #define NTITL 64 /* Title buffer size */ #define NSBTL 64 /* SubTitle buffer size */ diff --git a/src/z80/gen.c b/src/z80/gen.c index 09e50849..60e46b11 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -5890,9 +5890,19 @@ genRightShiftLiteral (operand * left, wassert (0); } - else if (shCount >= (size * 8)) + else if (shCount >= (size * 8)) { + const char *s; + if (!SPEC_USIGN(getSpec(operandType(left)))) { + _moveA(aopGet (AOP (left), 0, FALSE)); + emit2 ("rlc a"); + emit2 ("sbc a,a"); + s=ACC_NAME; + } else { + s="!zero"; + } while (size--) - aopPut (AOP (result), "!zero", size); + aopPut (AOP (result), s, size); + } else { switch (size) @@ -7238,7 +7248,8 @@ genZ80Code (iCode * lic) if (cln != ic->lineno) { - emit2 ("; %s %d", ic->filename, ic->lineno); + emit2 ("; %s:%d: %s", ic->filename, ic->lineno, + printCLine(ic->filename, ic->lineno)); cln = ic->lineno; } /* if the result is marked as diff --git a/support/regression/fwk/lib/testfwk.c b/support/regression/fwk/lib/testfwk.c index 5d393386..766954a6 100644 --- a/support/regression/fwk/lib/testfwk.c +++ b/support/regression/fwk/lib/testfwk.c @@ -10,7 +10,7 @@ /** Define this if the port's div or mod functions are broken. A slow loop based method will be substituded. */ -#define BROKEN_DIV_MOD 1 +//#define BROKEN_DIV_MOD 1 void _putchar(char c); void _exitEmu(void); diff --git a/support/regression/ports/ds390/spec.mk b/support/regression/ports/ds390/spec.mk index 9f1d6f56..8b2368a3 100644 --- a/support/regression/ports/ds390/spec.mk +++ b/support/regression/ports/ds390/spec.mk @@ -26,7 +26,7 @@ $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c # run simulator with 10 seconds timeout %.out: %$(EXEEXT) fwk/lib/timeout mkdir -p `dirname $@` - -fwk/lib/timeout 10 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \ + -fwk/lib/timeout 20 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \ echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@ -grep -n FAIL $@ /dev/null || true diff --git a/support/regression/ports/mcs51/spec.mk b/support/regression/ports/mcs51/spec.mk index eb84828e..48a03216 100644 --- a/support/regression/ports/mcs51/spec.mk +++ b/support/regression/ports/mcs51/spec.mk @@ -28,7 +28,7 @@ $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c # run simulator with 10 seconds timeout %.out: %$(EXEEXT) fwk/lib/timeout mkdir -p `dirname $@` - -fwk/lib/timeout 10 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \ + -fwk/lib/timeout 20 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \ || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@ -grep -n FAIL $@ /dev/null || true