* src/mcs51/gen.c (genCmp): fixed bug #975903
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 Jun 2004 23:02:43 +0000 (23:02 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 Jun 2004 23:02:43 +0000 (23:02 +0000)
* src/hc08/gen.c (operandsEqu),
* src/ds390/gen.c (operandsEqu),
* src/z80/gen.c (operandsEqu),
* src/pic/gen.c (operandsEqu),
* src/pic16/gen.c (operandsEqu),
* src/mcs51/gen.c (operandsEqu): fixed bug #976283
* src/SDCCmain.c (parseCmdLine): report --unknown-option only once

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

ChangeLog
src/SDCCmain.c
src/ds390/gen.c
src/hc08/gen.c
src/mcs51/gen.c
src/pic/gen.c
src/pic16/gen.c
src/z80/gen.c

index b47e2f97ca1ecbc49c5ec37804e2dda4ebc66647..d544d7256caea29722a797ba0e8f42357de83650 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/mcs51/gen.c (genCmp): fixed bug #975903
+       * src/hc08/gen.c (operandsEqu),
+       * src/ds390/gen.c (operandsEqu),
+       * src/z80/gen.c (operandsEqu),
+       * src/pic/gen.c (operandsEqu),
+       * src/pic16/gen.c (operandsEqu),
+       * src/mcs51/gen.c (operandsEqu): fixed bug #976283
+       * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
+
 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
 
        * src/SDCCcse.c (cseBBlock): fixed bug #966963
index 999bf9ca98e57492ef398d2c4682b7d178783d6d..b37a9bf08403fabe6275e1a261f70abb7d05af9e 100644 (file)
@@ -1017,6 +1017,7 @@ parseCmdLine (int argc, char **argv)
          if (!port->parseOption (&argc, argv, &i))
            {
              werror (W_UNKNOWN_OPTION, argv[i]);
+             continue;
            }
          else
            {
index 1f67805c700d0c8aea2909d7e5afb7b482a7ea69..82e05af23d6621e492a7a1716bb082e6ae2b1488 100644 (file)
@@ -866,7 +866,8 @@ operandsEqu (operand * op1, operand * op2)
   if (sym1 == sym2)
     return TRUE;
 
-  if (strcmp (sym1->rname, sym2->rname) == 0)
+  if (sym1->rname[0] && sym2->rname[0]
+      && strcmp (sym1->rname, sym2->rname) == 0)
     return TRUE;
 
 
index 2e2744a0d792dae3683d70dc96e870828cf7d893..2eab32178ffbb3628b75e58f20c5667f2554c3c7 100644 (file)
@@ -1542,10 +1542,10 @@ operandsEqu (operand * op1, operand * op2)
   if (sym1 == sym2)
     return TRUE;
 
-  if (strcmp (sym1->rname, sym2->rname) == 0)
+  if (sym1->rname[0] && sym2->rname[0]
+      && strcmp (sym1->rname, sym2->rname) == 0)
     return TRUE;
 
-
   /* if left is a tmp & right is not */
   if (IS_ITEMP (op1) &&
       !IS_ITEMP (op2) &&
index 3e9b341c535a354251af99b23c18895bb6842681..8e5f49cff20d9039d2c5830a34d92d8630473ea7 100644 (file)
@@ -650,10 +650,10 @@ operandsEqu (operand * op1, operand * op2)
   if (sym1 == sym2)
     return TRUE;
 
-  if (strcmp (sym1->rname, sym2->rname) == 0)
+  if (sym1->rname[0] && sym2->rname[0]
+      && strcmp (sym1->rname, sym2->rname) == 0)
     return TRUE;
 
-
   /* if left is a tmp & right is not */
   if (IS_ITEMP (op1) &&
       !IS_ITEMP (op2) &&
@@ -4777,6 +4777,9 @@ genCmp (operand * left, operand * right,
                      if (!(AOP_TYPE (result) == AOP_CRY && AOP_SIZE (result)) && ifx)
                        {
                          genIfxJump (ifx, "acc.7", left, right, result);
+                         freeAsmop (right, NULL, ic, TRUE);
+                         freeAsmop (left, NULL, ic, TRUE);
+
                          return;
                        }
                      else
index fb1868b1000048f0a40a558c5c0162e1fd1a7082..c7964832ef4cd4ba617ecdda7fe6cf25f7e6e6ae 100644 (file)
@@ -697,9 +697,10 @@ static bool operandsEqu ( operand *op1, operand *op2)
   if (sym1 == sym2)
     return TRUE ;
   
-  if (strcmp(sym1->rname,sym2->rname) == 0)
+  if (sym1->rname[0] && sym2->rname[0]
+      && strcmp (sym1->rname, sym2->rname) == 0)
     return TRUE;
-  
+
   
   /* if left is a tmp & right is not */
   if (IS_ITEMP(op1)  && 
index 6fbc8173c28fdb599560df018ba1767f3485bedf..80c0393fb6e9716fc6d6a371e061f533a99487e5 100644 (file)
@@ -846,7 +846,8 @@ static bool operandsEqu ( operand *op1, operand *op2)
     if (sym1 == sym2)
         return TRUE ;
 
-    if (strcmp(sym1->rname,sym2->rname) == 0)
+    if (sym1->rname[0] && sym2->rname[0]
+        && strcmp (sym1->rname, sym2->rname) == 0)
         return TRUE;
 
 
index dbea99f7e09118996d7ddc4e690325c6996b2c99..127bc13fd2bd32ce5df6cd62ea0eea2b4270d025 100644 (file)
@@ -947,10 +947,10 @@ operandsEqu (operand * op1, operand * op2)
   if (sym1 == sym2)
     return 1;
 
-  if (strcmp (sym1->rname, sym2->rname) == 0)
+  if (sym1->rname[0] && sym2->rname[0]
+      && strcmp (sym1->rname, sym2->rname) == 0)
     return 2;
 
-
   /* if left is a tmp & right is not */
   if (IS_ITEMP (op1) &&
       !IS_ITEMP (op2) &&
@@ -7501,6 +7501,7 @@ genArrayInit (iCode * ic)
         }
       else
         {
+         printTypeChainRaw (type, NULL);
           wassertl (0, "Can't determine element size in genArrayInit.");
         }
     }