[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 49/57] tcg/riscv: Use atom_and_align_for_opc
From: |
Richard Henderson |
Subject: |
[PATCH v3 49/57] tcg/riscv: Use atom_and_align_for_opc |
Date: |
Tue, 25 Apr 2023 20:31:38 +0100 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/riscv/tcg-target.c.inc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index 5193998865..aae0512cbf 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc
@@ -924,8 +924,12 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s,
TCGReg *pbase,
{
TCGLabelQemuLdst *ldst = NULL;
MemOp opc = get_memop(oi);
- unsigned a_bits = get_alignment_bits(opc);
- unsigned a_mask = (1u << a_bits) - 1;
+ MemOp a_bits, atom_a, atom_u;
+ unsigned a_mask;
+
+ a_bits = atom_and_align_for_opc(s, &atom_a, &atom_u, opc,
+ MO_ATOM_IFALIGN, false);
+ a_mask = (1u << a_bits) - 1;
#ifdef CONFIG_SOFTMMU
unsigned s_bits = opc & MO_SIZE;
--
2.34.1
- [PATCH v3 39/57] tcg: Introduce tcg_target_has_memory_bswap, (continued)
- [PATCH v3 39/57] tcg: Introduce tcg_target_has_memory_bswap, Richard Henderson, 2023/04/25
- [PATCH v3 40/57] tcg: Add INDEX_op_qemu_{ld,st}_i128, Richard Henderson, 2023/04/25
- [PATCH v3 41/57] tcg: Support TCG_TYPE_I128 in tcg_out_{ld, st}_helper_{args, ret}, Richard Henderson, 2023/04/25
- [PATCH v3 42/57] tcg: Introduce atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 43/57] tcg/i386: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 44/57] tcg/aarch64: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 45/57] tcg/arm: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 46/57] tcg/loongarch64: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 47/57] tcg/mips: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 48/57] tcg/ppc: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 49/57] tcg/riscv: Use atom_and_align_for_opc,
Richard Henderson <=
- [PATCH v3 50/57] tcg/s390x: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 51/57] tcg/sparc64: Use atom_and_align_for_opc, Richard Henderson, 2023/04/25
- [PATCH v3 52/57] tcg/i386: Honor 64-bit atomicity in 32-bit mode, Richard Henderson, 2023/04/25
- [PATCH v3 53/57] tcg/i386: Support 128-bit load/store with have_atomic16, Richard Henderson, 2023/04/25
- [PATCH v3 54/57] tcg/aarch64: Rename temporaries, Richard Henderson, 2023/04/25
- [PATCH v3 55/57] tcg/aarch64: Support 128-bit load/store, Richard Henderson, 2023/04/25
- [PATCH v3 56/57] tcg/ppc: Support 128-bit load/store, Richard Henderson, 2023/04/25
- [PATCH v3 57/57] tcg/s390x: Support 128-bit load/store, Richard Henderson, 2023/04/25