OSDN Git Service

* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
[pf3gnuchains/gcc-fork.git] / gcc / config / sparc / sp64-elf.h
index fcc7275..8ff9650 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for SPARC64, ELF.
-   Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
    Contributed by Doug Evans, dje@cygnus.com.
 
 This file is part of GNU CC.
@@ -19,7 +19,7 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* This is a v9 only compiler.  -mv8 is not expected to work.  If you want
+/* This is a v9 only compiler.  -mcpu=v8 is not expected to work.  If you want
    a v8/v9 compiler, this isn't the place to do it.  */
 
 #define SPARC_V9 1     /* See sparc.h.  */
@@ -35,13 +35,15 @@ Boston, MA 02111-1307, USA.  */
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
 
-/* A v9 compiler with stack-bias, 32 bit integers and 64 bit pointers,
-   in a Medium/Anywhere code model environment.  */
+/* A v9 compiler without stack-bias, lp64 sizes,
+   in a Medium/Anywhere code model environment.
+   There is no stack bias as this configuration is intended for
+   embedded systems.  */
 
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
-  (MASK_V9 + MASK_ARCH64 + MASK_PTR64 + MASK_HARD_QUAD \
-   + MASK_STACK_BIAS + MASK_MEDANY + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU)
+  (MASK_V9 + MASK_ARCH64 + MASK_PTR64 + MASK_LONG64 + MASK_HARD_QUAD \
+   MASK_MEDANY + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU)
 
 /* __svr4__ is used by the C library */
 /* ??? __arch64__ is subject to change.  */
@@ -55,6 +57,7 @@ Boston, MA 02111-1307, USA.  */
 #define CPP_SPEC "\
 %{mint64:-D__INT_MAX__=9223372036854775807LL -D__LONG_MAX__=9223372036854775807LL} \
 %{mlong64:-D__LONG_MAX__=9223372036854775807LL} \
+%{mlittle-endian:-D__LITTLE_ENDIAN__} \
 "
 
 #undef MD_EXEC_PREFIX
@@ -63,12 +66,14 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_SPEC
 #define ASM_SPEC "\
 %{v:-V} -s %{fpic:-K PIC} %{fPIC:-K PIC} \
+%{mlittle-endian:-EL} \
 "
 
 /* This is taken from sol2.h.  */
 #undef LINK_SPEC
 #define LINK_SPEC "\
 %{v:-V} \
+%{mlittle-endian:-EL} \
 "
 
 /* We need something a little simpler for the embedded environment.
@@ -85,6 +90,18 @@ crtbegin.o%s \
 /* Use the default (for now).  */
 #undef LIB_SPEC
 
+/* V9 chips can handle either endianness.  */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+{"big-endian", -MASK_LITTLE_ENDIAN}, \
+{"little-endian", MASK_LITTLE_ENDIAN},
+
+#undef BYTES_BIG_ENDIAN
+#define BYTES_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
+
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
+
 /* Unfortunately, svr4.h redefines these so we have to restore them to
    their original values in sparc.h.  */
 /* ??? It might be possible to eventually get svr4.h to do the right thing.  */
@@ -105,6 +122,7 @@ crtbegin.o%s \
 /* The medium/anywhere code model practically requires us to put jump tables
    in the text section as gcc is unable to distinguish LABEL_REF's of jump
    tables from other label refs (when we need to).  */
+/* ??? Revisit this.  */
 #undef JUMP_TABLES_IN_TEXT_SECTION
 #define JUMP_TABLES_IN_TEXT_SECTION