Browse Source

Correct AMO exception cause for misaligned accesses (#594)

Broken by 91092f21948ba2e77bfbc4629b82b6aa14d5ed6
pull/596/head
Scott Johnson 6 years ago
committed by GitHub
parent
commit
70fdec9e63
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      riscv/mmu.h

3
riscv/mmu.h

@ -195,6 +195,9 @@ public:
auto lhs = load_##type(addr, true); \
store_##type(addr, f(lhs)); \
return lhs; \
} catch (trap_load_address_misaligned& t) { \
/* AMO faults should be reported as store faults */ \
throw trap_store_address_misaligned(t.get_tval(), t.get_tval2(), t.get_tinst()); \
} catch (trap_load_page_fault& t) { \
/* AMO faults should be reported as store faults */ \
throw trap_store_page_fault(t.get_tval(), t.get_tval2(), t.get_tinst()); \

Loading…
Cancel
Save