From: sandeep Date: Thu, 23 Mar 2000 17:48:14 +0000 (+0000) Subject: Fixed remat bug X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=59e9343dd641af79696dfb6142facc7421c1f117;p=fw%2Fsdcc Fixed remat bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@197 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 5e30e412..fc09590c 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -383,8 +383,10 @@ static asmop *aopForRemat (symbol *sym) /* if plus or minus print the right hand side */ if (ic->op == '+' || ic->op == '-') { - sprintf(s,"0x%04x %c ",(int) operandLitValue(IC_RIGHT(ic)), - ic->op ); + if (ic->op == '-') + sprintf(s,"-0x%04x + ",(int) operandLitValue(IC_RIGHT(ic))) ; + else + sprintf(s,"0x%04x + ",(int) operandLitValue(IC_RIGHT(ic))); s += strlen(s); ic = OP_SYMBOL(IC_LEFT(ic))->rematiCode; continue ;