diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-02 10:38:52 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-11 09:53:41 +0100 |
commit | a978c37b275a6f7fb21d5bf6d46dca56b96ec7b0 (patch) | |
tree | 5a039202488c7c1487f3551d7c9429d990c320f7 /target/nios2 | |
parent | 0e85e81b42e52e6e584aebe98c5b187653a577c1 (diff) | |
download | qemu-a978c37b275a6f7fb21d5bf6d46dca56b96ec7b0.zip qemu-a978c37b275a6f7fb21d5bf6d46dca56b96ec7b0.tar.gz qemu-a978c37b275a6f7fb21d5bf6d46dca56b96ec7b0.tar.bz2 |
target/nios2: Remove TARGET_ALIGNED_ONLY
In gen_ldx/gen_stx, the only two locations for memory operations,
mark the operation as either aligned (softmmu) or unaligned
(user-only, as if emulated by the kernel).
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/nios2')
-rw-r--r-- | target/nios2/translate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 6610e22..a548e16 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -298,6 +298,11 @@ static void gen_ldx(DisasContext *dc, uint32_t code, uint32_t flags) TCGv data = dest_gpr(dc, instr.b); tcg_gen_addi_tl(addr, load_gpr(dc, instr.a), instr.imm16.s); +#ifdef CONFIG_USER_ONLY + flags |= MO_UNALN; +#else + flags |= MO_ALIGN; +#endif tcg_gen_qemu_ld_tl(data, addr, dc->mem_idx, flags); } @@ -309,6 +314,11 @@ static void gen_stx(DisasContext *dc, uint32_t code, uint32_t flags) TCGv addr = tcg_temp_new(); tcg_gen_addi_tl(addr, load_gpr(dc, instr.a), instr.imm16.s); +#ifdef CONFIG_USER_ONLY + flags |= MO_UNALN; +#else + flags |= MO_ALIGN; +#endif tcg_gen_qemu_st_tl(val, addr, dc->mem_idx, flags); } |