From: michaelh Date: Thu, 30 Aug 2001 02:39:25 +0000 (+0000) Subject: * link/z80/aslink.h: Fixed long file name support. Is now based off PATH_MAX instea... X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=00f3243b4043482746e524b2527f6dcd1a202b9e;p=fw%2Fsdcc * link/z80/aslink.h: Fixed long file name support. Is now based off PATH_MAX instead of a constant. * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1186 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..47647966 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,7 @@ +2001-08-29 Michael Hope + + * link/z80/aslink.h: Fixed long file name support. Is now based off PATH_MAX instead of a constant. + + * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space. + + diff --git a/link/z80/aslink.h b/link/z80/aslink.h index 9ef08c54..c9b629c2 100644 --- a/link/z80/aslink.h +++ b/link/z80/aslink.h @@ -12,6 +12,7 @@ /* * Extensions: P. Felber */ +#include #define VERSION "V01.75" @@ -84,13 +85,12 @@ #endif /* SDK */ /* #define NCPS 32 */ /* characters per symbol */ #define NDATA 16 /* actual data */ -#define NINPUT 128 /* Input buffer size */ +#define NINPUT PATH_MAX /* Input buffer size */ #define NHASH 64 /* Buckets in hash table */ #define HMASK 077 /* Hash mask */ #define NLPP 60 /* Lines per page */ #define NTXT 16 /* T values */ -/** PENDING: Taking this to 256 causes a segfault. */ -#define FILSPC 100 /* File spec length */ +#define FILSPC PATH_MAX /* File spec length */ /* * The "R_" relocation constants define values used in diff --git a/src/z80/gen.c b/src/z80/gen.c index 3ed83308..6f033efe 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -118,7 +118,7 @@ */ enum { - DISABLE_DEBUG = 1 + DISABLE_DEBUG = 0 }; static char *_z80_return[] = @@ -2748,7 +2748,7 @@ genPlus (iCode * ic) if (genPlusIncr (ic) == TRUE) goto release; - emitDebug ("; genPlusIncr failed"); + emitDebug ("; Can't optimise plus by inc, falling back to the normal way"); size = getDataSize (IC_RESULT (ic)); @@ -2756,10 +2756,11 @@ genPlus (iCode * ic) if (isPair (AOP (IC_RESULT (ic)))) { char *left, *right; - left = aopGetLitWordLong (AOP (IC_LEFT (ic)), 0, FALSE); right = aopGetLitWordLong (AOP (IC_RIGHT (ic)), 0, FALSE); - if (left && right) + + if (AOP_TYPE(IC_LEFT(ic)) == AOP_LIT && AOP_TYPE(IC_RIGHT(ic)) == AOP_LIT && + left && right) { /* It's a pair */ /* PENDING: fix */ @@ -2841,7 +2842,7 @@ genPlus (iCode * ic) } else if (size == 4) { - emitDebug ("; WARNING: This add is probably broken.\n"); + wassertl (0, "Hit bad case for add"); } } }