From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: gdb-patches@sourceware.org, binutils@sourceware.org, gcc-patches@gcc.org
Subject: [RFA] Add some VAX floating point formats to floatformat.[ch]
Date: Sun, 21 Aug 2005 21:59:00 -0000 [thread overview]
Message-ID: <200508212153.j7LLrJXJ006901@elgar.sibelius.xs4all.nl> (raw)
This patch adds support for the two VAX floating-point formats used by
GCC for 'float' and 'double'. The real guts are in gdb/doublest.c
(which I wil post later to the gdb list); this only adds the
description.
ok?
Mark
Index: include/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* 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 21 Aug 2005 21:48:26 -0000
@@ -29,25 +29,23 @@ 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. */
+ floatformat_vax
};
enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
@@ -97,6 +95,11 @@ extern const struct floatformat floatfor
extern const struct floatformat floatformat_ieee_double_littlebyte_bigword;
+/* floatformats for VAX. */
+
+extern const struct floatformat floatformat_vax_single;
+extern const struct floatformat floatformat_vax_double;
+
/* floatformats for various extendeds. */
extern const struct floatformat floatformat_i387_ext;
Index: libiberty/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* 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 21 Aug 2005 21:48:31 -0000
@@ -108,6 +108,23 @@ const struct floatformat floatformat_iee
floatformat_always_valid
};
+/* floatformat for VAX. Not quite IEEE, but close enough. */
+
+const struct floatformat floatformat_vax_single =
+{
+ floatformat_vax, 32, 0, 1, 8, 129, 0, 9, 23,
+ floatformat_intbit_no,
+ "floatformat_vax_single",
+ floatformat_always_valid
+};
+const struct floatformat floatformat_vax_double =
+{
+ floatformat_vax, 64, 0, 1, 8, 129, 0, 9, 55,
+ floatformat_intbit_no,
+ "floatformat_vax_single",
+ floatformat_always_valid
+};
+
static int floatformat_i387_ext_is_valid (const struct floatformat *fmt,
const void *from);
next reply other threads:[~2005-08-21 21:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-21 21:59 Mark Kettenis [this message]
2005-08-22 10:22 ` Nick Clifton
2005-08-22 11:53 ` Mark Kettenis
2005-08-22 16:07 ` Nick Clifton
2005-08-22 16:26 ` Jan-Benedict Glaw
2005-08-22 18:32 ` Paul Koning
2005-08-22 18:40 ` DJ Delorie
2005-08-23 21:58 ` Ken Raeburn
2005-08-31 8:48 ` Mark Kettenis
2005-08-31 17:30 ` Jan-Benedict Glaw
[not found] ` <200508312142.j7VLgn8f019978@elgar.sibelius.xs4all.nl>
2005-11-02 10:20 ` Jan-Benedict Glaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200508212153.j7LLrJXJ006901@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=binutils@sourceware.org \
--cc=gcc-patches@gcc.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox