riscv misaligned accesses
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | target/riscv: add a trap-misaligned-access propertytarget/ target/ | +6 | 2 replies | |
| 2/3 | target/riscv: generate misaligned access trap for rvi insntarget/ | +7 | 2 replies | |
| 3/3 | target/riscv: fix the trap generation for conditional storetarget/ | +19 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] riscv misaligned accesses
Hi,
I fell into some strangeness while using RISCV:
* firstly the rvi stores / loads don't seem to generate a trap when doing a misaligned access, which is something we would like to happen. According to the documentation an EEI may or may no guarantee misaligned loads and stores are handled invisibly. Thus PATCH 1 adds an option for enabling those traps, and PATCH 2 raise it when enabled and Zama16B (which implies atomicity for misaligned access within 16bytes boundary) is disabled.
* secondly about the conditional store: the documentation states that the Zalrsc extension requires that the address held in rs1 is naturally aligned to the size of the operand. The current implementation doesn't do that check if the store doesn't happen, so the third PATCH fixes that behavior so that a misaligned trap will happen if the address is not naturally aligned even if the store shouldn't happen.
Best Regards,
Fred
Frederic Konrad (3):
target/riscv: add a trap-misaligned-access property target/riscv: generate misaligned access trap for rvi insn target/riscv: fix the trap generation for conditional store
target/riscv/cpu.c | 5 +++++ target/riscv/cpu_cfg.h | 1 + target/riscv/insn_trans/trans_rva.c.inc | 19 +++++++++++++++++++ target/riscv/insn_trans/trans_rvi.c.inc | 7 +++++++ 4 files changed, 32 insertions(+)
Signature · 1 line
2.43.5