summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
00bd933)
* link/z80/aslink.h: made CASE_SENSITIVE 1
* src/z80/gen.c (throughout): made all conditionals upper case
* support/regression/tests/bug1503067.c: new
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4324
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * as/z80/asm.h: made CASE_SENSITIVE 1
+ * link/z80/aslink.h: made CASE_SENSITIVE 1
+ * src/z80/gen.c (throughout): made all conditionals upper case
+ * support/regression/tests/bug1503067.c: new
+
2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
* src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
2006-08-07 Maarten Brock <sourceforge.brock AT dse.nl>
* src/z80/gen.c (aopPut): fixed bug !*ixy should be !*iyx,
/*
* Case Sensitivity Flag
*/
/*
* Case Sensitivity Flag
*/
-#define CASE_SENSITIVE 0
+#define CASE_SENSITIVE 1
/*
* Extensions: P. Felber
*/
/*
* Extensions: P. Felber
*/
-#include <limits.h>
-
-#ifndef PATH_MAX
- #if defined(__BORLANDC__) || defined(_MSC_VER)
- #include <stdlib.h>
- #define PATH_MAX _MAX_PATH
- #else
- #define PATH_MAX 255 /* define a reasonable value */
- #endif
-#endif
-
#define VERSION "V01.75"
/*
* Case Sensitivity Flag
*/
#define VERSION "V01.75"
/*
* Case Sensitivity Flag
*/
-#define CASE_SENSITIVE 0
+#define CASE_SENSITIVE 1
#define OTHERSYSTEM
#endif
#define OTHERSYSTEM
#endif
+/*
+ * PATH_MAX
+ */
+#include <limits.h>
+#ifndef PATH_MAX /* POSIX, but not required */
+ #if defined(__BORLANDC__) || defined(_MSC_VER)
+ #include <stdlib.h>
+ #define PATH_MAX _MAX_PATH
+ #else
+ #define PATH_MAX 255 /* define a reasonable value */
+ #endif
+#endif
+
/*
* This file defines the format of the
* relocatable binary file.
/*
* This file defines the format of the
* relocatable binary file.
-#define A_CON 000 /* concatenate */
-#define A_OVR 004 /* overlay */
-#define A_REL 000 /* relocatable */
-#define A_ABS 010 /* absolute */
-#define A_NOPAG 000 /* non-paged */
-#define A_PAG 020 /* paged */
+#define A_CON 0000 /* concatenate */
+#define A_OVR 0004 /* overlay */
+#define A_REL 0000 /* relocatable */
+#define A_ABS 0010 /* absolute */
+#define A_NOPAG 0000 /* non-paged */
+#define A_PAG 0020 /* paged */
emit2 ("pop af");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2 was 0 <==>
//don't enable interrupts as they were off before
emit2 ("pop af");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2 was 0 <==>
//don't enable interrupts as they were off before
- emit2 ("jp po,!tlabel", tlbl->key + 100);
+ emit2 ("jp PO,!tlabel", tlbl->key + 100);
emit2 ("!ei");
emit2 ("!tlabeldef", (tlbl->key + 100));
}
emit2 ("!ei");
emit2 ("!tlabeldef", (tlbl->key + 100));
}
emit2 ("inc %s", aopGet (AOP (IC_RESULT (ic)), offset++, FALSE));
if (size)
{
emit2 ("inc %s", aopGet (AOP (IC_RESULT (ic)), offset++, FALSE));
if (size)
{
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
}
}
emitLabel (tlbl->key + 100);
}
}
emitLabel (tlbl->key + 100);
- emit2 ("!shortjp z,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp Z,!tlabel", tlbl->key + 100);
emit2 ("ld a,!one");
emitLabel (tlbl->key + 100);
outAcc (result);
emit2 ("ld a,!one");
emitLabel (tlbl->key + 100);
outAcc (result);
jlbl = IC_TRUE (ic);
if (!strcmp (jval, "a"))
{
jlbl = IC_TRUE (ic);
if (!strcmp (jval, "a"))
{
}
else if (!strcmp (jval, "c"))
{
}
else if (!strcmp (jval, "c"))
{
}
else if (!strcmp (jval, "nc"))
{
}
else if (!strcmp (jval, "nc"))
{
}
else if (!strcmp (jval, "m"))
{
}
else if (!strcmp (jval, "m"))
{
}
else if (!strcmp (jval, "p"))
{
}
else if (!strcmp (jval, "p"))
{
}
else
{
/* The buffer contains the bit on A that we should test */
}
else
{
/* The buffer contains the bit on A that we should test */
jlbl = IC_FALSE (ic);
if (!strcmp (jval, "a"))
{
jlbl = IC_FALSE (ic);
if (!strcmp (jval, "a"))
{
}
else if (!strcmp (jval, "c"))
{
}
else if (!strcmp (jval, "c"))
{
}
else if (!strcmp (jval, "nc"))
{
}
else if (!strcmp (jval, "nc"))
{
}
else if (!strcmp (jval, "m"))
{
}
else if (!strcmp (jval, "m"))
{
}
else if (!strcmp (jval, "p"))
{
}
else if (!strcmp (jval, "p"))
{
}
else
{
/* The buffer contains the bit on A that we should test */
}
else
{
/* The buffer contains the bit on A that we should test */
}
}
/* Z80 can do a conditional long jump */
}
}
/* Z80 can do a conditional long jump */
- emit2 ("jp nz,!tlabel", lbl->key + 100);
+ emit2 ("jp NZ,!tlabel", lbl->key + 100);
emit2 ("or a,a");
else
emit2 ("cp a,%s", aopGet (AOP (right), offset, FALSE));
emit2 ("or a,a");
else
emit2 ("cp a,%s", aopGet (AOP (right), offset, FALSE));
- emit2 ("jp nz,!tlabel", lbl->key + 100);
+ emit2 ("jp NZ,!tlabel", lbl->key + 100);
if ((AOP_TYPE (left) == AOP_DIR && AOP_TYPE (right) == AOP_LIT) &&
((unsigned int) ((lit >> (offset * 8)) & 0x0FFL) == 0))
/* PENDING */
if ((AOP_TYPE (left) == AOP_DIR && AOP_TYPE (right) == AOP_LIT) &&
((unsigned int) ((lit >> (offset * 8)) & 0x0FFL) == 0))
/* PENDING */
- emit2 ("jp nz,!tlabel", lbl->key + 100);
+ emit2 ("jp NZ,!tlabel", lbl->key + 100);
else
{
emit2 ("cp %s", aopGet (AOP (right), offset, FALSE));
else
{
emit2 ("cp %s", aopGet (AOP (right), offset, FALSE));
- emit2 ("jp nz,!tlabel", lbl->key + 100);
+ emit2 ("jp NZ,!tlabel", lbl->key + 100);
{
_moveA (aopGet (AOP (right), offset, FALSE));
emit2 ("cp %s", aopGet (AOP (left), offset, FALSE));
{
_moveA (aopGet (AOP (right), offset, FALSE));
emit2 ("cp %s", aopGet (AOP (left), offset, FALSE));
- emit2 ("!shortjp nz,!tlabel", lbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", lbl->key + 100);
{
tlbl = newiTempLabel (NULL);
_toBoolean (left);
{
tlbl = newiTempLabel (NULL);
_toBoolean (left);
- emit2 ("!shortjp z,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp Z,!tlabel", tlbl->key + 100);
_toBoolean (right);
emitLabel (tlbl->key + 100);
outBitAcc (result);
_toBoolean (right);
emitLabel (tlbl->key + 100);
outBitAcc (result);
{
tlbl = newiTempLabel (NULL);
_toBoolean (left);
{
tlbl = newiTempLabel (NULL);
_toBoolean (left);
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
_toBoolean (right);
emitLabel (tlbl->key + 100);
outBitAcc (result);
_toBoolean (right);
emitLabel (tlbl->key + 100);
outBitAcc (result);
/* For the flags */
emit2 ("or a,a");
}
/* For the flags */
emit2 ("or a,a");
}
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
_moveA (aopGet (AOP (left), offset, FALSE));
/* OR with any literal is the same as OR with itself. */
emit2 ("or a,a");
_moveA (aopGet (AOP (left), offset, FALSE));
/* OR with any literal is the same as OR with itself. */
emit2 ("or a,a");
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
{
_moveA (aopGet (AOP (left), offset, FALSE));
emit2 ("xor a,%s", aopGet (AOP (right), offset, FALSE));
{
_moveA (aopGet (AOP (left), offset, FALSE));
emit2 ("xor a,%s", aopGet (AOP (right), offset, FALSE));
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
{
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
{
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
}
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
}
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
freeAsmop (left, NULL, ic);
freeAsmop (result, NULL, ic);
freeAsmop (left, NULL, ic);
freeAsmop (result, NULL, ic);
}
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
}
emitLabel (tlbl1->key + 100);
emit2 ("dec a");
- emit2 ("!shortjp nz,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp NZ,!tlabel", tlbl->key + 100);
freeAsmop (left, NULL, ic);
freeAsmop (result, NULL, ic);
freeAsmop (left, NULL, ic);
freeAsmop (result, NULL, ic);
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", blen - 1);
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", blen - 1);
- emit2 ("jp z,!tlabel", tlbl->key + 100);
+ emit2 ("jp Z,!tlabel", tlbl->key + 100);
emit2 ("or a,!immedbyte", (unsigned char) (0xff << blen));
emitLabel (tlbl->key + 100);
}
emit2 ("or a,!immedbyte", (unsigned char) (0xff << blen));
emitLabel (tlbl->key + 100);
}
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", blen - 1);
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", blen - 1);
- emit2 ("jp z,!tlabel", tlbl->key + 100);
+ emit2 ("jp Z,!tlabel", tlbl->key + 100);
emit2 ("or a,!immedbyte", (unsigned char) (0xff << blen));
emitLabel (tlbl->key + 100);
}
emit2 ("or a,!immedbyte", (unsigned char) (0xff << blen));
emitLabel (tlbl->key + 100);
}
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", rlen - 1);
symbol *tlbl = newiTempLabel (NULL);
emit2 ("bit %d,a", rlen - 1);
- emit2 ("jp z,!tlabel", tlbl->key + 100);
+ emit2 ("jp Z,!tlabel", tlbl->key + 100);
emit2 ("or a,!immedbyte", (unsigned char) (0xff << rlen));
emitLabel (tlbl->key + 100);
}
emit2 ("or a,!immedbyte", (unsigned char) (0xff << rlen));
emitLabel (tlbl->key + 100);
}
//disable interrupt
emit2 ("!di");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2=0
//disable interrupt
emit2 ("!di");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2=0
- emit2 ("jp po,!tlabel", tlbl->key + 100);
+ emit2 ("jp PO,!tlabel", tlbl->key + 100);
aopPut (AOP (IC_RESULT (ic)), "!one", 0);
emit2 ("!tlabeldef", (tlbl->key + 100));
freeAsmop (IC_RESULT (ic), NULL, ic);
aopPut (AOP (IC_RESULT (ic)), "!one", 0);
emit2 ("!tlabeldef", (tlbl->key + 100));
freeAsmop (IC_RESULT (ic), NULL, ic);
aopOp (IC_RIGHT (ic), ic, FALSE, TRUE);
_toBoolean (IC_RIGHT (ic));
//don't enable interrupts if they were off before
aopOp (IC_RIGHT (ic), ic, FALSE, TRUE);
_toBoolean (IC_RIGHT (ic));
//don't enable interrupts if they were off before
- emit2 ("!shortjp z,!tlabel", tlbl->key + 100);
+ emit2 ("!shortjp Z,!tlabel", tlbl->key + 100);
emit2 ("!ei");
emitLabel (tlbl->key + 100);
freeAsmop (IC_RIGHT (ic), NULL, ic);
emit2 ("!ei");
emitLabel (tlbl->key + 100);
freeAsmop (IC_RIGHT (ic), NULL, ic);
emit2 ("pop af");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2 was 0 <==>
//don't enable interrupts as they were off before
emit2 ("pop af");
//parity odd <==> P/O=0 <==> interrupt enable flag IFF2 was 0 <==>
//don't enable interrupts as they were off before
- emit2 ("jp po,!tlabel", tlbl->key + 100);
+ emit2 ("jp PO,!tlabel", tlbl->key + 100);
emit2 ("!ei");
emit2 ("!tlabeldef", (tlbl->key + 100));
}
emit2 ("!ei");
emit2 ("!tlabeldef", (tlbl->key + 100));
}
emit2 ("ld a,(hl)");
emit2 ("ldi");
emit2 ("or a");
emit2 ("ld a,(hl)");
emit2 ("ldi");
emit2 ("or a");
- emit2 ("!shortjp nz,!tlabel ; 1", label->key);
+ emit2 ("!shortjp NZ,!tlabel ; 1", label->key);
freeAsmop (from, NULL, ic->next);
freeAsmop (to, NULL, ic);
freeAsmop (from, NULL, ic->next);
freeAsmop (to, NULL, ic);
--- /dev/null
+/* bug1503067.c\r
+ */\r
+#include <testfwk.h>\r
+\r
+const int SPRITE = 0;\r
+int sprite = 1;\r