From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29998 invoked by alias); 31 Aug 2005 07:52:50 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29866 invoked by uid 22791); 31 Aug 2005 07:52:35 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 31 Aug 2005 07:52:35 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j7V7qXYK012011; Wed, 31 Aug 2005 09:52:33 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j7V7qWAn012367; Wed, 31 Aug 2005 09:52:32 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j7V7qLi2031393; Wed, 31 Aug 2005 09:52:21 +0200 (CEST) Date: Wed, 31 Aug 2005 08:48:00 -0000 Message-Id: <200508310752.j7V7qLi2031393@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: gdb-patches@sourceware.org, binutils@sourceware.org CC: dj@redhat.com, raeburn@raeburn.org, pkoning@equallogic.com, jbglaw@lug-owl.de, nick@redhat.com, gcc-patches@gcc.gnu.org In-reply-to: <348FDCE8-5D87-4C13-AB77-B4BD4E47F9C5@raeburn.org> (message from Ken Raeburn on Mon, 22 Aug 2005 17:42:20 -0400) Subject: Re: [RFA] Add some VAX floating point formats to floatformat.[ch] References: <200508212153.j7LLrJXJ006901@elgar.sibelius.xs4all.nl> <348FDCE8-5D87-4C13-AB77-B4BD4E47F9C5@raeburn.org> X-SW-Source: 2005-08/txt/msg00263.txt.bz2 Thanks folks, Took me a while to digest all the comments I got on this one.. And then a VAX isn't actually that fast, even if you simulate it on a blazingly fast amd64 machine, so it took some time to test. Here's a new patch, with the variables renamed, and somewhat better comments. DJ, if this is ok, can you check this in for me? Thanks, Mark Index: include/ChangeLog from Mark Kettenis * floatformat.h (enum floatformat_byteorders): Add floatformat_vax. (floatformat_vax_aingle, floatformat_vax_double): Declare. Index: include/floatformat.h =================================================================== RCS file: /cvs/src/src/include/floatformat.h,v retrieving revision 1.12 diff -u -p -r1.12 floatformat.h --- include/floatformat.h 17 Aug 2005 18:03:25 -0000 1.12 +++ include/floatformat.h 31 Aug 2005 07:39:01 -0000 @@ -29,25 +29,26 @@ Foundation, Inc., 51 Franklin Street - F (i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field contains with the *_start and *_len fields. */ -/* What is the order of the bytes. */ +/* What is the order of the bytes? */ enum floatformat_byteorders { - /* Standard little endian byte order. EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */ - floatformat_little, /* Standard big endian byte order. EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */ - floatformat_big, /* Little endian byte order but big endian word order. EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */ + floatformat_littlebyte_bigword, - floatformat_littlebyte_bigword - + /* VAX byte order. Little endian byte order with 16-bit words. The + following example is an illustration of the byte order only; VAX + doesn't have a fully IEEE compliant floating-point format. + EX: 1.2345678e10 => 80 c5 00 00 06 42 e0 fe */ + floatformat_vax }; enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no }; @@ -97,6 +98,12 @@ extern const struct floatformat floatfor extern const struct floatformat floatformat_ieee_double_littlebyte_bigword; +/* floatformats for VAX. */ + +extern const struct floatformat floatformat_vax_f; +extern const struct floatformat floatformat_vax_d; +extern const struct floatformat floatformat_vax_g; + /* floatformats for various extendeds. */ extern const struct floatformat floatformat_i387_ext; Index: libiberty/ChangeLog from Mark Kettenis * floatformat.c (floatformat_vax_aingle, floatformat_vax_double): New variables. Index: libiberty/floatformat.c =================================================================== RCS file: /cvs/src/src/libiberty/floatformat.c,v retrieving revision 1.16 diff -u -p -r1.16 floatformat.c --- libiberty/floatformat.c 17 Aug 2005 18:03:42 -0000 1.16 +++ libiberty/floatformat.c 31 Aug 2005 07:39:06 -0000 @@ -108,6 +108,30 @@ const struct floatformat floatformat_iee floatformat_always_valid }; +/* floatformat for VAX. Not quite IEEE, but close enough. */ + +const struct floatformat floatformat_vax_f = +{ + floatformat_vax, 32, 0, 1, 8, 129, 0, 9, 23, + floatformat_intbit_no, + "floatformat_vax_f", + floatformat_always_valid +}; +const struct floatformat floatformat_vax_d = +{ + floatformat_vax, 64, 0, 1, 8, 129, 0, 9, 55, + floatformat_intbit_no, + "floatformat_vax_d", + floatformat_always_valid +}; +const struct floatformat floatformat_vax_g = +{ + floatformat_vax, 64, 0, 1, 11, 1025, 0, 12, 52, + floatformat_intbit_no, + "floatformat_vax_g", + floatformat_always_valid +}; + static int floatformat_i387_ext_is_valid (const struct floatformat *fmt, const void *from);