From 6db7fc49d29a545d85cdfd563786fe0899a50016 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sun, 1 Dec 1996 23:10:04 +0000 Subject: [PATCH] * simops.c: Fix more bugs in "add imm,an" and "add imm,dn". Fixes a half-dozen (of several hundred :( c-torture failures. --- sim/mn10300/ChangeLog | 5 +++++ sim/mn10300/simops.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 9c875bb2df2..c3f3e375a1d 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 1 16:05:42 1996 Jeffrey A Law (law@cygnus.com) + + * simops.c: Fix more bugs in "add imm,an" and + "add imm,dn". + Wed Nov 27 09:20:42 1996 Jeffrey A Law (law@cygnus.com) * simops.c: Fix bugs in "movm" and "add imm,an". diff --git a/sim/mn10300/simops.c b/sim/mn10300/simops.c index 20cd9761ab0..e2f1ffded06 100644 --- a/sim/mn10300/simops.c +++ b/sim/mn10300/simops.c @@ -1034,10 +1034,10 @@ void OP_FAC00000 () int z, c, n, v; unsigned long reg1, imm, value; - reg1 = State.regs[REG_D0 + ((insn & 0xc0000) >> 16)]; + reg1 = State.regs[REG_D0 + ((insn & 0x30000) >> 16)]; imm = SEXT16 (insn & 0xffff); value = reg1 + imm; - State.regs[REG_D0 + ((insn & 0xc0000) >> 16)] = value; + State.regs[REG_D0 + ((insn & 0x30000) >> 16)] = value; z = (value == 0); n = (value & 0x80000000); @@ -1056,10 +1056,10 @@ void OP_FCC00000 () int z, c, n, v; unsigned long reg1, imm, value; - reg1 = State.regs[REG_D0 + ((insn & 0xc0000) >> 16)]; + reg1 = State.regs[REG_D0 + ((insn & 0x30000) >> 16)]; imm = ((insn & 0xffff) << 16) | extension; value = reg1 + imm; - State.regs[REG_D0 + ((insn & 0xc0000) >> 16)] = value; + State.regs[REG_D0 + ((insn & 0x30000) >> 16)] = value; z = (value == 0); n = (value & 0x80000000); @@ -1100,10 +1100,10 @@ void OP_FAD00000 () int z, c, n, v; unsigned long reg1, imm, value; - reg1 = State.regs[REG_A0 + ((insn & 0xc0000) >> 16)]; + reg1 = State.regs[REG_A0 + ((insn & 0x30000) >> 16)]; imm = SEXT16 (insn & 0xffff); value = reg1 + imm; - State.regs[REG_A0 + ((insn & 0xc0000) >> 16)] = value; + State.regs[REG_A0 + ((insn & 0x30000) >> 16)] = value; z = (value == 0); n = (value & 0x80000000); @@ -1122,10 +1122,10 @@ void OP_FCD00000 () int z, c, n, v; unsigned long reg1, imm, value; - reg1 = State.regs[REG_A0 + ((insn & 0xc0000) >> 16)]; + reg1 = State.regs[REG_A0 + ((insn & 0x30000) >> 16)]; imm = ((insn & 0xffff) << 16) | extension; value = reg1 + imm; - State.regs[REG_A0 + ((insn & 0xc0000) >> 16)] = value; + State.regs[REG_A0 + ((insn & 0x30000) >> 16)] = value; z = (value == 0); n = (value & 0x80000000); -- 2.30.2