* link/z80/aslink.h: Fixed long file name support. Is now based off PATH_MAX instea...
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 30 Aug 2001 02:39:25 +0000 (02:39 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 30 Aug 2001 02:39:25 +0000 (02:39 +0000)
* 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

ChangeLog [new file with mode: 0644]
link/z80/aslink.h
src/z80/gen.c

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..4764796
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,7 @@
+2001-08-29  Michael Hope  <michaelh@juju.net.nz>
+
+       * 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.
+       
+
index 9ef08c54ea233d437aadf8567f6c0a101109b9f3..c9b629c2f5db1511297244c87f7d27ce226d152b 100644 (file)
@@ -12,6 +12,7 @@
 /*
  * Extensions: P. Felber
  */
+#include <linux/limits.h>
 
 #define        VERSION "V01.75"
 
 #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
index 3ed83308e307128d9d3b0679ef09146ea2c773f2..6f033efe1c4b090a37c011b3f64911f5eec8f23e 100644 (file)
 */
 
 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");
            }
        }
     }