1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@1367 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-07-20 08:20:59 +00:00
parent c1c24d6df5
commit d1d104d7ff

View File

@ -6,7 +6,7 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* (C) 1998-2001 Ullrich von Bassewitz */ /* (C) 1998-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */ /* Wacholderweg 14 */
/* D-70597 Stuttgart */ /* D-70597 Stuttgart */
/* EMail: uz@cc65.org */ /* EMail: uz@cc65.org */
@ -3493,7 +3493,7 @@ void g_le (unsigned flags, unsigned long val)
} }
} else { } else {
/* Signed compare */ /* Signed compare */
if (val < 0x7F) { if ((long) val < 0x7F) {
/* Use < instead of <= because the former gives /* Use < instead of <= because the former gives
* better code on the 6502 than the latter. * better code on the 6502 than the latter.
*/ */
@ -3523,7 +3523,7 @@ void g_le (unsigned flags, unsigned long val)
} }
} else { } else {
/* Signed compare */ /* Signed compare */
if (val < 0x7FFF) { if ((long) val < 0x7FFF) {
g_lt (flags, val+1); g_lt (flags, val+1);
} else { } else {
/* Always true */ /* Always true */
@ -3548,7 +3548,7 @@ void g_le (unsigned flags, unsigned long val)
} }
} else { } else {
/* Signed compare */ /* Signed compare */
if (val < 0x7FFFFFFF) { if ((long) val < 0x7FFFFFFF) {
g_lt (flags, val+1); g_lt (flags, val+1);
} else { } else {
/* Always true */ /* Always true */
@ -3579,7 +3579,7 @@ void g_gt (unsigned flags, unsigned long val)
/* Test for greater than */ /* Test for greater than */
{ {
static char* ops [12] = { static char* ops [12] = {
"tosgt00", "tosgta0", "tosgtax", "tosgt00", "tosgta0", "tosgtax",
"tosugt00", "tosugta0", "tosugtax", "tosugt00", "tosugta0", "tosugtax",
0, 0, "tosgteax", 0, 0, "tosgteax",
0, 0, "tosugteax", 0, 0, "tosugteax",
@ -3614,7 +3614,7 @@ void g_gt (unsigned flags, unsigned long val)
AddCodeLine ("jsr return0"); AddCodeLine ("jsr return0");
} }
} else { } else {
if (val < 0x7F) { if ((long) val < 0x7F) {
/* Use >= instead of > because the former gives /* Use >= instead of > because the former gives
* better code on the 6502 than the latter. * better code on the 6502 than the latter.
*/ */
@ -3650,7 +3650,7 @@ void g_gt (unsigned flags, unsigned long val)
} }
} else { } else {
/* Signed compare */ /* Signed compare */
if (val < 0x7FFF) { if ((long) val < 0x7FFF) {
g_ge (flags, val+1); g_ge (flags, val+1);
} else { } else {
/* Never true */ /* Never true */
@ -3681,7 +3681,7 @@ void g_gt (unsigned flags, unsigned long val)
} }
} else { } else {
/* Signed compare */ /* Signed compare */
if (val < 0x7FFFFFFF) { if ((long) val < 0x7FFFFFFF) {
g_ge (flags, val+1); g_ge (flags, val+1);
} else { } else {
/* Never true */ /* Never true */