[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 45/53] target/nios2: Remove TARGET_ALIGNED_ONLY
|
From: |
Richard Henderson |
|
Subject: |
[PULL 45/53] target/nios2: Remove TARGET_ALIGNED_ONLY |
|
Date: |
Thu, 11 May 2023 09:04:42 +0100 |
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>
---
configs/targets/nios2-softmmu.mak | 1 -
target/nios2/translate.c | 10 ++++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configs/targets/nios2-softmmu.mak
b/configs/targets/nios2-softmmu.mak
index 5823fc02c8..c99ae3777e 100644
--- a/configs/targets/nios2-softmmu.mak
+++ b/configs/targets/nios2-softmmu.mak
@@ -1,3 +1,2 @@
TARGET_ARCH=nios2
-TARGET_ALIGNED_ONLY=y
TARGET_NEED_FDT=y
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 6610e22236..a548e16ed5 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);
}
--
2.34.1
- [PULL 24/53] tcg/arm: Convert tcg_out_qemu_{ld,st}_slow_path, (continued)
- [PULL 24/53] tcg/arm: Convert tcg_out_qemu_{ld,st}_slow_path, Richard Henderson, 2023/05/11
- [PULL 03/53] disas: Fix tabs and braces in disas.c, Richard Henderson, 2023/05/11
- [PULL 35/53] tcg/ppc: Adjust constraints on qemu_ld/st, Richard Henderson, 2023/05/11
- [PULL 37/53] tcg/ppc: Remove unused constraint J, Richard Henderson, 2023/05/11
- [PULL 32/53] tcg/mips: Reorg tlb load within prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 40/53] tcg/s390x: Simplify constraints on qemu_ld/st, Richard Henderson, 2023/05/11
- [PULL 42/53] target/mips: Add missing default_tcg_memop_mask, Richard Henderson, 2023/05/11
- [PULL 41/53] target/mips: Add MO_ALIGN to gen_llwp, gen_scwp, Richard Henderson, 2023/05/11
- [PULL 44/53] target/mips: Remove TARGET_ALIGNED_ONLY, Richard Henderson, 2023/05/11
- [PULL 43/53] target/mips: Use MO_ALIGN instead of 0, Richard Henderson, 2023/05/11
- [PULL 45/53] target/nios2: Remove TARGET_ALIGNED_ONLY,
Richard Henderson <=
- [PULL 48/53] tcg: Remove TARGET_ALIGNED_ONLY, Richard Henderson, 2023/05/11
- [PULL 47/53] target/sh4: Remove TARGET_ALIGNED_ONLY, Richard Henderson, 2023/05/11
- [PULL 46/53] target/sh4: Use MO_ALIGN where required, Richard Henderson, 2023/05/11
- [PULL 49/53] accel/tcg: Add cpu_in_serial_context, Richard Henderson, 2023/05/11
- [PULL 51/53] accel/tcg: Reorg system mode load helpers, Richard Henderson, 2023/05/11
- [PULL 52/53] accel/tcg: Reorg system mode store helpers, Richard Henderson, 2023/05/11
- [PULL 53/53] target/loongarch: Do not include tcg-ldst.h, Richard Henderson, 2023/05/11
- [PULL 50/53] accel/tcg: Introduce tlb_read_idx, Richard Henderson, 2023/05/11