From a0f797e8661f5728627e2c497b39290fe7ebb5a4 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 4 Feb 2001 12:48:38 +0000 Subject: [PATCH] temporary hack for the inline Y bug git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@574 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/ds390/gen.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 85cb88d0..f202e191 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -129,7 +129,25 @@ static void emitcode (char *inst,char *fmt, ...) if (fmt && *fmt) sprintf(lb,"%s\t",inst); else +#if 1 + { + /* for some reason the parser throws in a mysterious "Y" at + the end of inline assembly code. + Do a make in device/lib and you know all about it. + */ + int i=0; + while(inst[i]==' ') + i++; + if (strcmp(&inst[i],"Y")==0) { + fprintf (stderr, "===> BEWARE of the inline Y bug hack <===\n"); + return; + } else { + sprintf(lb,"%s",inst); + } + } +#else sprintf(lb,"%s",inst); +#endif vsprintf(lb+(strlen(lb)),fmt,ap); } else vsprintf(lb,fmt,ap); -- 2.47.2