diff options
Diffstat (limited to 'arch/mips/isa')
-rw-r--r-- | arch/mips/isa/decoder.isa | 12 | ||||
-rw-r--r-- | arch/mips/isa/formats/util.isa | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/isa/decoder.isa b/arch/mips/isa/decoder.isa index 35e5fa75b..ffedfbca8 100644 --- a/arch/mips/isa/decoder.isa +++ b/arch/mips/isa/decoder.isa @@ -143,9 +143,11 @@ decode OPCODE_HI default Unknown::unknown() { }}); 0x1: multu({{ - int64_t temp1 = Rs.uw * Rt.uw; - xc->setMiscReg(Hi,temp1<63:32>); - xc->setMiscReg(Lo,temp1<31:0>); + uint64_t temp1 = Rs.uw * Rt.uw; + uint32_t hi_val = temp1<63:32>; + uint32_t lo_val = temp1<31:0>; + xc->setMiscReg(Hi,hi_val); + xc->setMiscReg(Lo,lo_val); }}); 0x2: div({{ @@ -154,8 +156,8 @@ decode OPCODE_HI default Unknown::unknown() { }}); 0x3: divu({{ - xc->setMiscReg(Hi,Rs.uw % Rt.uw); - xc->setMiscReg(Lo,Rs.uw / Rt.uw); + xc->setMiscReg(Hi,Rs.uw % Rt.uw); + xc->setMiscReg(Lo,Rs.uw / Rt.uw); }}); } } diff --git a/arch/mips/isa/formats/util.isa b/arch/mips/isa/formats/util.isa index db4bf204a..dcdf46757 100644 --- a/arch/mips/isa/formats/util.isa +++ b/arch/mips/isa/formats/util.isa @@ -93,7 +93,9 @@ def LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags, output exec {{ -using namespace MipsISA; + using namespace MipsISA; + + /// CLEAR ALL CPU INST/EXE HAZARDS |