[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/80] tcg/ppc: Use full load/store helpers in user-only mode
|
From: |
Richard Henderson |
|
Subject: |
[PULL 15/80] tcg/ppc: Use full load/store helpers in user-only mode |
|
Date: |
Tue, 16 May 2023 12:40:40 -0700 |
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.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/ppc/tcg-target.c.inc | 44 ----------------------------------------
1 file changed, 44 deletions(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 6a81916e64..218602c10c 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -1962,7 +1962,6 @@ static const uint32_t qemu_stx_opc[(MO_SIZE + MO_BSWAP) +
1] = {
[MO_BSWAP | MO_UQ] = STDBRX,
};
-#if defined (CONFIG_SOFTMMU)
static TCGReg ldst_ra_gen(TCGContext *s, const TCGLabelQemuLdst *l, int arg)
{
if (arg < 0) {
@@ -2012,49 +2011,6 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s,
TCGLabelQemuLdst *lb)
tcg_out_b(s, 0, lb->raddr);
return true;
}
-#else
-static bool tcg_out_fail_alignment(TCGContext *s, TCGLabelQemuLdst *l)
-{
- if (!reloc_pc14(l->label_ptr[0], tcg_splitwx_to_rx(s->code_ptr))) {
- return false;
- }
-
- if (TCG_TARGET_REG_BITS < TARGET_LONG_BITS) {
- TCGReg arg = TCG_REG_R4;
-
- arg |= (TCG_TARGET_CALL_ARG_I64 == TCG_CALL_ARG_EVEN);
- if (l->addrlo_reg != arg) {
- tcg_out_mov(s, TCG_TYPE_I32, arg, l->addrhi_reg);
- tcg_out_mov(s, TCG_TYPE_I32, arg + 1, l->addrlo_reg);
- } else if (l->addrhi_reg != arg + 1) {
- tcg_out_mov(s, TCG_TYPE_I32, arg + 1, l->addrlo_reg);
- tcg_out_mov(s, TCG_TYPE_I32, arg, l->addrhi_reg);
- } else {
- tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_R0, arg);
- tcg_out_mov(s, TCG_TYPE_I32, arg, arg + 1);
- tcg_out_mov(s, TCG_TYPE_I32, arg + 1, TCG_REG_R0);
- }
- } else {
- tcg_out_mov(s, TCG_TYPE_TL, TCG_REG_R4, l->addrlo_reg);
- }
- tcg_out_mov(s, TCG_TYPE_TL, TCG_REG_R3, TCG_AREG0);
-
- /* "Tail call" to the helper, with the return address back inline. */
- tcg_out_call_int(s, 0, (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 */
typedef struct {
TCGReg base;
--
2.34.1
- [PULL 09/80] meson: Detect atomic128 support with optimization, (continued)
- [PULL 09/80] meson: Detect atomic128 support with optimization, Richard Henderson, 2023/05/16
- [PULL 06/80] accel/tcg: Implement helper_{ld,st}*_mmu for user-only, Richard Henderson, 2023/05/16
- [PULL 08/80] tcg: Add 128-bit guest memory primitives, Richard Henderson, 2023/05/16
- [PULL 04/80] accel/tcg: Honor atomicity of stores, Richard Henderson, 2023/05/16
- [PULL 10/80] tcg/i386: Add have_atomic16, Richard Henderson, 2023/05/16
- [PULL 11/80] tcg/aarch64: Detect have_lse, have_lse2 for linux, Richard Henderson, 2023/05/16
- [PULL 13/80] tcg/i386: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 14/80] tcg/aarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 12/80] tcg/aarch64: Detect have_lse, have_lse2 for darwin, Richard Henderson, 2023/05/16
- [PULL 17/80] tcg/riscv: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 15/80] tcg/ppc: Use full load/store helpers in user-only mode,
Richard Henderson <=
- [PULL 16/80] tcg/loongarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 18/80] tcg/arm: Adjust constraints on qemu_ld/st, Richard Henderson, 2023/05/16
- [PULL 19/80] tcg/arm: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 20/80] tcg/mips: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 21/80] tcg/s390x: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/16
- [PULL 22/80] tcg/sparc64: Allocate %g2 as a third temporary, Richard Henderson, 2023/05/16
- [PULL 23/80] tcg/sparc64: Rename tcg_out_movi_imm13 to tcg_out_movi_s13, Richard Henderson, 2023/05/16
- [PULL 25/80] tcg/sparc64: Rename tcg_out_movi_imm32 to tcg_out_movi_u32, Richard Henderson, 2023/05/16
- [PULL 26/80] tcg/sparc64: Split out tcg_out_movi_s32, Richard Henderson, 2023/05/16
- [PULL 24/80] target/sparc64: Remove tcg_out_movi_s13 case from tcg_out_movi_imm32, Richard Henderson, 2023/05/16