arch-riscv: respect IALIGN, influenced by toggling 'c' extension.
authorNils Asmussen <nils.asmussen@barkhauseninstitut.org>
Sat, 22 Feb 2020 15:02:49 +0000 (16:02 +0100)
committerNils Asmussen <nils.asmussen@barkhauseninstitut.org>
Wed, 29 Apr 2020 11:41:55 +0000 (11:41 +0000)
commit9c6920d6f7e8b1bfc80464baacaabf8d017a46d2
tree8639d54ddf231efe0cd7fce2e76d757651d2adfd
parent39f1ff79ec31fcf251efa4372e28bc5ce04c3340
arch-riscv: respect IALIGN, influenced by toggling 'c' extension.

According to the privileged ISA spec, SEPC[0]/MEPC[0] reads always 0
and SEPC[1]/MEPC[1] reads 0 if the compressed extension is disabled.

Additionally, the compressed extension can only be disabled if the next
instruction is 4-byte aligned.

Change-Id: I590c05e4000b59a5ba283f47933f7a92959d8e38
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25658
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
src/arch/riscv/isa.cc
src/arch/riscv/registers.hh