* src/SDCCpeeph.c (labelInRange): fixed bug #814558
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 1 Oct 2003 07:45:52 +0000 (07:45 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 1 Oct 2003 07:45:52 +0000 (07:45 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2916 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCpeeph.c

index b9f92fe7a217ff04179e22d17177cb4d5dfc74be..ee273b00489fc7cbea68a59d5ec867b952612dd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
        the other part of bug #814548
+       * src/SDCCpeeph.c (labelInRange): fixed bug #814558
 
 2003-09-30  Bernhard Held <bernhard@bernhardheld.de>
 
index a470b6d9bfdc61007902188f21225be5bb2e9a18..79cbd12fb94b1b46dee541f88d7482a33b5c7e23 100644 (file)
@@ -279,6 +279,10 @@ FBYNAME (labelInRange)
   if (!lbl)
     return FALSE;
 
+  /* Don't optimize jumps in a jump table; a more generic test */
+  if (currPl->ic && currPl->ic->op == JUMPTABLE)
+    return FALSE;
+    
   /* if the previous two instructions are "ljmp"s then don't
      do it since it can be part of a jump table */
   if (currPl->prev && currPl->prev->prev &&