From c5cf4b954a8baabf735a672dde4d47a9a9d461f3 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 17 Mar 2001 15:17:56 +0000 Subject: [PATCH] Fixed a volatile optimalisation and some other small things git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@689 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/gen.c | 11 +---------- src/mcs51/gen.c | 10 ++++------ src/mcs51/ralloc.c | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 50c1819e..95361f0f 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------- - gen.c - source file for code generation for 8051 + gen.c - source file for code generation for DS80C390 Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998) and - Jean-Louis VERN.jlvern@writeme.com (1999) @@ -22,10 +22,6 @@ In other words, you are welcome to use, share and improve this program. You are forbidden to forbid anyone else to use, share and improve what you give them. Help stamp out software-hoarding! - - Notes: - 000123 mlh Moved aopLiteral to SDCCglue.c to help the split - Made everything static -------------------------------------------------------------------------*/ #include @@ -53,10 +49,6 @@ #endif char *aopLiteral (value * val, int offset); -#if 0 -//REMOVE ME!!! -extern int allocInfo; -#endif /* this is the down and dirty file with all kinds of kludgy & hacky stuff. This is what it is all about @@ -1274,7 +1266,6 @@ aopPut (asmop * aop, char *s, int offset) static void reAdjustPreg (asmop * aop) { - emitcode (";jwk","reAdjustPreg: %d", aop->coff); if ((aop->coff==0) || (aop->size <= 1)) { return; } diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index fe0fd2b0..dfdca6f5 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -1112,17 +1112,15 @@ pointToEnd (asmop * aop) static void reAdjustPreg (asmop * aop) { - int size; - aop->coff = 0; - if ((size = aop->size) <= 1) + if ((aop->coff==0) || aop->size <= 1) return; - size--; + switch (aop->type) { case AOP_R0: case AOP_R1: - while (size--) + while (aop->coff--) emitcode ("dec", "%s", aop->aopu.aop_ptr->name); break; case AOP_DPTR: @@ -1131,7 +1129,7 @@ reAdjustPreg (asmop * aop) { genSetDPTR (1); } - while (size--) + while (aop->coff--) { emitcode ("lcall", "__decdptr"); } diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 7c0c82b3..30309b8b 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -2508,7 +2508,7 @@ mcs51_assignRegisters (eBBlock ** ebbs, int count) if (options.dump_rassgn) { dumpEbbsToFileExt (".dumprassgn", ebbs, count); - dumpLiveRanges (".lrange", liveRanges); + dumpLiveRanges (".dumplrange", liveRanges); } /* do the overlaysegment stuff SDCCmem.c */ -- 2.47.2