From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C05Cu-0006JZ-P9 for qemu-devel@nongnu.org; Wed, 25 Aug 2004 17:21:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C05Cs-0006IT-UE for qemu-devel@nongnu.org; Wed, 25 Aug 2004 17:21:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C05Cs-0006IJ-Ov for qemu-devel@nongnu.org; Wed, 25 Aug 2004 17:21:22 -0400 Received: from [213.80.72.10] (helo=kubrik.opensource.se) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C058G-0004tV-1d for qemu-devel@nongnu.org; Wed, 25 Aug 2004 17:16:36 -0400 Received: from 192.168.1.16 (unknown [213.80.72.14]) by kubrik.opensource.se (Postfix) with ESMTP id A1AA73752C for ; Wed, 25 Aug 2004 23:04:43 +0200 (CEST) From: Magnus Damm Content-Type: multipart/mixed; boundary="=-qOyrW9x5REJKfPS8iFjM" Message-Id: <1093468993.3240.11.camel@kubu.opensource.se> Mime-Version: 1.0 Date: Wed, 25 Aug 2004 23:23:14 +0200 Subject: [Qemu-devel] [PATCH] powerpc assemby endian fix Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --=-qOyrW9x5REJKfPS8iFjM Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-qOyrW9x5REJKfPS8iFjM Content-Disposition: attachment; filename=qemu-cvs_20040825-ppc-dis.patch Content-Type: text/x-patch; name=qemu-cvs_20040825-ppc-dis.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit 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); } --=-qOyrW9x5REJKfPS8iFjM--