From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116559 invoked by alias); 10 Jun 2016 18:06:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 116545 invoked by uid 89); 10 Jun 2016 18:06:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Jun 2016 18:06:47 +0000 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 905DE340A2B; Fri, 10 Jun 2016 18:06:45 +0000 (UTC) Date: Fri, 10 Jun 2016 18:06:00 -0000 From: Mike Frysinger To: Jim Wilson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] aarch64 sim big-endian support Message-ID: <20160610180645.GA4053@vapier.lan> Mail-Followup-To: Jim Wilson , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00198.txt.bz2 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 705 On 02 Jun 2016 19:36, Jim Wilson wrote: > aarch64_step (sim_cpu *cpu) > { > uint64_t pc =3D aarch64_get_PC (cpu); > + enum bfd_endian saved_target_byte_order; >=20=20 > if (pc =3D=3D TOP_LEVEL_RETURN_PC) > return FALSE; >=20=20 > aarch64_set_next_PC (cpu, pc + 4); > + > + /* Code is always little-endian. */ > + saved_target_byte_order =3D current_target_byte_order; > + current_target_byte_order =3D BFD_ENDIAN_LITTLE; > aarch64_get_instr (cpu) =3D aarch64_get_mem_u32 (cpu, pc); > + current_target_byte_order =3D saved_target_byte_order; i don't think you should be messing with global state. the sim core has functions for reading raw opcodes if that's what you need. -mike --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXWwGxAAoJEEFjO5/oN/WBMmoQAISECI/Cr9Kh5F6XHCm2vCij A9SWN8IlEMW7iCtBBvNvsk6dWqHmsjhOHEXvVq94rDpuAJGK6B3wUntfWdsuY8b/ TtkLAQ3AzHV9ZR0cpIwCuFLApBo5mcF/vZQDz2c0yc2A40Gnah7Ky5ox3Kmt6Gsr h5DVDJMOoFcsBl1q2v0RD3ujy6IgfK+FdHRakQjb5F0acN46YNBu+e6WiTSMChc7 mRitNPU3BbJuwfQX3HULQNinnvRbPWBAYPKJIeudM76fHc4NAlkiuBG9D1p3J5Kx SkHPEjyiE6u2qh7NPVj/Z05VPRy3Jm6gDcUH8ljIbOMowDXtkhRwl429qHJgqWJF wdnAbZ1JNWziPV3M6emehYM4QaY/jf/J/AAQbF4K5Hz/f1w20/XwMsPa1Pb3e9SK oBx+2l3DeM++latT2AqehbEqRBR5HMjI8l/2yAuGx7/a4pcxamisC/4xGc+3t2TW U9Gx4FHaayk+teYaY/4Cl3rY3FIFnUrtfQZ1JQkgteYGb3NZ3Ih2b+z64vdSvf6s +nvwiN+E5yhF2/WmdMQY9Nt5OErK2bO/tQf8sU+Ka/mm1/HizfHkamJRHIJCmUjr 6pRd8d1DcfR735fyhNzOQtMBhcGvQ9ngPA0SVgydmQJX7VeSTyeaRLxn/polevya PaGj4yHCG7luaBWZyDmm =NJ2p -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--