[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 43/54] tcg/loongarch64: Use atom_and_align_for_opc
From: |
Richard Henderson |
Subject: |
[PATCH v5 43/54] tcg/loongarch64: Use atom_and_align_for_opc |
Date: |
Mon, 15 May 2023 07:33:02 -0700 |
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index d26174dde5..07d35f92fa 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -826,6 +826,7 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s,
TCGLabelQemuLdst *l)
typedef struct {
TCGReg base;
TCGReg index;
+ TCGAtomAlign aa;
} HostAddress;
bool tcg_target_has_memory_bswap(MemOp memop)
@@ -845,7 +846,10 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s,
HostAddress *h,
{
TCGLabelQemuLdst *ldst = NULL;
MemOp opc = get_memop(oi);
- unsigned a_bits = get_alignment_bits(opc);
+ MemOp a_bits;
+
+ h->aa = atom_and_align_for_opc(s, opc, MO_ATOM_IFALIGN, false);
+ a_bits = h->aa.align;
#ifdef CONFIG_SOFTMMU
unsigned s_bits = opc & MO_SIZE;
--
2.34.1
- [PATCH v5 29/54] tcg/sparc64: Use standard slow path for softmmu, (continued)
- [PATCH v5 29/54] tcg/sparc64: Use standard slow path for softmmu, Richard Henderson, 2023/05/15
- [PATCH v5 31/54] tcg/loongarch64: Check the host supports unaligned accesses, Richard Henderson, 2023/05/15
- [PATCH v5 35/54] tcg: Add INDEX_op_qemu_{ld,st}_i128, Richard Henderson, 2023/05/15
- [PATCH v5 34/54] tcg: Introduce tcg_target_has_memory_bswap, Richard Henderson, 2023/05/15
- [PATCH v5 30/54] accel/tcg: Remove helper_unaligned_{ld,st}, Richard Henderson, 2023/05/15
- [PATCH v5 42/54] tcg/arm: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 40/54] tcg/i386: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 43/54] tcg/loongarch64: Use atom_and_align_for_opc,
Richard Henderson <=
- [PATCH v5 41/54] tcg/aarch64: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 44/54] tcg/mips: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 45/54] tcg/ppc: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 50/54] tcg/i386: Support 128-bit load/store with have_atomic16, Richard Henderson, 2023/05/15
- [PATCH v5 51/54] tcg/aarch64: Rename temporaries, Richard Henderson, 2023/05/15
- [PATCH v5 47/54] tcg/s390x: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 46/54] tcg/riscv: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15
- [PATCH v5 48/54] tcg/sparc64: Use atom_and_align_for_opc, Richard Henderson, 2023/05/15