Commit 4710d3eb by Jakub Jelinek Committed by Jakub Jelinek

real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to LONG_DOUBLE_TYPE_SIZE if not defined.

	* real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to
	LONG_DOUBLE_TYPE_SIZE if not defined.
	Use MAX_LONG_DOUBLE_TYPE_SIZE instead of
	LONG_DOUBLE_TYPE_SIZE in preprocessor if clauses.
	* real.c: Likewise.
	* gengenrtl.c: Likewise.
	* print-rtl.c: Likewise.
	* rtl.c: Likewise.
	* config/sparc/sol2-sld-64.h (TARGET_DEFAULT): Set
	MASK_LONG_DOUBLE_128.
	* config/sparc/sol2.h (TARGET_DEFAULT): Likewise.
	* config/sparc/sp64-elf.h (TARGET_DEFAULT): Likewise.
	* config/sparc/linux64 (TARGET_DEFAULT): Likewise.
	(SUBTARGET_SWITCHES): Define.
	(CPP_ARCH32_SPEC): Define __LONG_DOUBLE_128__ if compiling
	with -mlong-double-128.
	(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
	(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
	(CC1_SPEC): Include -mlong-double-{64,128} as needed.
	* config/sparc/linux.h (SUBTARGET_SWITCHES): Define.
	(CPP_SUBTARGET_SPEC): Define __LONG_DOUBLE_128__ if compiling
	with -mlong-double-128.
	(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
	(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
	* config/sparc/sparc.h (MASK_LONG_DOUBLE_128,
	TARGET_LONG_DOUBLE_128): Define.
	* config/sparc/linux-aout.h (LONG_DOUBLE_TYPE_SIZE): Remove.
	* config/sparc/sparc.c (sparc_override_options): Disallow 64bit
	long double on TARGET_ARCH64.

From-SVN: r32367
parent 6149cebb
...@@ -37,6 +37,38 @@ ...@@ -37,6 +37,38 @@
* config/sparc/sparc.h (ASM_ARCH64_SPEC): Pass -no-undeclared-regs * config/sparc/sparc.h (ASM_ARCH64_SPEC): Pass -no-undeclared-regs
to gas if it supports .register pseudo. to gas if it supports .register pseudo.
* real.h (MAX_LONG_DOUBLE_TYPE_SIZE): Define to
LONG_DOUBLE_TYPE_SIZE if not defined.
Use MAX_LONG_DOUBLE_TYPE_SIZE instead of
LONG_DOUBLE_TYPE_SIZE in preprocessor if clauses.
* real.c: Likewise.
* gengenrtl.c: Likewise.
* print-rtl.c: Likewise.
* rtl.c: Likewise.
* config/sparc/sol2-sld-64.h (TARGET_DEFAULT): Set
MASK_LONG_DOUBLE_128.
* config/sparc/sol2.h (TARGET_DEFAULT): Likewise.
* config/sparc/sp64-elf.h (TARGET_DEFAULT): Likewise.
* config/sparc/linux64 (TARGET_DEFAULT): Likewise.
(SUBTARGET_SWITCHES): Define.
(CPP_ARCH32_SPEC): Define __LONG_DOUBLE_128__ if compiling
with -mlong-double-128.
(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
(CC1_SPEC): Include -mlong-double-{64,128} as needed.
* config/sparc/linux.h (SUBTARGET_SWITCHES): Define.
(CPP_SUBTARGET_SPEC): Define __LONG_DOUBLE_128__ if compiling
with -mlong-double-128.
(LONG_DOUBLE_TYPE_SIZE): Define depending on target_flags.
(MAX_LONG_DOUBLE_TYPE_SIZE): Define.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define depending on CPP macros.
* config/sparc/sparc.h (MASK_LONG_DOUBLE_128,
TARGET_LONG_DOUBLE_128): Define.
* config/sparc/linux-aout.h (LONG_DOUBLE_TYPE_SIZE): Remove.
* config/sparc/sparc.c (sparc_override_options): Disallow 64bit
long double on TARGET_ARCH64.
2000-03-06 Mark Mitchell <mark@codesourcery.com> 2000-03-06 Mark Mitchell <mark@codesourcery.com>
* function.c (free_temps_for_rtl_expr): Don't free slots * function.c (free_temps_for_rtl_expr): Don't free slots
......
...@@ -101,13 +101,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -101,13 +101,6 @@ Boston, MA 02111-1307, USA. */
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC \ #define ASM_SPEC \
"%{V} %{v:%{!V:-V}} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} %{fPIC:-K PIC}" "%{V} %{v:%{!V:-V}} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} %{fPIC:-K PIC}"
#if 0
/* Define for support of TFmode long double and REAL_ARITHMETIC.
Sparc ABI says that long double is 4 words. GNU/Linux does not support
long double yet. */
#define LONG_DOUBLE_TYPE_SIZE 128
#endif
/* No weird SPARC variants on Linux */ /* No weird SPARC variants on Linux */
#undef TARGET_LIVE_G0 #undef TARGET_LIVE_G0
......
...@@ -87,6 +87,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -87,6 +87,11 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION #undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with ELF)"); #define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with ELF)");
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"long-double-64", -MASK_LONG_DOUBLE_128, "Use 64 bit long doubles" }, \
{"long-double-128", MASK_LONG_DOUBLE_128, "Use 128 bit long doubles" },
#undef SIZE_TYPE #undef SIZE_TYPE
#define SIZE_TYPE "unsigned int" #define SIZE_TYPE "unsigned int"
...@@ -107,10 +112,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -107,10 +112,12 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SUBTARGET_SPEC #undef CPP_SUBTARGET_SPEC
#ifdef USE_GNULIBC_1 #ifdef USE_GNULIBC_1
#define CPP_SUBTARGET_SPEC \ #define CPP_SUBTARGET_SPEC \
"%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \
%{mlong-double-128:-D__LONG_DOUBLE_128__}"
#else #else
#define CPP_SUBTARGET_SPEC \ #define CPP_SUBTARGET_SPEC \
"%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \
%{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}"
#endif #endif
#undef LIB_SPEC #undef LIB_SPEC
...@@ -231,11 +238,19 @@ do { \ ...@@ -231,11 +238,19 @@ do { \
sprintf (LABEL, "*.L%s%d", PREFIX, NUM) sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
#if 0
/* Define for support of TFmode long double and REAL_ARITHMETIC. /* Define for support of TFmode long double and REAL_ARITHMETIC.
Sparc ABI says that long double is 4 words. GNU/Linux does not support Sparc ABI says that long double is 4 words. */
long double yet. */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
#define LONG_DOUBLE_TYPE_SIZE 128
/* Constant which presents upper bound of the above value. */
#define MAX_LONG_DOUBLE_TYPE_SIZE 128
/* Define this to set long double type size to use in libgcc2.c, which can
not depend on target_flags. */
#ifdef __LONG_DOUBLE_128__
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
#else
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#endif #endif
/* No weird SPARC variants on Linux */ /* No weird SPARC variants on Linux */
......
...@@ -41,7 +41,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -41,7 +41,7 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT \ #define TARGET_DEFAULT \
(MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ \ (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ \
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU) + MASK_STACK_BIAS + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU + MASK_LONG_DOUBLE_128)
#endif #endif
/* Output at beginning of assembler file. */ /* Output at beginning of assembler file. */
...@@ -56,6 +56,15 @@ Boston, MA 02111-1307, USA. */ ...@@ -56,6 +56,15 @@ Boston, MA 02111-1307, USA. */
#undef ASM_CPU_DEFAULT_SPEC #undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC "-Av9a" #define ASM_CPU_DEFAULT_SPEC "-Av9a"
#ifdef SPARC_BI_ARCH
#undef CPP_ARCH32_SPEC
#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__} \
-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int \
-D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc)"
#endif
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static provides part of the support for getting C++ file-scope static
...@@ -134,6 +143,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -134,6 +143,11 @@ Boston, MA 02111-1307, USA. */
#undef SPARC_DEFAULT_CMODEL #undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDLOW #define SPARC_DEFAULT_CMODEL CM_MEDLOW
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"long-double-64", -MASK_LONG_DOUBLE_128, "Use 64 bit long doubles" }, \
{"long-double-128", MASK_LONG_DOUBLE_128, "Use 128 bit long doubles" },
#undef WCHAR_TYPE #undef WCHAR_TYPE
#define WCHAR_TYPE "int" #define WCHAR_TYPE "int"
...@@ -142,8 +156,22 @@ Boston, MA 02111-1307, USA. */ ...@@ -142,8 +156,22 @@ Boston, MA 02111-1307, USA. */
#undef MAX_WCHAR_TYPE_SIZE #undef MAX_WCHAR_TYPE_SIZE
/* Define for support of TFmode long double and REAL_ARITHMETIC.
Sparc ABI says that long double is 4 words. */
#undef LONG_DOUBLE_TYPE_SIZE #undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128 #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
/* Constant which presents upper bound of the above value. */
#undef MAX_LONG_DOUBLE_TYPE_SIZE
#define MAX_LONG_DOUBLE_TYPE_SIZE 128
/* Define this to set long double type size to use in libgcc2.c, which can
not depend on target_flags. */
#if defined(__arch64__) || defined(__LONG_DOUBLE_128__)
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
#else
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#endif
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__ELF__ -Dunix -D_LONGLONG -D__sparc__ -Dlinux -Asystem(unix) -Asystem(posix)" #define CPP_PREDEFINES "-D__ELF__ -Dunix -D_LONGLONG -D__sparc__ -Dlinux -Asystem(unix) -Asystem(posix)"
...@@ -227,7 +255,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -227,7 +255,7 @@ Boston, MA 02111-1307, USA. */
%{mcypress:-mcpu=cypress} \ %{mcypress:-mcpu=cypress} \
%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
%{m64:-mptr64 -mstack-bias \ %{m64:-mptr64 -mstack-bias -mlong-double-128 \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=ultrasparc}}}}}}} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
%{!mno-vis:%{!mcpu=v9:-mvis}}} \ %{!mno-vis:%{!mcpu=v9:-mvis}}} \
%{!m64:%{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \ %{!m64:%{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \
...@@ -238,7 +266,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -238,7 +266,7 @@ Boston, MA 02111-1307, USA. */
%{mcypress:-mcpu=cypress} \ %{mcypress:-mcpu=cypress} \
%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
%{m32:-mptr32 -mno-stack-bias \ %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}} \ %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}} \
%{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \ %{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \
%{!m32:%{!mcpu*:-mcpu=ultrasparc}} \ %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT \ #define TARGET_DEFAULT \
(MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \ (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
MASK_STACK_BIAS + MASK_EPILOGUE + MASK_FPU) MASK_STACK_BIAS + MASK_EPILOGUE + MASK_FPU + MASK_LONG_DOUBLE_128)
#endif #endif
/* The default code model. */ /* The default code model. */
......
...@@ -213,7 +213,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -213,7 +213,7 @@ Boston, MA 02111-1307, USA. */
/* Solaris allows 64 bit out and global registers in 32 bit mode. /* Solaris allows 64 bit out and global registers in 32 bit mode.
sparc_override_options will disable V8+ if not generating V9 code. */ sparc_override_options will disable V8+ if not generating V9 code. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_EPILOGUE + MASK_FPU + MASK_V8PLUS) #define TARGET_DEFAULT (MASK_EPILOGUE + MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128)
#if TARGET_ARCH32 #if TARGET_ARCH32
/* Override MACHINE_STATE_{SAVE,RESTORE} because we have special /* Override MACHINE_STATE_{SAVE,RESTORE} because we have special
......
...@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT \ #define TARGET_DEFAULT \
(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \ (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
+ MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU + MASK_STACK_BIAS) + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
#undef SPARC_DEFAULT_CMODEL #undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_EMBMEDANY #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
......
...@@ -250,6 +250,13 @@ sparc_override_options () ...@@ -250,6 +250,13 @@ sparc_override_options ()
target_flags &= ~MASK_PTR64; target_flags &= ~MASK_PTR64;
} }
/* We force all 64bit archs to use 128 bit long double */
if (TARGET_64BIT && ! TARGET_LONG_DOUBLE_128)
{
error ("-mlong-double-64 not allowed with -m64");
target_flags |= MASK_LONG_DOUBLE_128;
}
/* Code model selection. */ /* Code model selection. */
sparc_cmodel = SPARC_DEFAULT_CMODEL; sparc_cmodel = SPARC_DEFAULT_CMODEL;
......
...@@ -555,6 +555,10 @@ extern int target_flags; ...@@ -555,6 +555,10 @@ extern int target_flags;
#define MASK_FASTER_STRUCTS 0x4000000 #define MASK_FASTER_STRUCTS 0x4000000
#define TARGET_FASTER_STRUCTS (target_flags & MASK_FASTER_STRUCTS) #define TARGET_FASTER_STRUCTS (target_flags & MASK_FASTER_STRUCTS)
/* Use IEEE quad long double. */
#define MASK_LONG_DOUBLE_128 0x8000000
#define TARGET_LONG_DOUBLE_128 (target_flags & MASK_LONG_DOUBLE_128)
/* TARGET_HARD_MUL: Use hardware multiply instructions but not %y. /* TARGET_HARD_MUL: Use hardware multiply instructions but not %y.
TARGET_HARD_MUL32: Use hardware multiply instructions with rd %y TARGET_HARD_MUL32: Use hardware multiply instructions with rd %y
to get high 32 bits. False in V8+ or V9 because multiply stores to get high 32 bits. False in V8+ or V9 because multiply stores
......
...@@ -40,9 +40,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -40,9 +40,9 @@ Boston, MA 02111-1307, USA. */
slots in a CONST_DOUBLE, so we provide them even if one would suffice. */ slots in a CONST_DOUBLE, so we provide them even if one would suffice. */
#ifdef REAL_ARITHMETIC #ifdef REAL_ARITHMETIC
#if LONG_DOUBLE_TYPE_SIZE == 96 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
#define REAL_WIDTH (11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
#elif LONG_DOUBLE_TYPE_SIZE == 128 #elif MAX_LONG_DOUBLE_TYPE_SIZE == 128
#define REAL_WIDTH (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
#elif HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT #elif HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
#define REAL_WIDTH (7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
...@@ -50,11 +50,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -50,11 +50,11 @@ Boston, MA 02111-1307, USA. */
#endif /* REAL_ARITHMETIC */ #endif /* REAL_ARITHMETIC */
#ifndef REAL_WIDTH #ifndef REAL_WIDTH
#if HOST_BITS_PER_WIDE_INT*2 >= LONG_DOUBLE_TYPE_SIZE #if HOST_BITS_PER_WIDE_INT*2 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 2 #define REAL_WIDTH 2
#elif HOST_BITS_PER_WIDE_INT*3 >= LONG_DOUBLE_TYPE_SIZE #elif HOST_BITS_PER_WIDE_INT*3 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 3 #define REAL_WIDTH 3
#elif HOST_BITS_PER_WIDE_INT*4 >= LONG_DOUBLE_TYPE_SIZE #elif HOST_BITS_PER_WIDE_INT*4 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 4 #define REAL_WIDTH 4
#endif #endif
#endif /* REAL_WIDTH */ #endif /* REAL_WIDTH */
......
...@@ -357,7 +357,7 @@ print_rtx (in_rtx) ...@@ -357,7 +357,7 @@ print_rtx (in_rtx)
if (GET_CODE (in_rtx) == MEM) if (GET_CODE (in_rtx) == MEM)
fprintf (outfile, " %d", MEM_ALIAS_SET (in_rtx)); fprintf (outfile, " %d", MEM_ALIAS_SET (in_rtx));
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && LONG_DOUBLE_TYPE_SIZE == 64 #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && MAX_LONG_DOUBLE_TYPE_SIZE == 64
if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx))) if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
{ {
double val; double val;
......
...@@ -244,7 +244,7 @@ unknown arithmetic type ...@@ -244,7 +244,7 @@ unknown arithmetic type
A REAL_VALUE_TYPE is guaranteed to occupy contiguous locations A REAL_VALUE_TYPE is guaranteed to occupy contiguous locations
in memory, with no holes. */ in memory, with no holes. */
#if LONG_DOUBLE_TYPE_SIZE == 96 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
/* Number of 16 bit words in external e type format */ /* Number of 16 bit words in external e type format */
#define NE 6 #define NE 6
#define MAXDECEXP 4932 #define MAXDECEXP 4932
...@@ -257,7 +257,7 @@ do { \ ...@@ -257,7 +257,7 @@ do { \
bcopy ((char *) e, (char *) r, 2*NE); \ bcopy ((char *) e, (char *) r, 2*NE); \
} while (0) } while (0)
#else /* no XFmode */ #else /* no XFmode */
#if LONG_DOUBLE_TYPE_SIZE == 128 #if MAX_LONG_DOUBLE_TYPE_SIZE == 128
#define NE 10 #define NE 10
#define MAXDECEXP 4932 #define MAXDECEXP 4932
#define MINDECEXP -4977 #define MINDECEXP -4977
...@@ -1479,7 +1479,7 @@ ereal_isneg (x) ...@@ -1479,7 +1479,7 @@ ereal_isneg (x)
/* e type constants used by high precision check routines */ /* e type constants used by high precision check routines */
#if LONG_DOUBLE_TYPE_SIZE == 128 #if MAX_LONG_DOUBLE_TYPE_SIZE == 128
/* 0.0 */ /* 0.0 */
unsigned EMUSHORT ezero[NE] = unsigned EMUSHORT ezero[NE] =
{0x0000, 0x0000, 0x0000, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000,
...@@ -3646,7 +3646,7 @@ toe64 (a, b) ...@@ -3646,7 +3646,7 @@ toe64 (a, b)
else else
{ {
q = b + 4; /* point to output exponent */ q = b + 4; /* point to output exponent */
#if LONG_DOUBLE_TYPE_SIZE == 96 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
/* Clear the last two bytes of 12-byte Intel format */ /* Clear the last two bytes of 12-byte Intel format */
*(q+1) = 0; *(q+1) = 0;
#endif #endif
...@@ -4550,7 +4550,7 @@ enormlz (x) ...@@ -4550,7 +4550,7 @@ enormlz (x)
#define NTEN 12 #define NTEN 12
#define MAXP 4096 #define MAXP 4096
#if LONG_DOUBLE_TYPE_SIZE == 128 #if MAX_LONG_DOUBLE_TYPE_SIZE == 128
static unsigned EMUSHORT etens[NTEN + 1][NE] = static unsigned EMUSHORT etens[NTEN + 1][NE] =
{ {
{0x6576, 0x4a92, 0x804a, 0x153f, {0x6576, 0x4a92, 0x804a, 0x153f,
......
...@@ -68,7 +68,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -68,7 +68,10 @@ Boston, MA 02111-1307, USA. */
#ifndef LONG_DOUBLE_TYPE_SIZE #ifndef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 64
#endif #endif
#if (LONG_DOUBLE_TYPE_SIZE == 96) || (LONG_DOUBLE_TYPE_SIZE == 128) #ifndef MAX_LONG_DOUBLE_TYPE_SIZE
#define MAX_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
#if (MAX_LONG_DOUBLE_TYPE_SIZE == 96) || (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
#ifndef REAL_ARITHMETIC #ifndef REAL_ARITHMETIC
#define REAL_ARITHMETIC #define REAL_ARITHMETIC
#endif #endif
...@@ -78,7 +81,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -78,7 +81,7 @@ Boston, MA 02111-1307, USA. */
/* Support 80-bit extended real XFmode if LONG_DOUBLE_TYPE_SIZE /* Support 80-bit extended real XFmode if LONG_DOUBLE_TYPE_SIZE
has been defined to be 96 in the tm.h machine file. */ has been defined to be 96 in the tm.h machine file. */
#if (LONG_DOUBLE_TYPE_SIZE == 96) #if (MAX_LONG_DOUBLE_TYPE_SIZE == 96)
#define REAL_IS_NOT_DOUBLE #define REAL_IS_NOT_DOUBLE
#define REAL_ARITHMETIC #define REAL_ARITHMETIC
typedef struct { typedef struct {
...@@ -88,7 +91,7 @@ typedef struct { ...@@ -88,7 +91,7 @@ typedef struct {
#else /* no XFmode support */ #else /* no XFmode support */
#if (LONG_DOUBLE_TYPE_SIZE == 128) #if (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
#define REAL_IS_NOT_DOUBLE #define REAL_IS_NOT_DOUBLE
#define REAL_ARITHMETIC #define REAL_ARITHMETIC
...@@ -199,7 +202,7 @@ extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode, ...@@ -199,7 +202,7 @@ extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode,
ereal_from_uint (&d, lo, hi, mode) ereal_from_uint (&d, lo, hi, mode)
/* IN is a REAL_VALUE_TYPE. OUT is an array of longs. */ /* IN is a REAL_VALUE_TYPE. OUT is an array of longs. */
#if LONG_DOUBLE_TYPE_SIZE == 96 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
#define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etarldouble ((IN), (OUT))) #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etarldouble ((IN), (OUT)))
#else #else
#define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etartdouble ((IN), (OUT))) #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etartdouble ((IN), (OUT)))
......
...@@ -52,9 +52,9 @@ extern struct obstack *rtl_obstack; ...@@ -52,9 +52,9 @@ extern struct obstack *rtl_obstack;
slots in a CONST_DOUBLE, so we provide them even if one would suffice. */ slots in a CONST_DOUBLE, so we provide them even if one would suffice. */
#ifdef REAL_ARITHMETIC #ifdef REAL_ARITHMETIC
#if LONG_DOUBLE_TYPE_SIZE == 96 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
#define REAL_WIDTH (11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
#elif LONG_DOUBLE_TYPE_SIZE == 128 #elif MAX_LONG_DOUBLE_TYPE_SIZE == 128
#define REAL_WIDTH (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
#elif HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT #elif HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
#define REAL_WIDTH (7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT #define REAL_WIDTH (7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
...@@ -62,11 +62,11 @@ extern struct obstack *rtl_obstack; ...@@ -62,11 +62,11 @@ extern struct obstack *rtl_obstack;
#endif /* REAL_ARITHMETIC */ #endif /* REAL_ARITHMETIC */
#ifndef REAL_WIDTH #ifndef REAL_WIDTH
#if HOST_BITS_PER_WIDE_INT*2 >= LONG_DOUBLE_TYPE_SIZE #if HOST_BITS_PER_WIDE_INT*2 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 2 #define REAL_WIDTH 2
#elif HOST_BITS_PER_WIDE_INT*3 >= LONG_DOUBLE_TYPE_SIZE #elif HOST_BITS_PER_WIDE_INT*3 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 3 #define REAL_WIDTH 3
#elif HOST_BITS_PER_WIDE_INT*4 >= LONG_DOUBLE_TYPE_SIZE #elif HOST_BITS_PER_WIDE_INT*4 >= MAX_LONG_DOUBLE_TYPE_SIZE
#define REAL_WIDTH 4 #define REAL_WIDTH 4
#endif #endif
#endif /* REAL_WIDTH */ #endif /* REAL_WIDTH */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment