[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 46/57] tcg/loongarch64: Use atom_and_align_for_opc
From: |
Richard Henderson |
Subject: |
[PATCH v4 46/57] tcg/loongarch64: Use atom_and_align_for_opc |
Date: |
Wed, 3 May 2023 08:06:45 +0100 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index 62bf823084..43341524f2 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -826,6 +826,8 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s,
TCGLabelQemuLdst *l)
typedef struct {
TCGReg base;
TCGReg index;
+ MemOp align;
+ MemOp atom;
} HostAddress;
bool tcg_target_has_memory_bswap(MemOp memop)
@@ -845,7 +847,11 @@ 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, atom_u;
+
+ a_bits = atom_and_align_for_opc(s, &h->atom, &atom_u, opc,
+ MO_ATOM_IFALIGN, false);
+ h->align = a_bits;
#ifdef CONFIG_SOFTMMU
unsigned s_bits = opc & MO_SIZE;
--
2.34.1
- Re: [PATCH v4 43/57] tcg/i386: Use atom_and_align_for_opc, (continued)
- [PATCH v4 40/57] tcg: Add INDEX_op_qemu_{ld,st}_i128, Richard Henderson, 2023/05/03
- [PATCH v4 47/57] tcg/mips: Use atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 44/57] tcg/aarch64: Use atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 48/57] tcg/ppc: Use atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 46/57] tcg/loongarch64: Use atom_and_align_for_opc,
Richard Henderson <=
- [PATCH v4 41/57] tcg: Support TCG_TYPE_I128 in tcg_out_{ld, st}_helper_{args, ret}, Richard Henderson, 2023/05/03
- [PATCH v4 50/57] tcg/s390x: Use atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 45/57] tcg/arm: Use atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 42/57] tcg: Introduce atom_and_align_for_opc, Richard Henderson, 2023/05/03
- [PATCH v4 52/57] tcg/i386: Honor 64-bit atomicity in 32-bit mode, Richard Henderson, 2023/05/03