+2007-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/hc08/gen.c (genSwap): fix swap regression test
+
2007-02-10 Borut Razem <borut.razem AT siol.net>
* src/SDCCsymt.c: fixed bug #1159134: invalid duplicate declarations
if (sym1 == sym2)
return TRUE;
+ /* if they have the same rname */
if (sym1->rname[0] && sym2->rname[0]
&& strcmp (sym1->rname, sym2->rname) == 0)
return TRUE;
hc08_freeReg (hc08_reg_a);
break;
case 2: /* swap bytes in a word */
- if (operandsEqu (left, result))
+ if (operandsEqu (left, result) || sameRegs (AOP (left), AOP (result)))
{
loadRegFromAop (hc08_reg_a, AOP (left), 0);
hc08_useReg (hc08_reg_a);