* [Qemu-devel] [PATCH] powerpc assemby endian fix
@ 2004-08-25 21:23 Magnus Damm
2004-08-25 22:32 ` Fabrice Bellard
0 siblings, 1 reply; 3+ messages in thread
From: Magnus Damm @ 2004-08-25 21:23 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
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
[-- Attachment #2: qemu-cvs_20040825-ppc-dis.patch --]
[-- Type: text/x-patch, Size: 630 bytes --]
Index: ppc-dis.c
===================================================================
RCS file: /cvsroot/qemu/qemu/ppc-dis.c,v
retrieving revision 1.3
diff -u -r1.3 ppc-dis.c
--- ppc-dis.c 20 May 2004 21:50:40 -0000 1.3
+++ ppc-dis.c 25 Aug 2004 21:15:59 -0000
@@ -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);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-26 7:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-25 21:23 [Qemu-devel] [PATCH] powerpc assemby endian fix Magnus Damm
2004-08-25 22:32 ` Fabrice Bellard
2004-08-26 7:21 ` Magnus Damm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).