Skip to contentSkip to conversation

PPC64 target: Fix typo in gen_qemu_ld32s

PATCH Applied Alexander Graf 2 participants 2 messages Feb 27, 2009 – Feb 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PPC64 target: Fix typo in gen_qemu_ld32s

When the CPU is in little endian mode, it should load values from RAM in byte swapped manner. This check is in all the ld and st functions, but misspelled in gen_qemu_ld32s.

This patch fixes the misspelling and makes ppc64 Linux happier.

---
 target-ppc/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-ppc/translate.c +1 -1
index f01a1cf..2a06e4c 100644
@@ -2624,7 +2624,7 @@ static always_inline void gen_qemu_ld32u(DisasContext *ctx, TCGv arg1, TCGv arg2
 #if defined(TARGET_PPC64)
 static always_inline void gen_qemu_ld32s(DisasContext *ctx, TCGv arg1, TCGv arg2)
 {
-    if (unlikely(ctx->mem_idx)) {
+    if (unlikely(ctx->le_mode)) {
         TCGv_i32 t0;
         tcg_gen_qemu_ld32u(arg1, arg2, ctx->mem_idx);
         t0 = tcg_temp_new_i32();
Signature · 1 line
1.6.0.2
Applied
#1 lore raw
Quoted 7 lines · Alexander Graf

When the CPU is in little endian mode, it should load values from RAM
in byte swapped manner. This check is in all the ld and st functions, but misspelled in gen_qemu_ld32s.

This patch fixes the misspelling and makes ppc64 Linux happier.

Thanks, applied as r6654.