From: Magnus Damm <damm@opensource.se>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] powerpc assemby endian fix
Date: Wed, 25 Aug 2004 23:23:14 +0200 [thread overview]
Message-ID: <1093468993.3240.11.camel@kubu.opensource.se> (raw)
[-- 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);
}
next reply other threads:[~2004-08-25 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-25 21:23 Magnus Damm [this message]
2004-08-25 22:32 ` [Qemu-devel] [PATCH] powerpc assemby endian fix Fabrice Bellard
2004-08-26 7:21 ` Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1093468993.3240.11.camel@kubu.opensource.se \
--to=damm@opensource.se \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).