From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15490 invoked by alias); 22 Feb 2015 21:43:23 -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 15474 invoked by uid 89); 22 Feb 2015 21:43:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-02.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-02.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 22 Feb 2015 21:43:15 +0000 X-Halon-ID: ca31131c-badb-11e4-891e-005056917f90 Authorized-sender: jiri@gaisler.se Received: from [192.168.9.20] (unknown [78.68.173.120]) by bin-vsp-out-02.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Sun, 22 Feb 2015 22:43:08 +0100 (CET) Message-ID: <54EA4D6B.70407@gaisler.se> Date: Sun, 22 Feb 2015 21:43:00 -0000 From: Jiri Gaisler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 04/23] sim/erc32: Add FPU support on x86_64 hosts. References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> <1424159099-5148-5-git-send-email-jiri@gaisler.se> <20150217090529.GJ20008@vapier> <54E64B65.4050906@gaisler.se> <20150222044012.GD25220@vapier> In-Reply-To: <20150222044012.GD25220@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mD2AQ73cfvNtCwhr6FVvcabRxuoufIv3b" X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00641.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mD2AQ73cfvNtCwhr6FVvcabRxuoufIv3b Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1547 On 02/22/2015 05:40 AM, Mike Frysinger wrote: > On 19 Feb 2015 21:45, Jiri Gaisler wrote: >> On 02/17/2015 10:05 AM, Mike Frysinger wrote: >>> On 17 Feb 2015 08:44, Jiri Gaisler wrote: >>>> * float.c (get_accex) access FPU control and status words on x64 >>> >>> shouldn't you gut this file and use instead for a portable met= hod ? >>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html >>> >>> at the very least, you could cut over to ... >> >> I will switch to fenv.h, but this will produce less accurate results >> on Intel hardware. double on SPARC V8 has 53-bit mantissa while Intel has >> both 53- and 64-bit, and 64-bit is default. To get accurate SPARC V8 FPU >> operations, the Intel FPU should be switched to 53-bit, but the fenv.h >> does not have an API for this. I guess we will have to live with that ... >=20 > if you wanted to keep a little inline asm to just that particular bit twi= ddle,=20 > that should be fine. Can't be bothered, I like the idea of dropping the assembly fully. >=20 > normally the sims are functional ... but i guess this part of the simulat= or is=20 > relying on the inaccuracies of floating point to trade for speed ? > -mike Yes, instead of emulating the FPU (soft-float libs) we use the host FPU dir= ectly. Works fine when the host is standard IEEE-754 compatible, but can lead to m= inor discrepancies when the host has extended precision (like Intel/AMD). If som= ebody really cares, he can run sis on a non-x86 box (SPARC, ARM or PowerPC). Jiri. --mD2AQ73cfvNtCwhr6FVvcabRxuoufIv3b 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/ iQIcBAEBAgAGBQJU6k1rAAoJEIAIwBKmO2+baqcQAKw3+I7NslsKGuAu0otEc+I6 FyVP5jje+84I6t9n8CWXWJ727seSphcVR56bcpUDlU3aHpVc4g68ez4OgAkmMv5R qmJ/cBAgporj+x9bTq3e77fymkgacMJ+sTfOp+efNHQ+gRxX9OBQpMr7Nd6HfyTc Ue0W9A87Cv7M9x6AkdtKzLRMmPsTpMUAweN7obtiwoFIJBx9A0J4PyBXkD/0Mym6 ihYLQu8T7MEzY/shjMW8I3U4bTB6plpeczqFzRKUyHC3I/1H1DVNgElQPsgITU1P u077LuuZ5PksI6a6N+V/+TYSdPCytEXCSvnynX7FUXlhQ98xSH+CGeVHXWXlTHmm ly1WB/qIaqwZ29ogvATe05UMtiiqjlzolRvcQAXp41knFYB+3d72mqDebmowot7q oIZzxM1gsrNXEBzeKwqNeSiKRqqySnk5zVexUvs7ZNbGVS/fQUA/a+2DCVKEzd0u geaR5XRWRyS4z0yIAAOT/2KxPPqrwLhoQ5pHJ40tW/V0sm3aStwGPkvh5kwSMG5I Vivxfwgfyoes0Gxrx6CEL2k98+kNhoe7of39m97E6b6JEZGPx0CUGfX4Hfnkg/wW 2n3vZRN8hOG5KZwrmgOXZdljz/e6p1lIY9JQYMmpmAo0hHOrM60srR4B9zPyicpQ rTI2IAYGc9LJq3RZEblw =u/9O -----END PGP SIGNATURE----- --mD2AQ73cfvNtCwhr6FVvcabRxuoufIv3b--