aboutsummaryrefslogtreecommitdiff
path: root/machine/emulation.c
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2021-05-05 11:35:17 -0700
committerGitHub <noreply@github.com>2021-05-05 11:35:17 -0700
commite06e62f4a488eabe76b063fd4bfa694f9079bf5e (patch)
tree38760c4d943a7b3181dc3979a1b70906c5c32002 /machine/emulation.c
parentc624e731bd95b61f7f08b885b1897fdb5ccaee00 (diff)
downloadpk-e06e62f4a488eabe76b063fd4bfa694f9079bf5e.zip
pk-e06e62f4a488eabe76b063fd4bfa694f9079bf5e.tar.gz
pk-e06e62f4a488eabe76b063fd4bfa694f9079bf5e.tar.bz2
machine: replace `mbadaddr` with `mtval` (#242)
The LLVM IAS does not support the older name for the `mtval` CSR. This updates the name to the current spelling, which is required to build with the LLVM IAS. This remains compatible with binutils as well.
Diffstat (limited to 'machine/emulation.c')
-rw-r--r--machine/emulation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/machine/emulation.c b/machine/emulation.c
index c077a53..6b28a2d 100644
--- a/machine/emulation.c
+++ b/machine/emulation.c
@@ -131,7 +131,7 @@ void illegal_insn_trap(uintptr_t* regs, uintptr_t mcause, uintptr_t mepc)
" .popsection");
uintptr_t mstatus = read_csr(mstatus);
- insn_t insn = read_csr(mbadaddr);
+ insn_t insn = read_csr(mtval);
if (unlikely((insn & 3) != 3)) {
if (insn == 0)