[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/15] tcg: Canonicalize alignment flags in MemOp
From: |
Richard Henderson |
Subject: |
[PULL 15/15] tcg: Canonicalize alignment flags in MemOp |
Date: |
Wed, 13 Oct 2021 11:22:39 -0700 |
Having observed e.g. al8+leq in dumps, canonicalize to al+leq.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-op.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index b1cfd36f29..61b492d89f 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -2765,7 +2765,12 @@ void tcg_gen_lookup_and_goto_ptr(void)
static inline MemOp tcg_canonicalize_memop(MemOp op, bool is64, bool st)
{
/* Trigger the asserts within as early as possible. */
- (void)get_alignment_bits(op);
+ unsigned a_bits = get_alignment_bits(op);
+
+ /* Prefer MO_ALIGN+MO_XX over MO_ALIGN_XX+MO_XX */
+ if (a_bits == (op & MO_SIZE)) {
+ op = (op & ~MO_AMASK) | MO_ALIGN;
+ }
switch (op & MO_SIZE) {
case MO_8:
--
2.25.1
- [PULL 06/15] target/hexagon: Implement cpu_mmu_index, (continued)
- [PULL 06/15] target/hexagon: Implement cpu_mmu_index, Richard Henderson, 2021/10/13
- [PULL 04/15] target/ppc: Use MO_128 for 16 byte atomics, Richard Henderson, 2021/10/13
- [PULL 08/15] accel/tcg: Move cpu_atomic decls to exec/cpu_ldst.h, Richard Henderson, 2021/10/13
- [PULL 10/15] target/mips: Use 8-byte memory ops for msa load/store, Richard Henderson, 2021/10/13
- [PULL 09/15] target/mips: Use cpu_*_data_ra for msa load/store, Richard Henderson, 2021/10/13
- [PULL 11/15] target/s390x: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/10/13
- [PULL 13/15] target/arm: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/10/13
- [PULL 12/15] target/sparc: Use cpu_*_mmu instead of helper_*_mmu, Richard Henderson, 2021/10/13
- [PULL 07/15] accel/tcg: Add cpu_{ld,st}*_mmu interfaces, Richard Henderson, 2021/10/13
- [PULL 14/15] tcg: Move helper_*_mmu decls to tcg/tcg-ldst.h, Richard Henderson, 2021/10/13
- [PULL 15/15] tcg: Canonicalize alignment flags in MemOp,
Richard Henderson <=
- Re: [PULL 00/15] tcg patch queue, Richard Henderson, 2021/10/13