diff options
author | Jeff Law <law@redhat.com> | 1997-03-12 22:20:13 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1997-03-12 22:20:13 +0000 |
commit | 0ade484f982a4d2528c341e48a7ff90ca14d06da (patch) | |
tree | 1626fde9cfb7118a68576328707f0bec2d4b1c23 /sim/mn10300 | |
parent | 09eef8af93534f0df2d7d874f2483389373ef698 (diff) | |
download | gdb-0ade484f982a4d2528c341e48a7ff90ca14d06da.zip gdb-0ade484f982a4d2528c341e48a7ff90ca14d06da.tar.gz gdb-0ade484f982a4d2528c341e48a7ff90ca14d06da.tar.bz2 |
* simops.c: Fix carry bit computation for "add" instructions.
More bugs exposed by new mn10300 compiler optimizations.
Diffstat (limited to 'sim/mn10300')
-rw-r--r-- | sim/mn10300/ChangeLog | 2 | ||||
-rw-r--r-- | sim/mn10300/simops.c | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index d601065..b0d1791 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,5 +1,7 @@ Wed Mar 12 15:04:00 1997 Jeffrey A Law (law@cygnus.com) + * simops.c: Fix carry bit computation for "add" instructions. + * simops.c: Fix typos in bset insns. Fix arguments to store_mem for bset imm8,(d8,an) and bclr imm8,(d8,an). diff --git a/sim/mn10300/simops.c b/sim/mn10300/simops.c index cd4c98f..3fe6799 100644 --- a/sim/mn10300/simops.c +++ b/sim/mn10300/simops.c @@ -997,7 +997,7 @@ void OP_E0 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (value < reg1) || (value < reg2); v = ((reg2 & 0x80000000) == (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1020,7 +1020,7 @@ void OP_F160 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (value < reg1) || (value < reg2); v = ((reg2 & 0x80000000) == (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1043,7 +1043,7 @@ void OP_F150 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (value < reg1) || (value < reg2); v = ((reg2 & 0x80000000) == (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1066,7 +1066,7 @@ void OP_F170 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (value < reg1) || (value < reg2); v = ((reg2 & 0x80000000) == (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); @@ -1089,7 +1089,7 @@ void OP_2800 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1112,7 +1112,7 @@ void OP_FAC00000 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1135,7 +1135,7 @@ void OP_FCC00000 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1158,7 +1158,7 @@ void OP_2000 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1181,7 +1181,7 @@ void OP_FAD00000 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1204,7 +1204,7 @@ void OP_FCD00000 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < imm); + c = (value < reg1) || (value < imm); v = ((reg1 & 0x80000000) == (imm & 0x80000000) && (reg1 & 0x80000000) != (value & 0x80000000)); @@ -1263,7 +1263,7 @@ void OP_F140 (insn, extension) z = (value == 0); n = (value & 0x80000000); - c = (reg1 < reg2); + c = (value < reg1) || (value < reg2); v = ((reg2 & 0x80000000) == (reg1 & 0x80000000) && (reg2 & 0x80000000) != (value & 0x80000000)); |