From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107362 invoked by alias); 28 Mar 2015 08:21:37 -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 107353 invoked by uid 89); 28 Mar 2015 08:21:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-03.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-03.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 28 Mar 2015 08:21:34 +0000 X-Halon-ID: 6f08708c-d523-11e4-9958-0050569116f7 Authorized-sender: jiri@gaisler.se Received: from [192.168.9.20] (unknown [78.68.139.28]) by bin-vsp-out-03.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Sat, 28 Mar 2015 09:21:29 +0100 (CET) Message-ID: <55166489.5080003@gaisler.se> Date: Sat, 28 Mar 2015 08:21:00 -0000 From: Jiri Gaisler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH v4 03/13] sim/erc32: Switched emulated memory to host endian order. References: <1426626170-21401-1-git-send-email-jiri@gaisler.se> <1426626170-21401-4-git-send-email-jiri@gaisler.se> <20150323024519.GB8039@vapier> <550FD646.7040905@gaisler.se> <20150328074106.GR30239@vapier> In-Reply-To: <20150328074106.GR30239@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kvwkbLSFelxSREEo8JlNkS0ur1lfWvaw9" X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00942.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kvwkbLSFelxSREEo8JlNkS0ur1lfWvaw9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1281 On 28/03/15 08:41, Mike Frysinger wrote: > On 23 Mar 2015 10:00, Jiri Gaisler wrote: >> On 23/03/15 03:45, Mike Frysinger wrote: >>> On 17 Mar 2015 22:02, Jiri Gaisler wrote: >>>> --- a/sim/erc32/erc32.c >>>> +++ b/sim/erc32/erc32.c >>>> +#ifdef HOST_LITTLE_ENDIAN >>>> + waddr ^=3D 3; >>>> +#endif >>>> + mem[waddr] =3D *data & 0x0ff; >>> >>> doesn't this assume the target is big endian ? this shows up a few tim= es in=20 >>> the changes to this file. >> >> The target (SPARC) is always big endian, so I believe this is correct. >=20 > wikipedia says: > The endianness of the 32-bit SPARC V8 architecture is purely big-endian. = The=20 > 64-bit SPARC V9 architecture uses big-endian instructions, but can access= data=20 > in either big-endian or little-endian byte order, chosen either at the=20 > application instruction (load/store) level or at the memory page level (v= ia an=20 > MMU setting). The latter is often used for accessing data from inherently= =20 > little-endian devices, such as those on PCI buses. >=20 > but i guess that'll need quite a bit of work to fix up ? The sis simulator is strictly SPARC V8 (32-bit), so there is nothing to fix= up really. I have no plans to add V9 (64-bit) so staying big endian should be safe. Jiri. > -mike >=20 --kvwkbLSFelxSREEo8JlNkS0ur1lfWvaw9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 884 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJVFmSJAAoJEIAIwBKmO2+bzpAQAKB7/XNU1o2NbUa6/XR/Jl+w XAxgdAqjC6Dw6DzNDe1WF7et17/+EW6k7mK0VTJPkspCHk5aaWTCeXMKKIRFjLni sj99L/6RmsFmB1u1RQR401LVxcy5gFNVmTPesl9cB3R97N1J6YStAcZmm7Y2c7BS Z0Y5TeG9CO92AMNBvu0L/Bhl8/HALfQhh2hNf5biFXnLaps5LhCJKOjhRRwCfmVS K9pIGYl4Ng+7BxxSoxjCpJywznQaAoI62mxbI+JLstZ3b23OhIN0LaM0Dnu77pvq PvKwd5mrJR7ukcgK6alTcKwPuSz1OpUCLhMdUuVDCujrhlLhCpDA4guAMAgqmZaY 8eAcckXuOoOoh5rKTnsK2To2r5SsGsbe4A+V70EKEH1cLxI589kk4lvgNdtqDvXQ MYTAMp5bMxhvQSYURRTecgH5GwC95dSjrMzxalgfijS+5ZDHT+kpcZ4KTx2zPo8y TzpzMZi6VS7qCl35xdCwRPHK+yW8FR8f6mA+oJVm/FoA7CWVfulvidlKMY17iAWy 8JxWSFpRKLPtFnG4rF3qeMy1Cow5N+V+tezKOuj7ezRLMdTBLbnU3n2DlPxcn0oQ 3+3GUACYsYFJiRObe6NCh5kfWTU8xkjlz28Hmnfkq8bXI4TrNzGP54SWNxP3FUv1 +M5GFIYJpE8k7LpMqg5m =6JOT -----END PGP SIGNATURE----- --kvwkbLSFelxSREEo8JlNkS0ur1lfWvaw9--