From 73fcbfcdcaac59b0321b04989b368d884e0f43ff Mon Sep 17 00:00:00 2001 From: johanknol Date: Tue, 6 Nov 2001 16:28:52 +0000 Subject: [PATCH] fixed bug #478698 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1515 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/gen.c | 7 ++++++- src/mcs51/gen.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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; -- 2.30.2