diff options
author | Jeff Law <law@redhat.com> | 1996-04-12 15:38:08 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-04-12 15:38:08 +0000 |
commit | 9b1271617bf446b2015601820d2f996b3d16fe8a (patch) | |
tree | 190166636b287bc71ced7c549716f151739224e2 /sim | |
parent | ee9897be1c508867290aeadd598428b6afe399a6 (diff) | |
download | gdb-9b1271617bf446b2015601820d2f996b3d16fe8a.zip gdb-9b1271617bf446b2015601820d2f996b3d16fe8a.tar.gz gdb-9b1271617bf446b2015601820d2f996b3d16fe8a.tar.bz2 |
* compile.c (sim_resume): Fix and simplify overflow and carry
handling for 32bit ALU insns.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/h8300/ChangeLog | 5 | ||||
-rw-r--r-- | sim/h8300/compile.c | 15 |
2 files changed, 7 insertions, 13 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index ce54af3..04d5624 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 12 09:39:56 1996 Jeffrey A Law (law@cygnus.com) + + * compile.c (sim_resume): Fix and simplify overflow and carry + handling for 32bit ALU insns. + Mon Apr 8 23:58:49 1996 Jeffrey A Law (law@cygnus.com) * compile.c (sim_resume): Fix overflow checks for ALU insns. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 7892dc6..cf1e9bc 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -1559,27 +1559,16 @@ sim_resume (step, siggnal) case O_ADD: v = ((rd & 0x80000000) == (ea & 0x80000000) && (rd & 0x80000000) != (res & 0x80000000)); + c = ((unsigned) res < (unsigned) rd) || ((unsigned) res < (unsigned) ea); break; case O_SUB: case O_CMP: v = ((rd & 0x80000000) != (-ea & 0x80000000) && (rd & 0x80000000) != (res & 0x80000000)); - break; - case O_NEG: - v = (rd == 0x80000000); - break; - } - goto next; - switch (code->opcode / 4) - { - case O_ADD: - c = ((unsigned) res < (unsigned) rd) || ((unsigned) res < (unsigned) ea); - break; - case O_SUB: - case O_CMP: c = (unsigned) rd < (unsigned) -ea; break; case O_NEG: + v = (rd == 0x80000000); c = res != 0; break; } |