From 25f94bb5d334553205ac2d642e8219df1302ae3b Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 9 Mar 2001 17:40:43 +0100 Subject: [PATCH] i386.h (MASK_64BIT): New constant. * i386.h (MASK_64BIT): New constant. (TARGET_64BIT): New macro. (TARGET_OPTIONS): Add '64'/'32' (TARGET_DEFAULT): Define. * cygwin.h freebsd-aout.h i386-interix.h i386.h i386elf.h isc.h isccoff.h netbsd.h next.h openbsd.h p sco.h sco5.h scodbx.h sequent.h unix.h win32.h (TARGET_DEFAULT): Rename to TARGET_SUBTARGET_DEFAULT. From-SVN: r40345 --- gcc/ChangeLog | 10 ++++++++++ gcc/config/i386/cygwin.h | 4 ++-- gcc/config/i386/freebsd-aout.h | 4 ++-- gcc/config/i386/i386-interix.h | 4 ++-- gcc/config/i386/i386.h | 14 ++++++++++++++ gcc/config/i386/i386elf.h | 2 +- gcc/config/i386/isc.h | 4 ++-- gcc/config/i386/netbsd.h | 4 ++-- gcc/config/i386/next.h | 4 ++-- gcc/config/i386/openbsd.h | 4 ++-- gcc/config/i386/sco.h | 4 ++-- gcc/config/i386/sco5.h | 4 ++-- gcc/config/i386/scodbx.h | 4 ++-- gcc/config/i386/sequent.h | 4 ++-- gcc/config/i386/unix.h | 2 +- gcc/config/i386/win32.h | 4 ++-- 16 files changed, 50 insertions(+), 26 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b17ad5..0d3a530 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Fri Mar 9 17:38:08 CET 2001 Jan Hubicka + + * i386.h (mask_64bit): New constant. + (target_64bit): New macro. + (target_options): Add '64'/'32' + (target_default): Define. + * cygwin.h freebsd-aout.h i386-interix.h i386.h i386elf.h isc.h + isccoff.h netbsd.h next.h openbsd.h p sco.h sco5.h scodbx.h sequent.h + unix.h win32.h (TARGET_DEFAULT): Rename to TARGET_SUBTARGET_DEFAULT. + Thu Mar 8 23:36:56 2001 Jeffrey A Law (law@cygnus.com) * config/pa/som.h (MAKE_DECL_ONE_ONLY, ASM_WEAKEN_LABEL): Disable. diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index e2d765f..3dc3035 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -391,9 +391,9 @@ do { \ /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387 and needs stack probes */ -#undef TARGET_DEFAULT +#undef TARGET_SUBTARGET_DEFAULT -#define TARGET_DEFAULT \ +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) /* This is how to output an assembler line diff --git a/gcc/config/i386/freebsd-aout.h b/gcc/config/i386/freebsd-aout.h index ef63b1c..0a86ac2 100644 --- a/gcc/config/i386/freebsd-aout.h +++ b/gcc/config/i386/freebsd-aout.h @@ -30,8 +30,8 @@ Boston, MA 02111-1307, USA. */ #include "i386/gstabs.h" /* This goes away when the math-emulator is fixed */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT \ +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) #undef CPP_PREDEFINES diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index f5e9ea5..aa45245 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -40,8 +40,8 @@ Boston, MA 02111-1307, USA. */ /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387 and needs stack probes We also align doubles to 64-bits for MSVC default compatability */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT \ +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE | \ MASK_ALIGN_DOUBLE) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 31c7a8e..9da78c7 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -119,6 +119,7 @@ extern int target_flags; #define MASK_SSE2 0x00040000 /* Support SSE2 regs/builtins */ #define MASK_128BIT_LONG_DOUBLE 0x00080000 /* long double size is 128bit */ #define MASK_MIX_SSE_I387 0x00100000 /* Mix SSE and i387 instructions */ +#define MASK_64BIT 0x00200000 /* Produce 64bit code */ /* Temporary codegen switches */ #define MASK_INTEL_SYNTAX 0x00000200 @@ -178,6 +179,9 @@ extern int target_flags; /* Debug FUNCTION_ARG macros */ #define TARGET_DEBUG_ARG (target_flags & MASK_DEBUG_ARG) +/* 64bit Sledgehammer mode */ +#define TARGET_64BIT (target_flags & MASK_64BIT) + #define TARGET_386 (ix86_cpu == PROCESSOR_I386) #define TARGET_486 (ix86_cpu == PROCESSOR_I486) #define TARGET_PENTIUM (ix86_cpu == PROCESSOR_PENTIUM) @@ -330,9 +334,19 @@ extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall; N_("sizeof(long double) is 16.") }, \ { "96bit-long-double", -MASK_128BIT_LONG_DOUBLE, \ N_("sizeof(long double) is 12.") }, \ + { "64", MASK_64BIT, \ + N_("Generate 64bit x86-64 code") }, \ + { "32", -MASK_64BIT, \ + N_("Generate 32bit i386 code") }, \ SUBTARGET_SWITCHES \ { "", TARGET_DEFAULT, 0 }} +#ifdef TARGET_64BIT_DEFAULT +#define TARGET_DEFAULT (MASK_64BIT | TARGET_SUBTARGET_DEFAULT) +#else +#define TARGET_DEFAULT TARGET_SUBTARGET_DEFAULT +#endif + /* Which processor to schedule for. The cpu attribute defines a list that mirrors this list, so changes to i386.md must be made at the same time. */ diff --git a/gcc/config/i386/i386elf.h b/gcc/config/i386/i386elf.h index d333551..904446a 100644 --- a/gcc/config/i386/i386elf.h +++ b/gcc/config/i386/i386elf.h @@ -29,7 +29,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387. */ -#define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) /* The ELF ABI for the i386 says that records and unions are returned in memory. */ diff --git a/gcc/config/i386/isc.h b/gcc/config/i386/isc.h index 6c1c4c7..c07aa06 100644 --- a/gcc/config/i386/isc.h +++ b/gcc/config/i386/isc.h @@ -58,8 +58,8 @@ opcode. fucomp is only used when generating IEEE compliant code. So don't make TARGET_IEEE_FP default for ISC. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) /* The ISC 2.0.2 software FPU emulator apparently can't handle 80-bit XFmode insns, so don't generate them. */ diff --git a/gcc/config/i386/netbsd.h b/gcc/config/i386/netbsd.h index 51f6561..3b5bf9c 100644 --- a/gcc/config/i386/netbsd.h +++ b/gcc/config/i386/netbsd.h @@ -10,8 +10,8 @@ #include /* This goes away when the math-emulator is fixed */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT \ +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) #undef CPP_PREDEFINES diff --git a/gcc/config/i386/next.h b/gcc/config/i386/next.h index a374291..0638dff 100644 --- a/gcc/config/i386/next.h +++ b/gcc/config/i386/next.h @@ -23,8 +23,8 @@ Boston, MA 02111-1307, USA. */ /* By default, target has a 80387, with IEEE FP. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP) /* Implicit library calls should use memcpy, not bcopy, etc. */ diff --git a/gcc/config/i386/openbsd.h b/gcc/config/i386/openbsd.h index c8d0a65..b24a94c 100644 --- a/gcc/config/i386/openbsd.h +++ b/gcc/config/i386/openbsd.h @@ -31,8 +31,8 @@ Boston, MA 02111-1307, USA. */ #include /* This goes away when the math-emulator is fixed */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT \ +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) /* Run-time target specifications */ diff --git a/gcc/config/i386/sco.h b/gcc/config/i386/sco.h index f7c366e..9a397ed 100644 --- a/gcc/config/i386/sco.h +++ b/gcc/config/i386/sco.h @@ -31,8 +31,8 @@ Boston, MA 02111-1307, USA. */ opcode. fucomp is only used when generating IEEE compliant code. So don't make TARGET_IEEE_FP default for SCO. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) /* Let's guess that the SCO software FPU emulator can't handle 80-bit XFmode insns, so don't generate them. */ diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index ae832b9..039b26a 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -708,8 +708,8 @@ dtors_section () \ && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \ && strcmp (STR, "Tbss")) -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) #undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA 1 diff --git a/gcc/config/i386/scodbx.h b/gcc/config/i386/scodbx.h index 3804950..17bbfe9 100644 --- a/gcc/config/i386/scodbx.h +++ b/gcc/config/i386/scodbx.h @@ -31,8 +31,8 @@ Boston, MA 02111-1307, USA. */ opcode. fucomp is only used when generating IEEE compliant code. So don't make TARGET_IEEE_FP default for SCO. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) /* Use crt1.o as a startup file and crtn.o as a closing file. */ diff --git a/gcc/config/i386/sequent.h b/gcc/config/i386/sequent.h index 09254b0..c8ba852 100644 --- a/gcc/config/i386/sequent.h +++ b/gcc/config/i386/sequent.h @@ -28,8 +28,8 @@ Boston, MA 02111-1307, USA. */ because the assembler can't handle the fucom insn. Return float values in the 387. */ -#undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) +#undef TARGET_SUBTARGET_DEFAULT +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_FLOAT_RETURNS) /* Specify predefined symbols in preprocessor. */ diff --git a/gcc/config/i386/unix.h b/gcc/config/i386/unix.h index 939b716..508d4c8 100644 --- a/gcc/config/i386/unix.h +++ b/gcc/config/i386/unix.h @@ -67,7 +67,7 @@ Boston, MA 02111-1307, USA. */ /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387. */ -#define TARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) +#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS) /* Floating-point return values come in the FP register. */ diff --git a/gcc/config/i386/win32.h b/gcc/config/i386/win32.h index 519a138..36707f0 100644 --- a/gcc/config/i386/win32.h +++ b/gcc/config/i386/win32.h @@ -214,9 +214,9 @@ do { \ /* By default, target has a 80387, uses IEEE compatible arithmetic, and returns float values in the 387 and needs stack probes */ -#undef TARGET_DEFAULT +#undef TARGET_SUBTARGET_DEFAULT -#define TARGET_DEFAULT \ +#define TARGET_SUBTARGET_DEFAULT \ (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE) /* This is how to output an assembler line -- 2.7.4