From 75fae6940d43c09b4355aba8ccc1093acc88d85d Mon Sep 17 00:00:00 2001 From: frief Date: Sun, 28 Nov 2004 14:17:41 +0000 Subject: [PATCH] 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 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 89268a60..af926fde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,18 @@ -2004-11-18 Maarten Brock +2004-11-29 Frieder Ferlemann + + 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 + +2004-11-26 Maarten Brock * device/lib/printf_large.c (_print_format): fixed bug 1073386 * support/regression/tests/bug1057979.c: added test for bug 1073386 @@ -89,7 +103,7 @@ * device/lib/_gptrput.c (_gptrput): _naked allows to use ret instead of sjmp to ret * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided - by anonymous in RFE #1067986, thanks + by Hubert Sack in RFE #1067986, thanks 2004-11-18 Maarten Brock -- 2.39.2