qemu-ppc
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]