diff options
author | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-11-09 15:31:00 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2010-11-21 16:54:35 -0800 |
commit | 259d20a35dde46c51878dfd3afb7b8c518ed3dcf (patch) | |
tree | 7f6f457829f456f7d552e3c4fceb7f14830481d5 /riscv/decode.h | |
parent | 6d443095f92d8ff5d7c9831e1e111ef605d637f0 (diff) | |
download | spike-259d20a35dde46c51878dfd3afb7b8c518ed3dcf.zip spike-259d20a35dde46c51878dfd3afb7b8c518ed3dcf.tar.gz spike-259d20a35dde46c51878dfd3afb7b8c518ed3dcf.tar.bz2 |
[opcodes, pk, sim, xcc] Tweaked FP encoding
Diffstat (limited to 'riscv/decode.h')
-rw-r--r-- | riscv/decode.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 327da6c..903eef5 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -185,7 +185,8 @@ private: #define TARGET insn.jtype.target #define BRANCH_TARGET (npc + (BIMM << BRANCH_ALIGN_BITS)) #define JUMP_TARGET (npc + (TARGET << JUMP_ALIGN_BITS)) -#define RM (insn.ftype.ffunct & 3) +#define RM ((insn.ftype.ffunct & 4) ? (insn.ftype.ffunct & 3) : \ + ((fsr & FSR_RD) >> FSR_RD_SHIFT)) #define require_supervisor if(!(sr & SR_S)) throw trap_privileged_instruction #define require64 if(gprlen != 64) throw trap_illegal_instruction |