* Runs dhrystone. 68.83d/s with terrible code.
[fw/sdcc] / src / z80 / ralloc.c
index 54e34049b2e5c8b1e9ffa58aa6738dc563706780..330de6b4c1a24116aa9fa0afb18f19f660d91d3e 100644 (file)
@@ -69,8 +69,8 @@ int _nRegs;
 #define DEBUG_FAKE_EXTRA_REGS  0
 
 static regs _gbz80_regs[] = {
-    { REG_GPR, C_IDX , "b", 1 },
-    { REG_GPR, B_IDX , "c", 1 },
+    { REG_GPR, C_IDX , "c", 1 },
+    { REG_GPR, B_IDX , "b", 1 },
     { REG_CND, CND_IDX, "c", 1}
 };
 
@@ -2076,15 +2076,17 @@ static void packRegisters (eBBlock *ebp)
            getSize(operandType(IC_RESULT(ic))) <= 2)
            packRegsForAccUse (ic);
 #else
-       if ((POINTER_GET(ic) ||
-            IS_ARITHMETIC_OP(ic) ||
-            IS_BITWISE_OP(ic) ||
-            ic->op == LEFT_OP ||
-            ic->op == RIGHT_OP
-            ) &&
-           IS_ITEMP(IC_RESULT(ic)) &&
-           getSize(operandType(IC_RESULT(ic))) == 1)
-           packRegsForAccUse2(ic);
+       if (!IS_GB) {
+           if ((POINTER_GET(ic) ||
+                IS_ARITHMETIC_OP(ic) ||
+                IS_BITWISE_OP(ic) ||
+                ic->op == LEFT_OP ||
+                ic->op == RIGHT_OP
+                ) &&
+               IS_ITEMP(IC_RESULT(ic)) &&
+               getSize(operandType(IC_RESULT(ic))) == 1)
+               packRegsForAccUse2(ic);
+       }
 #endif
     }
 }