target/xtensa: clean up unaligned access
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 17 May 2021 19:31:08 +0000 (12:31 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 20 May 2021 20:02:58 +0000 (13:02 -0700)
commit583e6a5f55d4b02f04eda0cd70bf7b7701a08450
treee365a6c371dc6401b3397dd50afd9de362ff787f
parent735aa900e4bf57b777ac620bed7c88234ec4b601
target/xtensa: clean up unaligned access

Xtensa cores may or may not have hardware support for unaligned memory
access. Remove TARGET_ALIGNED_ONLY=y from all xtensa configurations and
pass MO_ALIGN in memory access flags for all operations that would raise
an exception.
Simplify use of gen_load_store_alignment by passing access size and
alignment requirements in single parameter.
Drop condition from xtensa_cpu_do_unaligned_access and replace it with
assertion.
Add a test.

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
default-configs/targets/xtensa-linux-user.mak
default-configs/targets/xtensa-softmmu.mak
default-configs/targets/xtensaeb-linux-user.mak
default-configs/targets/xtensaeb-softmmu.mak
target/xtensa/helper.c
target/xtensa/translate.c
tests/tcg/xtensa/test_load_store.S [new file with mode: 0644]