From 11c6d3853d0deeee22344eeca6cb5dae21710379 Mon Sep 17 00:00:00 2001 From: sandeep Date: Sat, 24 Jun 2000 23:40:31 +0000 Subject: [PATCH] fixed a register allocation bug caused same registers to be allocated in reverse order for an asignment git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@284 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/mcs51/ralloc.c | 2 +- src/z80/ralloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 80d81667..368f58fa 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -1103,7 +1103,7 @@ static void serialRegAssign (eBBlock **ebbs, int count) OP_SYMBOL(IC_LEFT(ic)),ic->lineno); /* do the same for the right operand */ if (IC_RIGHT(ic) && IS_SYMOP(IC_RIGHT(ic)) && - OP_SYMBOL(IC_RIGHT(ic))->nRegs && ic->op != '=') + OP_SYMBOL(IC_RIGHT(ic))->nRegs) positionRegs(OP_SYMBOL(IC_RESULT(ic)), OP_SYMBOL(IC_RIGHT(ic)),ic->lineno); diff --git a/src/z80/ralloc.c b/src/z80/ralloc.c index 24628a58..db0153b1 100644 --- a/src/z80/ralloc.c +++ b/src/z80/ralloc.c @@ -1048,7 +1048,7 @@ static void serialRegAssign (eBBlock **ebbs, int count) OP_SYMBOL(IC_LEFT(ic)),ic->lineno); /* do the same for the right operand */ if (IC_RIGHT(ic) && IS_SYMOP(IC_RIGHT(ic)) && - OP_SYMBOL(IC_RIGHT(ic))->nRegs && ic->op != '=') + OP_SYMBOL(IC_RIGHT(ic))->nRegs) positionRegs(OP_SYMBOL(IC_RESULT(ic)), OP_SYMBOL(IC_RIGHT(ic)),ic->lineno); -- 2.30.2