From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12730 invoked by alias); 12 Mar 2015 21:25:54 -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 12715 invoked by uid 89); 12 Mar 2015 21:25:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=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; Thu, 12 Mar 2015 21:25:51 +0000 X-Halon-ID: 5876900e-c8fe-11e4-9958-0050569116f7 Authorized-sender: jiri@gaisler.se Received: from [192.168.9.20] (unknown [46.246.50.236]) by bin-vsp-out-03.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Thu, 12 Mar 2015 22:25:45 +0100 (CET) Message-ID: <55020453.9080502@gaisler.se> Date: Thu, 12 Mar 2015 21:25: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 v3 03/14] sim/erc32: Switched emulated memory to host endian order. References: <1425244244-27709-1-git-send-email-jiri@gaisler.se> <1425244244-27709-4-git-send-email-jiri@gaisler.se> <20150302011342.GH19363@vapier> In-Reply-To: <20150302011342.GH19363@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vTcRsOK8XNLcKkG31oivnrL66kxdCTM2J" X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00382.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vTcRsOK8XNLcKkG31oivnrL66kxdCTM2J Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 565 On 02/03/15 02:13, Mike Frysinger wrote: >> +#ifdef HOST_LITTLE_ENDIAN >> > + for (i =3D 0; i < (count / 4); i++) wbuffer[i] =3D ntohl(wbuffe= r[i]); // endian swap >> > +#endif > sim-endian.h already provides a lot of helper funcs that i'm pretty sure = you=20 > can use here. >=20 I don't understand why ntohl() is a problem. It is a common Posix function that converts big endian to host endian, exactly what is needed. Using sim-endian.h pulls in a lot of the sim-*.c files due to dependencies and makes the simulator larger than necessary .... Jiri. --vTcRsOK8XNLcKkG31oivnrL66kxdCTM2J 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/ iQIcBAEBAgAGBQJVAgRaAAoJEIAIwBKmO2+b9P4QAMU8MXyA/A0xqtizOG8pwwe0 S88td4uLva02h680Rqrqnc8+qe9zE8ANwdAqvcEqkUBgcs09fey4UR+Yv6GwLwUK a2dvywjavR/51ZQrwgdGfa5UKPsIEq16ngITj0/bjw4sFZiPHTTXWKgp7TS8zs3h DDS+8IBcpU4HbBsTb0eEOTHQVuiEzYGw1toWVD0mm3/9wVFss9zAbodz8L0xmyJY t7vgS6u4eWhJ4HTd+PTRCxqL1dNpwrxTcfONajNNV3+9pinT0fD0CihaMSJQTnx9 xnw8C3kAEUsvuAUi97op6emR4HJj69QOQZXSoC0snVDjqsDc0NJNqJvZ30Kssuu8 W1eog4oE8WJ+0vdTpQJ1JvtMG0T1QZWYD6ofpDZV8Aa/iP7xCsXkKzSg3wjnqS2b oNKGVAcWdJj8fsReTm21RvZ7WkYMM/KsNTriZ0VPbjG2a8R3OXKl+JJL8ZJ4J5OM thjRRmiR42yIJcG7rIvIHHoI3e7fcWRSL0+4KjAOGxi5O1oxHapVHYFLYyQ4zx3o NB51Wa/0YLhzkcyS0WNIE2NTuIFaGST2KB0fyW/rXW++BUmeZwsAQ5alxz4SUy2w Ect7l/PfCoB+jThuUruNkRnPtn+ubF1GgYuDM9Bwltmkg0LvSLUVJdBuSWmdpTTA eUx0je7FAxzfaYGT/EFh =zUoJ -----END PGP SIGNATURE----- --vTcRsOK8XNLcKkG31oivnrL66kxdCTM2J--