* src/mcs51/main.c (instructionSize): fixed ACALL size
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 1 Mar 2004 06:00:16 +0000 (06:00 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 1 Mar 2004 06:00:16 +0000 (06:00 +0000)
* 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
src/mcs51/main.c

index cd8d86a97a395fb34fa65c4341b71e9970cc5bff..57a230d57f853c18071ff5b989bd128978c753d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * 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 <vrokas AT otenet.gr>
 
        * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
index ee97d6883d355b38039c01f9bd71cd2c1c8ec01e..55aa324054943c83e9e1d6362e0edb99bc9ecd59 100644 (file)
@@ -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);
     }
 }