diff options
author | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2011-03-01 13:12:31 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@s144.Millennium.Berkeley.EDU> | 2011-03-01 13:12:31 -0800 |
commit | 68591c3c451dca19d4751eb62861367f2a3e58b5 (patch) | |
tree | 6aa205df6c037f5d522ff278576b76cc3c15e6e9 /riscv | |
parent | 2c3ff5536d792f564c5c97aff691ccda6a0b9e84 (diff) | |
download | spike-68591c3c451dca19d4751eb62861367f2a3e58b5.zip spike-68591c3c451dca19d4751eb62861367f2a3e58b5.tar.gz spike-68591c3c451dca19d4751eb62861367f2a3e58b5.tar.bz2 |
[xcc,sim] branches are pc-relative (not pc+4) again
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/decode.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 40b8b5e..d0b92dd 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -178,8 +178,8 @@ private: #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)) +#define BRANCH_TARGET (pc + (BIMM << BRANCH_ALIGN_BITS)) +#define JUMP_TARGET (pc + (TARGET << JUMP_ALIGN_BITS)) #define RM ((insn.ftype.rm != 7) ? insn.ftype.rm : \ ((fsr & FSR_RD) >> FSR_RD_SHIFT)) |