Skip to contentSkip to conversation

powerpc assemby endian fix

PATCH In review Magnus Damm 2 participants 3 messages Aug 25, 2004 – Aug 26, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc assemby endian fix

Hello there,

This patch makes the endian right when it comes to disassemble for the host (-d out_asm) when running on a PowerPC.

Thanks!

/ magnus

Index: ppc-dis.c
===================================================================
RCS file: /cvsroot/qemu/qemu/ppc-dis.c,v
retrieving revision 1.3

ppc-dis.c +6 -1
diff -u -r1.3 ppc-dis.c
@@ -3078,7 +3078,12 @@
     uint32_t opc;
 
     (*info->read_memory_func)(pc, (bfd_byte *)(&opc), 4, info);
-    return print_insn_powerpc (info->stream, tswap32(opc), pc,
+
+    if (info->endian == BFD_ENDIAN_LITTLE) {
+        opc = tswap32(opc);
+    }
+
+    return print_insn_powerpc (info->stream, opc, pc,
                                PPC | B32 | M601);
 }
 
#1 lore raw

Try my patch...

Fabrice.

Quoted 8 lines · Magnus Damm

Hello there,

This patch makes the endian right when it comes to disassemble for the host (-d out_asm) when running on a PowerPC.

Thanks!

/ magnus

#2 lore raw

Hi again,

Rev 1.4 works much better for me. Thanks!

/ magnus

Quoted 20 lines · Fabrice Bellard

Try my patch...

Fabrice.

Quoted 8 lines · Magnus Damm

Hello there,

This patch makes the endian right when it comes to disassemble for the host (-d out_asm) when running on a PowerPC.

Thanks!

/ magnus

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel