Skip to content

Commit b8eacc2

Browse files
authored
Merge pull request #2232 from riscv-software-src/fix-2230
Disallow delegation of misaligned-fetch exceptions when IALIGN=16
2 parents 875a7ee + 4adab49 commit b8eacc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

riscv/csrs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ void medeleg_csr_t::verify_permissions(insn_t insn, bool write) const {
996996

997997
bool medeleg_csr_t::unlogged_write(const reg_t val) noexcept {
998998
const reg_t mask = 0
999-
| (1 << CAUSE_MISALIGNED_FETCH)
999+
| (proc->extension_enabled(EXT_ZCA) ? 0 : 1 << CAUSE_MISALIGNED_FETCH)
10001000
| (1 << CAUSE_FETCH_ACCESS)
10011001
| (1 << CAUSE_ILLEGAL_INSTRUCTION)
10021002
| (1 << CAUSE_BREAKPOINT)

0 commit comments

Comments
 (0)