aboutsummaryrefslogtreecommitdiff
path: root/riscv/decode.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-01-25 22:51:24 -0800
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-01-25 22:51:24 -0800
commit5bae2bf37228d1a67d8f4c6175a6cda768d8b3e6 (patch)
treee8e3eea9436f4288431faa023fb8175c90d447f2 /riscv/decode.h
parentf0063c2e8b2ba6ec5e0147121e5ee2d9ee3ad2a4 (diff)
downloadspike-5bae2bf37228d1a67d8f4c6175a6cda768d8b3e6.zip
spike-5bae2bf37228d1a67d8f4c6175a6cda768d8b3e6.tar.gz
spike-5bae2bf37228d1a67d8f4c6175a6cda768d8b3e6.tar.bz2
[opcodes,pk,sim,xcc] great renumbering of 2011, part deux
Diffstat (limited to 'riscv/decode.h')
-rw-r--r--riscv/decode.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/riscv/decode.h b/riscv/decode.h
index fff6e0e..c462dcb 100644
--- a/riscv/decode.h
+++ b/riscv/decode.h
@@ -25,7 +25,6 @@ const int NFPR = 1 << FPRID_BITS;
const int IMM_BITS = 12;
const int IMMLO_BITS = 7;
const int TARGET_BITS = 25;
-const int SHAMT_BITS = 6;
const int FUNCT_BITS = 3;
const int FUNCTR_BITS = 7;
const int FFUNCT_BITS = 5;
@@ -167,8 +166,8 @@ private:
#define BIGIMM insn.ltype.bigimm
#define SIMM insn.itype.imm12
#define BIMM ((signed)insn.btype.immlo | (insn.btype.immhi << IMMLO_BITS))
-#define SHAMT ((insn.itype.imm12 >> (IMM_BITS-6)) & 0x3F)
-#define SHAMTW ((insn.itype.imm12 >> (IMM_BITS-6)) & 0x1F)
+#define SHAMT (insn.itype.imm12 & 0x3F)
+#define SHAMTW (insn.itype.imm12 & 0x1F)
#define TARGET insn.jtype.target
#define BRANCH_TARGET (npc + (BIMM << BRANCH_ALIGN_BITS))
#define JUMP_TARGET (npc + (TARGET << JUMP_ALIGN_BITS))