Open
Description
The current exception handling of userspace program simulation simply skip the misaligned memory operation and return from M-mode:
Lines 51 to 55 in f7fd15b
And the handler is also missing in just-in-time (JIT) mode.
The real behavor of the hardware that allows the misaligned memory operation would be taking that operation to piece of the smaller and aligned memory operation (i.e. lb/lbu/sb
and lh/lhu/sh
for misaligned lw/sw
or lb/lbu/sb
for misaligned lh/lhu/sh
.