From 75a41abe980681d2ac9e533d88dbcb09c6821fe6 Mon Sep 17 00:00:00 2001 From: epetrich Date: Sun, 20 Jun 2004 23:02:43 +0000 Subject: [PATCH] * 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 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3361 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 11 +++++++++++ src/SDCCmain.c | 1 + src/ds390/gen.c | 3 ++- src/hc08/gen.c | 4 ++-- src/mcs51/gen.c | 7 +++++-- src/pic/gen.c | 5 +++-- src/pic16/gen.c | 3 ++- src/z80/gen.c | 5 +++-- 8 files changed, 29 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b47e2f97..d544d725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-06-20 Erik Petrich + + * 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 * src/SDCCcse.c (cseBBlock): fixed bug #966963 diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 999bf9ca..b37a9bf0 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1017,6 +1017,7 @@ parseCmdLine (int argc, char **argv) if (!port->parseOption (&argc, argv, &i)) { werror (W_UNKNOWN_OPTION, argv[i]); + continue; } else { diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 1f67805c..82e05af2 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -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; diff --git a/src/hc08/gen.c b/src/hc08/gen.c index 2e2744a0..2eab3217 100644 --- a/src/hc08/gen.c +++ b/src/hc08/gen.c @@ -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) && diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 3e9b341c..8e5f49cf 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -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 diff --git a/src/pic/gen.c b/src/pic/gen.c index fb1868b1..c7964832 100644 --- a/src/pic/gen.c +++ b/src/pic/gen.c @@ -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) && diff --git a/src/pic16/gen.c b/src/pic16/gen.c index 6fbc8173..80c0393f 100644 --- a/src/pic16/gen.c +++ b/src/pic16/gen.c @@ -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; diff --git a/src/z80/gen.c b/src/z80/gen.c index dbea99f7..127bc13f 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -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."); } } -- 2.30.2