* 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
+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.
/* 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
#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
/* 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)
#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
/* 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)
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. */
/* 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. */
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. */
#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
/* 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. */
#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 */
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. */
&& 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
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. */
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. */
/* 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. */
/* 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