From 3f7769378f8111a61b9186739ba6e04f45a8fc4d Mon Sep 17 00:00:00 2001 From: borutr Date: Fri, 27 Feb 2009 06:40:06 +0000 Subject: [PATCH] * as/z80/asexpr.c, as/z80/z80mch.c: re-fixed bugs #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 | 5 +++++ as/z80/asexpr.c | 1 - as/z80/z80mch.c | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 553e0cc0..6bd22b12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-27 Borut Razem + + * 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 * device/include/mcs51/at89c51ed2.h: Fixed address of SFR P5. Thanks diff --git a/as/z80/asexpr.c b/as/z80/asexpr.c index f9bda739..6d9211c3 100644 --- a/as/z80/asexpr.c +++ b/as/z80/asexpr.c @@ -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; diff --git a/as/z80/z80mch.c b/as/z80/z80mch.c index d9609938..fe999011 100644 --- a/as/z80/z80mch.c +++ b/as/z80/z80mch.c @@ -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(); -- 2.30.2