From: johanknol Date: Tue, 6 Nov 2001 16:28:52 +0000 (+0000) Subject: fixed bug #478698 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=73fcbfcdcaac59b0321b04989b368d884e0f43ff;p=fw%2Fsdcc fixed bug #478698 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1515 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 1bb15f68..109abe0a 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -1244,7 +1244,12 @@ aopPut (asmop * aop, char *s, int offset) if (strcmp (s, "a") == 0) emitcode ("push", "acc"); else - emitcode ("push", "%s", s); + if (*s=='@') { + MOVA(s); + emitcode ("push", "acc"); + } else { + emitcode ("push", s); + } break; diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 9178c6aa..a7779cb5 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -1003,7 +1003,12 @@ aopPut (asmop * aop, char *s, int offset) if (strcmp (s, "a") == 0) emitcode ("push", "acc"); else - emitcode ("push", "%s", s); + if (*s=='@') { + MOVA(s); + emitcode ("push", "acc"); + } else { + emitcode ("push", s); + } break;