diff options
author | Andrew Waterman <aswaterman@gmail.com> | 2018-03-21 17:19:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-21 17:19:16 -0700 |
commit | 1da69b975beeda193d5fa47950be5883ca20ad13 (patch) | |
tree | 520abe609d8e2401afc140910bb2b417b8a415c5 /riscv/decode.h | |
parent | ec79312862ebdd597cc0f63e002e14f31c36deb0 (diff) | |
download | riscv-isa-sim-1da69b975beeda193d5fa47950be5883ca20ad13.zip riscv-isa-sim-1da69b975beeda193d5fa47950be5883ca20ad13.tar.gz riscv-isa-sim-1da69b975beeda193d5fa47950be5883ca20ad13.tar.bz2 |
Implement Hauser misa.C misalignment proposal (#187)
See https://github.com/riscv/riscv-isa-manual/commit/0472bcdd166f45712492829a250e228bb45fa5e7
- Reads of xEPC[1] are masked when RVC is disabled
- Writes to MISA are suppressed if they would cause a misaligned fetch
- Misaligned PCs no longer need to be checked upon fetch
Diffstat (limited to 'riscv/decode.h')
-rw-r--r-- | riscv/decode.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 596a2ad..8fc8ada 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -206,7 +206,7 @@ private: } while(0) #define set_pc_and_serialize(x) \ - do { reg_t __npc = (x); \ + do { reg_t __npc = (x) & p->pc_alignment_mask(); \ npc = PC_SERIALIZE_AFTER; \ STATE.pc = __npc; \ } while(0) |