aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@gcc.gnu.org>1999-01-19 12:03:01 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>1999-01-19 12:03:01 +0000
commiteaa4b44cfc6743304718f03b61c8c3ef9ec91d0b (patch)
treeed369eff236e0ae27f442c15fba0966a72f573b4 /gcc
parent60409070a6daca63bbb2be39cefe8692e96ad952 (diff)
downloadgcc-eaa4b44cfc6743304718f03b61c8c3ef9ec91d0b.zip
gcc-eaa4b44cfc6743304718f03b61c8c3ef9ec91d0b.tar.gz
gcc-eaa4b44cfc6743304718f03b61c8c3ef9ec91d0b.tar.bz2
[multiple changes]
1999-01-19 Vladimir N. Makarov <vmakarov@cygnus.com> * invoke.texi (-mlong-double-64): New option description. 1999-01-19 Jim Wilson <wilson@cygnus.com> * libgcc2.c: Change all uses of LONG_DOUBLE_TYPE_SIZE to LIBGCC2_LONG_DOUBLE_TYPE_SIZE. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New. Set to LONG_DOUBLE_TYPE_SIZE if not defined. * i960/i960.h (MULTILIB_DEFAULTS): Define to mnumerics. (CPP_SPECS): Add -mlong-double-64 support. (TARGET_FLAG_LONG_DOUBLE_64, TARGET_LONG_DOUBLE_64): New. (TARGET_SWITCHES): Add -mlong-double-64 support. (LONG_DOUBLE_TYPE_SIZE): Likewise. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define. * i960/vx960-coff.h (MULTILIB_DEFAULTS): Define to msoft-float. (CPP_SPECS): Add -mlong-double-64 support. * i960/t-960bare (MULTILIB_OPTIONS): Add mlong-double-64. (MULTILIB_DIRNAMES): Add ld64. * i960/t-vxworks960 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Likewise. From-SVN: r24764
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog22
-rw-r--r--gcc/config/i960/i960.h24
-rw-r--r--gcc/config/i960/t-960bare4
-rw-r--r--gcc/config/i960/t-vxworks9604
-rw-r--r--gcc/config/i960/vx960-coff.h5
-rw-r--r--gcc/invoke.texi9
-rw-r--r--gcc/libgcc2.c26
7 files changed, 75 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b9ca3b7..da6bdc0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,25 @@
+1999-01-19 Vladimir N. Makarov <vmakarov@cygnus.com>
+
+ * invoke.texi (-mlong-double-64): New option description.
+
+1999-01-19 Jim Wilson <wilson@cygnus.com>
+
+ * libgcc2.c: Change all uses of LONG_DOUBLE_TYPE_SIZE to
+ LIBGCC2_LONG_DOUBLE_TYPE_SIZE.
+ (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New. Set to LONG_DOUBLE_TYPE_SIZE
+ if not defined.
+ * i960/i960.h (MULTILIB_DEFAULTS): Define to mnumerics.
+ (CPP_SPECS): Add -mlong-double-64 support.
+ (TARGET_FLAG_LONG_DOUBLE_64, TARGET_LONG_DOUBLE_64): New.
+ (TARGET_SWITCHES): Add -mlong-double-64 support.
+ (LONG_DOUBLE_TYPE_SIZE): Likewise.
+ (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define.
+ * i960/vx960-coff.h (MULTILIB_DEFAULTS): Define to msoft-float.
+ (CPP_SPECS): Add -mlong-double-64 support.
+ * i960/t-960bare (MULTILIB_OPTIONS): Add mlong-double-64.
+ (MULTILIB_DIRNAMES): Add ld64.
+ * i960/t-vxworks960 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Likewise.
+
Tue Jan 19 11:54:04 1999 Jason Merrill <jason@yorick.cygnus.com>
* calls.c (expand_call): Strip a TARGET_EXPR if we're passing by
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index 67b3dc7..f433b4c 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -24,6 +24,8 @@ Boston, MA 02111-1307, USA. */
/* Note that some other tm.h files may include this one and then override
many of the definitions that relate to assembler syntax. */
+#define MULTILIB_DEFAULTS { "mnumerics" }
+
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960 -Acpu(i960) -Amachine(i960)"
@@ -45,7 +47,8 @@ Boston, MA 02111-1307, USA. */
%{mcc:-D__i960CC__ -D__i960_CC__}\
%{mcf:-D__i960CF__ -D__i960_CF__}\
%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:\
- %{!mcc:%{!mcf:-D__i960_KB -D__i960KB__ %{mic*:-D__i960KB}}}}}}}}}"
+ %{!mcc:%{!mcf:-D__i960_KB -D__i960KB__ %{mic*:-D__i960KB}}}}}}}}}\
+ %{mlong-double-64:-D__LONG_DOUBLE_64__}"
/* -mic* options make characters signed by default. */
/* Use #if rather than ?: because MIPS C compiler rejects ?: in
@@ -209,6 +212,11 @@ extern int process_pragma ();
#define TARGET_FLAG_OLD_ALIGN 0x8000
#define TARGET_OLD_ALIGN (target_flags & TARGET_FLAG_OLD_ALIGN)
+/* Nonzero if long doubles are to be 64 bits. Useful for soft-float targets
+ if 80 bit long double support is missing. */
+#define TARGET_FLAG_LONG_DOUBLE_64 0x10000
+#define TARGET_LONG_DOUBLE_64 (target_flags & TARGET_FLAG_LONG_DOUBLE_64)
+
extern int target_flags;
/* Macro to define tables used to set the flags.
@@ -268,6 +276,7 @@ extern int target_flags;
{"no-strict-align", -(TARGET_FLAG_STRICT_ALIGN)}, \
{"old-align", (TARGET_FLAG_OLD_ALIGN|TARGET_FLAG_STRICT_ALIGN)}, \
{"no-old-align", -(TARGET_FLAG_OLD_ALIGN|TARGET_FLAG_STRICT_ALIGN)}, \
+ {"long-double-64", TARGET_FLAG_LONG_DOUBLE_64}, \
{"link-relax", 0}, \
{"no-link-relax", 0}, \
SUBTARGET_SWITCHES \
@@ -356,8 +365,17 @@ extern int target_flags;
/* Width in bits of a pointer. See also the macro `Pmode' defined below. */
#define POINTER_SIZE 32
-/* Width in bits of a long double. Identical to double for now. */
-#define LONG_DOUBLE_TYPE_SIZE 64
+/* Width in bits of a long double. Define to 96, and let
+ ROUND_TYPE_ALIGN adjust the alignment for speed. */
+#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_64 ? 64 : 96)
+
+/* Define this to set long double type size to use in libgcc2.c, which can
+ not depend on target_flags. */
+#if defined(__LONG_DOUBLE_64__)
+#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
+#else
+#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
+#endif
/* Allocation boundary (in *bits*) for storing pointers in memory. */
#define POINTER_BOUNDARY 32
diff --git a/gcc/config/i960/t-960bare b/gcc/config/i960/t-960bare
index c6be2a0..37929bb 100644
--- a/gcc/config/i960/t-960bare
+++ b/gcc/config/i960/t-960bare
@@ -16,8 +16,8 @@ xp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c
cat $(srcdir)/config/fp-bit.c >> xp-bit.c
-MULTILIB_OPTIONS=mnumerics/msoft-float
-MULTILIB_DIRNAMES=float soft-float
+MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64
+MULTILIB_DIRNAMES=float soft-float ld64
MULTILIB_MATCHES=mnumerics=msb mnumerics=msc mnumerics=mkb mnumerics=mkc mnumerics=mmc mnumerics=mcb mnumerics=mcc mnumerics=mjf msoft-float=msa msoft-float=mka msoft-float=mca msoft-float=mcf
LIBGCC = stmp-multilib
diff --git a/gcc/config/i960/t-vxworks960 b/gcc/config/i960/t-vxworks960
index c2dd5eb..851e7bd 100644
--- a/gcc/config/i960/t-vxworks960
+++ b/gcc/config/i960/t-vxworks960
@@ -19,8 +19,8 @@ xp-bit.c: $(srcdir)/config/fp-bit.c
echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c
cat $(srcdir)/config/fp-bit.c >> xp-bit.c
-MULTILIB_OPTIONS=mnumerics/msoft-float
-MULTILIB_DIRNAMES=float soft-float
+MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64
+MULTILIB_DIRNAMES=float soft-float ld64
MULTILIB_MATCHES=mnumerics=msb mnumerics=msc mnumerics=mkb mnumerics=mkc mnumerics=mmc mnumerics=mcb mnumerics=mcc msoft-float=msa msoft-float=mka msoft-float=mca msoft-float=mcf
LIBGCC = stmp-multilib
diff --git a/gcc/config/i960/vx960-coff.h b/gcc/config/i960/vx960-coff.h
index b2e93fb..91879dd 100644
--- a/gcc/config/i960/vx960-coff.h
+++ b/gcc/config/i960/vx960-coff.h
@@ -21,6 +21,8 @@ Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the 960 running on VxWorks.
VxWorks does all the library stuff itself. */
+#define MULTILIB_DEFAULTS { "msoft-float" }
+
#undef LIB_SPEC
#define LIB_SPEC ""
@@ -57,7 +59,8 @@ Boston, MA 02111-1307, USA. */
%{mcf:-D__i960CF__ -D__i960_CF__}\
%{!mka:%{!mkb:%{!msa:%{!msb:%{!mmc:%{!mca:\
%{!mcc:%{!mcf:-D__i960_CA -D__i960CA__ -DCPU=I960CA\
- %{mic*:-D__i960CA}}}}}}}}}"
+ %{mic*:-D__i960CA}}}}}}}}}\
+ %{mlong-double-64:-D__LONG_DOUBLE_64__}"
/* Default to -mca. */
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index f30116f..7f4bd14 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -5255,6 +5255,15 @@ Do not permit (do permit) unaligned accesses.
@item -mold-align
Enable structure-alignment compatibility with Intel's gcc release version
1.3 (based on gcc 1.37). This option implies @samp{-mstrict-align}.
+
+@item -mlong-double-64
+Implement type @samp{long double} as 64-bit floating point numbers.
+Without the option @samp{long double} is implemented by 80-bit
+floating point numbers. The only reason we have it because there is
+no 128-bit @samp{long double} support in @samp{fp-bit.c} yet. So it
+is only useful for people using soft-float targets. Otherwise, we
+should recommend against use of it.
+
@end table
@node DEC Alpha Options
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 0275525..b06b771 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -72,6 +72,10 @@ Boston, MA 02111-1307, USA. */
#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
#endif
+#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
+#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
+#endif
+
/* In the first part of this file, we are interfacing to calls generated
by the compiler itself. These calls pass values into these routines
which have very specific modes (rather than very specific types), and
@@ -90,10 +94,10 @@ typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
-#if LONG_DOUBLE_TYPE_SIZE == 96
+#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
typedef float XFtype __attribute__ ((mode (XF)));
#endif
-#if LONG_DOUBLE_TYPE_SIZE == 128
+#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
typedef float TFtype __attribute__ ((mode (TF)));
#endif
@@ -144,10 +148,10 @@ typedef union
extern DItype __fixunssfdi (SFtype a);
extern DItype __fixunsdfdi (DFtype a);
-#if LONG_DOUBLE_TYPE_SIZE == 96
+#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
extern DItype __fixunsxfdi (XFtype a);
#endif
-#if LONG_DOUBLE_TYPE_SIZE == 128
+#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
extern DItype __fixunstfdi (TFtype a);
#endif
@@ -768,7 +772,7 @@ __ucmpdi2 (DItype a, DItype b)
}
#endif
-#if defined(L_fixunstfdi) && (LONG_DOUBLE_TYPE_SIZE == 128)
+#if defined(L_fixunstfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
@@ -800,7 +804,7 @@ __fixunstfdi (TFtype a)
}
#endif
-#if defined(L_fixtfdi) && (LONG_DOUBLE_TYPE_SIZE == 128)
+#if defined(L_fixtfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
DItype
__fixtfdi (TFtype a)
{
@@ -810,7 +814,7 @@ __fixtfdi (TFtype a)
}
#endif
-#if defined(L_fixunsxfdi) && (LONG_DOUBLE_TYPE_SIZE == 96)
+#if defined(L_fixunsxfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
@@ -842,7 +846,7 @@ __fixunsxfdi (XFtype a)
}
#endif
-#if defined(L_fixxfdi) && (LONG_DOUBLE_TYPE_SIZE == 96)
+#if defined(L_fixxfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
DItype
__fixxfdi (XFtype a)
{
@@ -940,7 +944,7 @@ __fixsfdi (SFtype a)
}
#endif
-#if defined(L_floatdixf) && (LONG_DOUBLE_TYPE_SIZE == 96)
+#if defined(L_floatdixf) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
@@ -959,7 +963,7 @@ __floatdixf (DItype u)
}
#endif
-#if defined(L_floatditf) && (LONG_DOUBLE_TYPE_SIZE == 128)
+#if defined(L_floatditf) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
@@ -1065,7 +1069,7 @@ __floatdisf (DItype u)
}
#endif
-#if defined(L_fixunsxfsi) && LONG_DOUBLE_TYPE_SIZE == 96
+#if defined(L_fixunsxfsi) && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
/* Reenable the normal types, in case limits.h needs them. */
#undef char
#undef short