projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec29767
)
Require 4-byte instruction alignment until RVC is reimplemented
author
Andrew Waterman
<aswaterman@gmail.com>
Sat, 3 Jan 2015 07:17:44 +0000
(23:17 -0800)
committer
Andrew Waterman
<aswaterman@gmail.com>
Sat, 3 Jan 2015 07:17:44 +0000
(23:17 -0800)
riscv/mmu.h
patch
|
blob
|
history
diff --git
a/riscv/mmu.h
b/riscv/mmu.h
index d24ed187bf30e1f868c8a059c133b771c39e9b46..329f29140ec485212c0f5d81c4bb226dec7d26e2 100644
(file)
--- a/
riscv/mmu.h
+++ b/
riscv/mmu.h
@@
-89,7
+89,8
@@
public:
if (likely(entry->tag == addr))
return entry;
- char* iaddr = (char*)translate(addr, 2, false, true);
+ bool rvc = false; // set this dynamically once RVC is re-implemented
+ char* iaddr = (char*)translate(addr, rvc ? 2 : 4, false, true);
insn_bits_t insn = *(uint16_t*)iaddr;
if (unlikely(insn_length(insn) == 2)) {