aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-06-03 14:32:43 +0000
committerAndreas Schwab <schwab@gcc.gnu.org>2007-06-03 14:32:43 +0000
commitb6a9c30c80a0713b0b27f434dfe34b0552fc7384 (patch)
treeb23bf23815638d9880bbb2f271bb74a3a45a507c /gcc/real.c
parent4889b20e236b872403df3112167b1d81c00110fe (diff)
downloadgcc-b6a9c30c80a0713b0b27f434dfe34b0552fc7384.zip
gcc-b6a9c30c80a0713b0b27f434dfe34b0552fc7384.tar.gz
gcc-b6a9c30c80a0713b0b27f434dfe34b0552fc7384.tar.bz2
m68k.c (override_options): Don't override REAL_MODE_FORMAT.
* config/m68k/m68k.c (override_options): Don't override REAL_MODE_FORMAT. * config/m68k/m68k-modes.def (SF, DF): Define to use motorola_single_format and motorola_double_format, resp. * real.c (motorola_single_format): Renamed from coldfire_single_format. (motorola_double_format): Renamed from coldfire_double_format. (encode_ieee_extended): Generate a proper canonical NaN image respecting canonical_nan_lsbs_set. (ieee_extended_motorola_format): Set canonical_nan_lsbs_set to true. * real.h: Adjust declarations. From-SVN: r125295
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/real.c b/gcc/real.c
index 867fdc7..9a84329 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -1,6 +1,6 @@
/* real.c - software floating point emulation.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Contributed by Stephen L. Moshier (moshier@world.std.com).
Re-written by Richard Henderson <rth@redhat.com>
@@ -2774,7 +2774,7 @@ const struct real_format mips_single_format =
true
};
-const struct real_format coldfire_single_format =
+const struct real_format motorola_single_format =
{
encode_ieee_single,
decode_ieee_single,
@@ -3019,7 +3019,7 @@ const struct real_format mips_double_format =
true
};
-const struct real_format coldfire_double_format =
+const struct real_format motorola_double_format =
{
encode_ieee_double,
decode_ieee_double,
@@ -3082,7 +3082,15 @@ encode_ieee_extended (const struct real_format *fmt, long *buf,
if (fmt->has_nans)
{
image_hi |= 32767;
- if (HOST_BITS_PER_LONG == 32)
+ if (r->canonical)
+ {
+ if (fmt->canonical_nan_lsbs_set)
+ {
+ sig_hi = (1 << 30) - 1;
+ sig_lo = 0xffffffff;
+ }
+ }
+ else if (HOST_BITS_PER_LONG == 32)
{
sig_hi = r->sig[SIGSZ-1];
sig_lo = r->sig[SIGSZ-2];
@@ -3364,7 +3372,7 @@ const struct real_format ieee_extended_motorola_format =
true,
true,
true,
- false
+ true
};
const struct real_format ieee_extended_intel_96_format =