Adding support for replacing ljmps with sjmps in jumptables
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Nov 2004 14:17:41 +0000 (14:17 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Nov 2004 14:17:41 +0000 (14:17 +0000)
commit75fae6940d43c09b4355aba8ccc1093acc88d85d
tree8157be6704d531b41a43170cafd9bfe2d9f2aab5
parent718b60e3887d0e69341bd1e9d335ce9d09441e5f
Adding support for replacing ljmps with sjmps in jumptables
generated for switch statements. For now you need to set the
environment variable SDCC_SJMP_JUMPTABLE to enable this.
Now 4 algorithms for mcs51 jumptable generation are used:
ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
addresses loaded pc-relative for up to 112 cases and stack-pushing
target addresses loaded with offset from dptr for up to 256 cases.

* src/SDCCpeeph.c: added peephole conditional labelJTInRange
* src/mcs51/main.c: adapted constants for switch table generation
* src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3590 4a8a32a2-be11-0410-ad9d-d568d2c75423
ChangeLog