From e22f6d1857f1ddb6db1bd6c8c54806a984e852f5 Mon Sep 17 00:00:00 2001 From: johanknol Date: Tue, 10 Apr 2001 09:05:01 +0000 Subject: [PATCH] fixed the gencmp setting of supportRtn cleaned up some things git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@734 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/avr/gen.c | 3 -- src/ds390/gen.c | 3 -- src/mcs51/gen.c | 96 ---------------------------------------------- src/mcs51/ralloc.c | 2 - src/pic/gen.c | 3 -- 5 files changed, 107 deletions(-) diff --git a/src/avr/gen.c b/src/avr/gen.c index a388da89..5496080c 100644 --- a/src/avr/gen.c +++ b/src/avr/gen.c @@ -258,7 +258,6 @@ getFreePtr (iCode * ic, asmop ** aopp, bool result, bool zonly) return NULL; } - piCode (ic, stdout); /* other wise this is true end of the world */ werror (E_INTERNAL_ERROR, __FILE__, __LINE__, "getFreePtr should never reach here"); @@ -5256,8 +5255,6 @@ genAVRCode (iCode * lic) default: ic = ic; - /* piCode(ic,stdout); */ - } } diff --git a/src/ds390/gen.c b/src/ds390/gen.c index f85207e3..cf3786f7 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -233,7 +233,6 @@ endOfWorld: return NULL; } - piCode (ic, stdout); /* other wise this is true end of the world */ werror (E_INTERNAL_ERROR, __FILE__, __LINE__, "getFreePtr should never reach here"); @@ -9476,8 +9475,6 @@ gen390Code (iCode * lic) default: ic = ic; - /* piCode(ic,stdout); */ - } } diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index b239ecc4..048b2148 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -233,7 +233,6 @@ endOfWorld: return NULL; } - piCode (ic, stdout); /* other wise this is true end of the world */ werror (E_INTERNAL_ERROR, __FILE__, __LINE__, "getFreePtr should never reach here"); @@ -3151,98 +3150,6 @@ genMultbits (operand * left, /*-----------------------------------------------------------------*/ /* genMultOneByte : 8*8=8/16 bit multiplication */ /*-----------------------------------------------------------------*/ -#if 0 // REMOVE ME -static void -genMultOneByte (operand * left, - operand * right, - operand * result) -{ - sym_link *opetype = operandType (result); - char *l; - symbol *lbl; - int size, offset; - - /* (if two literals, the value is computed before) */ - /* if one literal, literal on the right */ - if (AOP_TYPE (left) == AOP_LIT) - { - operand *t = right; - right = left; - left = t; - } - - size = AOP_SIZE (result); - /* signed or unsigned */ - emitcode ("mov", "b,%s", aopGet (AOP (right), 0, FALSE, FALSE)); - l = aopGet (AOP (left), 0, FALSE, FALSE); - MOVA (l); - emitcode ("mul", "ab"); - /* if result size = 1, mul signed = mul unsigned */ - aopPut (AOP (result), "a", 0); - if (size > 1) - { - if (SPEC_USIGN (opetype)) - { - aopPut (AOP (result), "b", 1); - if (size > 2) - /* for filling the MSBs */ - emitcode ("clr", "a"); - } - else - { - emitcode ("mov", "a,b"); - - /* adjust the MSB if left or right neg */ - - /* if one literal */ - if (AOP_TYPE (right) == AOP_LIT) - { - /* AND literal negative */ - if ((int) floatFromVal (AOP (right)->aopu.aop_lit) < 0) - { - /* adjust MSB (c==0 after mul) */ - emitcode ("subb", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE)); - } - } - else - { - lbl = newiTempLabel (NULL); - emitcode ("xch", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE)); - emitcode ("cjne", "a,#0x80,%05d$", (lbl->key + 100)); - emitcode ("", "%05d$:", (lbl->key + 100)); - emitcode ("xch", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE)); - lbl = newiTempLabel (NULL); - emitcode ("jc", "%05d$", (lbl->key + 100)); - emitcode ("subb", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE)); - emitcode ("", "%05d$:", (lbl->key + 100)); - } - - lbl = newiTempLabel (NULL); - emitcode ("xch", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE)); - emitcode ("cjne", "a,#0x80,%05d$", (lbl->key + 100)); - emitcode ("", "%05d$:", (lbl->key + 100)); - emitcode ("xch", "a,%s", aopGet (AOP (left), 0, FALSE, FALSE)); - lbl = newiTempLabel (NULL); - emitcode ("jc", "%05d$", (lbl->key + 100)); - emitcode ("subb", "a,%s", aopGet (AOP (right), 0, FALSE, FALSE)); - emitcode ("", "%05d$:", (lbl->key + 100)); - - aopPut (AOP (result), "a", 1); - if (size > 2) - { - /* get the sign */ - emitcode ("rlc", "a"); - emitcode ("subb", "a,acc"); - } - } - size -= 2; - offset = 2; - if (size > 0) - while (size--) - aopPut (AOP (result), "a", offset++); - } -} -#else static void genMultOneByte (operand * left, operand * right, @@ -3343,7 +3250,6 @@ genMultOneByte (operand * left, aopPut (AOP (result), "b", 1); } } -#endif /*-----------------------------------------------------------------*/ /* genMult - generates code for multiplication */ @@ -8577,8 +8483,6 @@ gen51Code (iCode * lic) default: ic = ic; - /* piCode(ic,stdout); */ - } } diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index a41a4bf6..3eeeac06 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -2337,10 +2337,8 @@ packRegisters (eBBlock * ebp) } /* reduce for support function calls */ -#if geniCodeLogicHasBeenFixed if (ic->supportRtn || ic->op == '+' || ic->op == '-') packRegsForSupport (ic, ebp); -#endif /* some cases the redundant moves can can be eliminated for return statements */ diff --git a/src/pic/gen.c b/src/pic/gen.c index d4342427..0c8d2825 100644 --- a/src/pic/gen.c +++ b/src/pic/gen.c @@ -292,7 +292,6 @@ endOfWorld : return NULL; } - piCode(ic,stdout); /* other wise this is true end of the world */ werror(E_INTERNAL_ERROR,__FILE__,__LINE__, "getFreePtr should never reach here"); @@ -8450,8 +8449,6 @@ void genpic14Code (iCode *lic) default : ic = ic; - /* piCode(ic,stdout); */ - } } -- 2.30.2