From 77a9409289469ac3c0c08af4ef2b184aa68d543d Mon Sep 17 00:00:00 2001 From: epetrich Date: Mon, 1 Mar 2004 06:00:16 +0000 Subject: [PATCH] * src/mcs51/main.c (instructionSize): fixed ACALL size * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3239 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ src/mcs51/main.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd8d86a9..57a230d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-01 Erik Petrich + + * src/mcs51/main.c (instructionSize): fixed ACALL size + * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands + 2004-03-01 Vangelis Rokas * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed diff --git a/src/mcs51/main.c b/src/mcs51/main.c index ee97d688..55aa3240 100644 --- a/src/mcs51/main.c +++ b/src/mcs51/main.c @@ -320,7 +320,7 @@ instructionSize(char *inst, char *op1, char *op2) if (ISINST ("xchd")) return 1; if (ISINST ("reti")) return 1; if (ISINST ("nop")) return 1; - if (ISINST ("acall")) return 1; + if (ISINST ("acall")) return 2; if (ISINST ("ajmp")) return 2; @@ -462,12 +462,12 @@ updateOpRW (asmLineNode *aln, char *op, char *optype) aln->regsRead = bitVectSetBit (aln->regsRead, R0_IDX); if (!strcmp(op, "@r1")) aln->regsRead = bitVectSetBit (aln->regsRead, R1_IDX); - if (!strstr(op, "dptr")) + if (strstr(op, "dptr")) { aln->regsRead = bitVectSetBit (aln->regsRead, DPL_IDX); aln->regsRead = bitVectSetBit (aln->regsRead, DPH_IDX); } - if (!strstr(op, "a+")) + if (strstr(op, "a+")) aln->regsRead = bitVectSetBit (aln->regsRead, A_IDX); } } -- 2.47.2