From: epetrich Date: Wed, 1 Oct 2003 07:45:52 +0000 (+0000) Subject: * src/SDCCpeeph.c (labelInRange): fixed bug #814558 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6ebbb4e9ebe9f0b972ee15373e8c1512b4df4026;p=fw%2Fsdcc * src/SDCCpeeph.c (labelInRange): fixed bug #814558 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2916 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index b9f92fe7..ee273b00 100644 --- 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 diff --git a/src/SDCCpeeph.c b/src/SDCCpeeph.c index a470b6d9..79cbd12f 100644 --- a/src/SDCCpeeph.c +++ b/src/SDCCpeeph.c @@ -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 &&