* as/z80/asexpr.c, as/z80/z80mch.c: re-fixed bugs
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 27 Feb 2009 06:40:06 +0000 (06:40 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 27 Feb 2009 06:40:06 +0000 (06:40 +0000)
  #1829678 and #1704376 in the way proposed by Alan Baldwin

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5390 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/z80/asexpr.c
as/z80/z80mch.c

index 553e0cc00a54705c794630f1ffec7c32193d176b..6bd22b126df7e10caf5b755d0f16d798e5ee7b93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-27 Borut Razem <borut.razem AT siol.net>
+
+       * as/z80/asexpr.c, as/z80/z80mch.c: re-fixed bugs
+         #1829678 and #1704376 in the way proposed by Alan Baldwin
+
 2009-02-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
 
        * device/include/mcs51/at89c51ed2.h: Fixed address of SFR P5. Thanks
index f9bda739d79d6c9c3b0b41c1235225cbd78db8ae..6d9211c3163817a03d7cd5055df30f0ece1486f8 100644 (file)
@@ -461,7 +461,6 @@ register struct expr *esp;
                 getid(id, c);
                 sp = lookup(id);
                 if (sp->s_type == S_NEW) {
-                        esp->e_addr = 0;
                         if (sp->s_flag&S_GBL) {
                                 esp->e_flag = 1;
                                 esp->e_base.e_sp = sp;
index d9609938b46d64a929deef2f4677a141dc7a661d..fe999011244ac4ac99d4a8f3dc0b74b030095297 100644 (file)
@@ -133,6 +133,7 @@ struct mne *mp;
                        if ((t2 != S_R8) || (e2.e_addr != A))
                                ++t1;
                        comma();
+                       clrexpr(&e2);
                        t2 = addr(&e2);
                }
                if (genop(0xCB, op, &e2, 0) || t1)
@@ -147,6 +148,7 @@ struct mne *mp;
                        if ((t2 != S_R8) || (e2.e_addr != A))
                                ++t1;
                        comma();
+                       clrexpr(&e2);
                        t2 = addr(&e2);
                }
                if (genop(0, op, &e2, 1) || t1)
@@ -549,7 +551,7 @@ struct mne *mp;
        case S_DJNZ:
        case S_JR:
                if ((v1 = admode(CND)) != 0 && rf != S_DJNZ) {
-                       if ((v1 &= 0xFF) <= 0x18 && v1 != PO && v1 != PE && v1 != P && v1 != M) {
+                       if ((v1 &= 0xFF) <= 0x03) {
                                op += (v1+1)<<3;
                        } else {
                                aerr();