diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index d96d1eddb73a4bbab38461cf95b529c10940f29f..2ac5794add7877655c1a62f2d2d16dad603b7c86 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -9689,7 +9689,7 @@ static inline void gen_intermediate_code_internal(CPUPPCState *env,
         }
         LOG_DISAS("translate opcode %08x (%02x %02x %02x) (%s)\n",
                     ctx.opcode, opc1(ctx.opcode), opc2(ctx.opcode),
-                    opc3(ctx.opcode), little_endian ? "little" : "big");
+                    opc3(ctx.opcode), ctx.le_mode ? "little" : "big");
         if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) {
             tcg_gen_debug_insn_start(ctx.nip);
         }