summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-03-09 17:40:43 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2001-03-09 16:40:43 +0000
commit25f94bb5d334553205ac2d642e8219df1302ae3b (patch)
tree0da13c8365fe9ef3f9d6d3ba9bada75899c61167
parentb891e06c45b76efcc5337f56ecb2c2345cc6a482 (diff)
downloadgcc-25f94bb5d334553205ac2d642e8219df1302ae3b.tar.gz
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
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/cygwin.h4
-rw-r--r--gcc/config/i386/freebsd-aout.h4
-rw-r--r--gcc/config/i386/i386-interix.h4
-rw-r--r--gcc/config/i386/i386.h14
-rw-r--r--gcc/config/i386/i386elf.h2
-rw-r--r--gcc/config/i386/isc.h4
-rw-r--r--gcc/config/i386/netbsd.h4
-rw-r--r--gcc/config/i386/next.h4
-rw-r--r--gcc/config/i386/openbsd.h4
-rw-r--r--gcc/config/i386/sco.h4
-rw-r--r--gcc/config/i386/sco5.h4
-rw-r--r--gcc/config/i386/scodbx.h4
-rw-r--r--gcc/config/i386/sequent.h4
-rw-r--r--gcc/config/i386/unix.h2
-rw-r--r--gcc/config/i386/win32.h4
16 files changed, 50 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6b17ad5d080..0d3a530b08b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Fri Mar 9 17:38:08 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * 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 e2d765fa861..3dc30354bde 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 ef63b1c9b2d..0a86ac2a56e 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 f5e9ea58ec2..aa452453e6a 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 31c7a8e2ff6..9da78c72b27 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 d333551f2b8..904446aeee9 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 6c1c4c72718..c07aa066495 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 51f65611956..3b5bf9c3e9d 100644
--- a/gcc/config/i386/netbsd.h
+++ b/gcc/config/i386/netbsd.h
@@ -10,8 +10,8 @@
#include <netbsd.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/next.h b/gcc/config/i386/next.h
index a37429115fa..0638dffa173 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 c8d0a65e29d..b24a94cdc19 100644
--- a/gcc/config/i386/openbsd.h
+++ b/gcc/config/i386/openbsd.h
@@ -31,8 +31,8 @@ Boston, MA 02111-1307, USA. */
#include <openbsd.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)
/* Run-time target specifications */
diff --git a/gcc/config/i386/sco.h b/gcc/config/i386/sco.h
index f7c366e672a..9a397ed8c1e 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 ae832b91f5f..039b26a80fd 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 3804950c5f8..17bbfe95f81 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 09254b02057..c8ba852a9a1 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 939b7167da8..508d4c89ece 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 519a1380cf7..36707f040ff 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