From: Jeff Law Date: Mon, 2 Dec 1996 20:12:08 +0000 (+0000) Subject: * simomps.c: Fix carry bit handling in "sub" and "cmp" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=216e65571a142e7ce8cc81bef7615cea9eaec89e;p=binutils-gdb.git * simomps.c: Fix carry bit handling in "sub" and "cmp" instructions. Another dozen execution failures fixed. --- diff --git a/sim/mn10300/simops.c b/sim/mn10300/simops.c index 217cd16101c..8f22bd50706 100644 --- a/sim/mn10300/simops.c +++ b/sim/mn10300/simops.c @@ -1238,7 +1238,7 @@ void OP_F100 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1260,7 +1260,7 @@ void OP_F120 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1282,7 +1282,7 @@ void OP_F110 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1304,7 +1304,7 @@ void OP_F130 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1370,7 +1370,7 @@ void OP_F180 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1505,7 +1505,7 @@ void OP_A0 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1526,7 +1526,7 @@ void OP_F1A0 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1547,7 +1547,7 @@ void OP_F190 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1589,7 +1589,7 @@ void OP_B0 () z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (reg1 > reg2); v = ((reg2 & 0x80000000) != (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000));