From 3693326b62a755a28c1ef8c2be9198bddd55dc5f Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Tue, 21 Apr 2020 16:45:04 +0100 Subject: [PATCH] Don't sign extend CSetBoundsImm immediate --- src_Core/RISCY_OOO/procs/lib/Decode.bsv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_Core/RISCY_OOO/procs/lib/Decode.bsv b/src_Core/RISCY_OOO/procs/lib/Decode.bsv index f1e174c..0576f24 100755 --- a/src_Core/RISCY_OOO/procs/lib/Decode.bsv +++ b/src_Core/RISCY_OOO/procs/lib/Decode.bsv @@ -185,6 +185,7 @@ function DecodeResult decode(Instruction inst); ImmData immB = signExtend({ inst[31], inst[7], inst[30:25], inst[11:8], 1'b0}); ImmData immU = signExtend({ inst[31:12], 12'b0 }); ImmData immJ = signExtend({ inst[31], inst[19:12], inst[20], inst[30:21], 1'b0}); + ImmData immIunsigned = zeroExtend(inst[31:20]); // Results of mini-decoders Maybe#(MemInst) mem_inst = decodeMemInst(inst); @@ -751,7 +752,7 @@ function DecodeResult decode(Instruction inst); regs.dst = Valid(tagged Gpr rd); regs.src1 = Valid(tagged Gpr rs1); regs.src2 = Invalid; - dInst.imm = Valid (immI); + dInst.imm = Valid (immIunsigned); dInst.execFunc = CapModify (SetBounds (SetBounds)); end f3_cap_ThreeOp: begin