[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 27/57] tcg/arm: Use full load/store helpers in user-only mode
From: |
Richard Henderson |
Subject: |
[PATCH v3 27/57] tcg/arm: Use full load/store helpers in user-only mode |
Date: |
Tue, 25 Apr 2023 20:31:16 +0100 |
Instead of using helper_unaligned_{ld,st}, use the full load/store helpers.
This will allow the fast path to increase alignment to implement atomicity
while not immediately raising an alignment exception.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/arm/tcg-target.c.inc | 45 ----------------------------------------
1 file changed, 45 deletions(-)
diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc
index a02804dd69..eb0542f32e 100644
--- a/tcg/arm/tcg-target.c.inc
+++ b/tcg/arm/tcg-target.c.inc
@@ -1325,7 +1325,6 @@ typedef struct {
bool index_scratch;
} HostAddress;
-#ifdef CONFIG_SOFTMMU
static TCGReg ldst_ra_gen(TCGContext *s, const TCGLabelQemuLdst *l, int arg)
{
/* We arrive at the slow path via "BLNE", so R14 contains l->raddr. */
@@ -1368,50 +1367,6 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s,
TCGLabelQemuLdst *lb)
tcg_out_goto(s, COND_AL, qemu_st_helpers[opc & MO_SIZE]);
return true;
}
-#else
-static bool tcg_out_fail_alignment(TCGContext *s, TCGLabelQemuLdst *l)
-{
- if (!reloc_pc24(l->label_ptr[0], tcg_splitwx_to_rx(s->code_ptr))) {
- return false;
- }
-
- if (TARGET_LONG_BITS == 64) {
- /* 64-bit target address is aligned into R2:R3. */
- TCGMovExtend ext[2] = {
- { .dst = TCG_REG_R2, .dst_type = TCG_TYPE_I32,
- .src = l->addrlo_reg,
- .src_type = TCG_TYPE_I32, .src_ext = MO_UL },
- { .dst = TCG_REG_R3, .dst_type = TCG_TYPE_I32,
- .src = l->addrhi_reg,
- .src_type = TCG_TYPE_I32, .src_ext = MO_UL },
- };
- tcg_out_movext2(s, &ext[0], &ext[1], TCG_REG_TMP);
- } else {
- tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_R1, l->addrlo_reg);
- }
- tcg_out_mov(s, TCG_TYPE_PTR, TCG_REG_R0, TCG_AREG0);
-
- /*
- * Tail call to the helper, with the return address back inline,
- * just for the clarity of the debugging traceback -- the helper
- * cannot return. We have used BLNE to arrive here, so LR is
- * already set.
- */
- tcg_out_goto(s, COND_AL, (const void *)
- (l->is_ld ? helper_unaligned_ld : helper_unaligned_st));
- return true;
-}
-
-static bool tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
-{
- return tcg_out_fail_alignment(s, l);
-}
-
-static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
-{
- return tcg_out_fail_alignment(s, l);
-}
-#endif /* SOFTMMU */
static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h,
TCGReg addrlo, TCGReg addrhi,
--
2.34.1
- [PATCH v3 17/57] tcg/aarch64: Detect have_lse, have_lse2 for linux, (continued)
- [PATCH v3 17/57] tcg/aarch64: Detect have_lse, have_lse2 for linux, Richard Henderson, 2023/04/25
- [PATCH v3 20/57] tcg: Introduce TCG_OPF_TYPE_MASK, Richard Henderson, 2023/04/25
- [PATCH v3 18/57] tcg/aarch64: Detect have_lse, have_lse2 for darwin, Richard Henderson, 2023/04/25
- [PATCH v3 19/57] accel/tcg: Add have_lse2 support in ldst_atomicity, Richard Henderson, 2023/04/25
- [PATCH v3 21/57] tcg/i386: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 23/57] tcg/ppc: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 24/57] tcg/loongarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 25/57] tcg/riscv: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 22/57] tcg/aarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 26/57] tcg/arm: Adjust constraints on qemu_ld/st, Richard Henderson, 2023/04/25
- [PATCH v3 27/57] tcg/arm: Use full load/store helpers in user-only mode,
Richard Henderson <=
- [PATCH v3 28/57] tcg/mips: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 31/57] tcg/sparc64: Rename tcg_out_movi_imm13 to tcg_out_movi_s13, Richard Henderson, 2023/04/25
- [PATCH v3 32/57] tcg/sparc64: Rename tcg_out_movi_imm32 to tcg_out_movi_u32, Richard Henderson, 2023/04/25
- [PATCH v3 29/57] tcg/s390x: Use full load/store helpers in user-only mode, Richard Henderson, 2023/04/25
- [PATCH v3 30/57] tcg/sparc64: Allocate %g2 as a third temporary, Richard Henderson, 2023/04/25
- [PATCH v3 35/57] accel/tcg: Remove helper_unaligned_{ld,st}, Richard Henderson, 2023/04/25
- [PATCH v3 36/57] tcg/loongarch64: Assert the host supports unaligned accesses, Richard Henderson, 2023/04/25
- [PATCH v3 34/57] tcg/sparc64: Use standard slow path for softmmu, Richard Henderson, 2023/04/25
- [PATCH v3 33/57] tcg/sparc64: Split out tcg_out_movi_s32, Richard Henderson, 2023/04/25
- [PATCH v3 37/57] tcg/loongarch64: Support softmmu unaligned accesses, Richard Henderson, 2023/04/25