diff options
author | Richard Henderson <rth@redhat.com> | 2003-06-24 17:11:33 -0700 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2003-06-25 00:11:33 +0000 |
commit | bfa0c519308cee548a7cf55df731826a38a96f95 (patch) | |
tree | 07f9d16ec822ee7be90b343888e46d9c530ec5b8 /gcc | |
parent | c1a6244090a7e051b75d05e62a78beb9ff4eca4c (diff) | |
download | gcc-bfa0c519308cee548a7cf55df731826a38a96f95.tar.gz |
real.h (ieee_extended_intel_96_round_53_format): New.
* real.h (ieee_extended_intel_96_round_53_format): New.
* real.c (ieee_extended_intel_96_round_53_format): New.
* config/i386/freebsd.h (SUBTARGET_OVERRIDE_OPTIONS): Use it
for XFmode and TFmode.
From-SVN: r68445
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/freebsd.h | 10 | ||||
-rw-r--r-- | gcc/real.c | 19 | ||||
-rw-r--r-- | gcc/real.h | 1 |
4 files changed, 38 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65daaddbac9..cd02e3fde5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-06-24 Richard Henderson <rth@redhat.com> + (blame to: Loren James Rittle <ljrittle@acm.org>) + + * real.h (ieee_extended_intel_96_round_53_format): New. + * real.c (ieee_extended_intel_96_round_53_format): New. + * config/i386/freebsd.h (SUBTARGET_OVERRIDE_OPTIONS): Use it + for XFmode and TFmode. + 2003-06-24 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.md (4 anonymous patterns): Give internal diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h index 64b152f0d49..52dcf1bc4c2 100644 --- a/gcc/config/i386/freebsd.h +++ b/gcc/config/i386/freebsd.h @@ -133,3 +133,13 @@ Boston, MA 02111-1307, USA. */ #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 + +/* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the + compiler get the contents of <float.h> and std::numeric_limits correct. */ +#define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + real_format_for_mode[XFmode - QFmode] \ + = &ieee_extended_intel_96_round_53_format; \ + real_format_for_mode[TFmode - QFmode] \ + = &ieee_extended_intel_96_round_53_format; \ + } while (0) diff --git a/gcc/real.c b/gcc/real.c index 4e1dc227f12..b491d885a9f 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -3326,6 +3326,25 @@ const struct real_format ieee_extended_intel_128_format = true }; +/* The following caters to i386 systems that set the rounding precision + to 53 bits instead of 64, e.g. FreeBSD. */ +const struct real_format ieee_extended_intel_96_round_53_format = + { + encode_ieee_extended, + decode_ieee_extended, + 2, + 1, + 53, + 53, + -16381, + 16384, + 79, + true, + true, + true, + true, + true + }; /* IBM 128-bit extended precision format: a pair of IEEE double precision numbers whose sum is equal to the extended precision value. The number diff --git a/gcc/real.h b/gcc/real.h index 56afd0e518c..71e3cc4b6b9 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -234,6 +234,7 @@ extern const struct real_format ieee_double_format; extern const struct real_format mips_double_format; extern const struct real_format ieee_extended_motorola_format; extern const struct real_format ieee_extended_intel_96_format; +extern const struct real_format ieee_extended_intel_96_round_53_format; extern const struct real_format ieee_extended_intel_128_format; extern const struct real_format ibm_extended_format; extern const struct real_format mips_extended_format; |