[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 11/11] target/ppc: update DisasContext default_tcg_memop_mask
From: |
Mark Cave-Ayland |
Subject: |
[RFC PATCH 11/11] target/ppc: update DisasContext default_tcg_memop_mask value |
Date: |
Thu, 12 Dec 2024 15:14:12 +0000 |
If address swizzling is enabled for little endian accesses, don't use little
endian
memory ordering. This is because the conversion is performed by swizzling the
physical address lines as opposed to reversing the memory storage order.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
target/ppc/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index e8ae96cd46..4a0be4d70c 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -6664,7 +6664,8 @@ static void ppc_tr_init_disas_context(DisasContextBase
*dcbase, CPUState *cs)
ctx->access_type = -1;
ctx->need_access_type = !mmu_is_64bit(env->mmu_model);
ctx->le_mode = (hflags >> HFLAGS_LE) & 1;
- ctx->default_tcg_memop_mask = ctx->le_mode ? MO_LE : MO_BE;
+ ctx->default_tcg_memop_mask = (!need_addrswizzle_le(ctx) &&
+ ctx->le_mode) ? MO_LE : MO_BE;
ctx->flags = env->flags;
#if defined(TARGET_PPC64)
ctx->excp_model = env->excp_model;
--
2.39.5
- Re: [RFC PATCH 03/11] target/ppc: introduce gen_st_tl() function, (continued)
- [RFC PATCH 04/11] target/ppc: replace tcg_gen_qemu_st_tl() with gen_st_tl(), Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 06/11] target/ppc: introduce gen_addr_swizzle_le() function, Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 07/11] target/ppc: implement address swizzle for instruction translation, Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 05/11] target/ppc: introduce need_addrswizzle_le() function, Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 08/11] target/ppc: implement address swizzle for gen_ld_atomic(), Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 11/11] target/ppc: update DisasContext default_tcg_memop_mask value,
Mark Cave-Ayland <=
- [RFC PATCH 09/11] target/ppc: implement address swizzle for gen_st_atomic(), Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 10/11] target/ppc: implement address swizzle for gen_conditional_store(), Mark Cave-Ayland, 2024/12/12
- [RFC PATCH 02/11] target/ppc: replace tcg_gen_qemu_ld_tl() with gen_ld_tl(), Mark Cave-Ayland, 2024/12/12