aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/mips/driver-native.c61
-rw-r--r--gcc/config/mips/gnu-user.h3
-rw-r--r--gcc/config/mips/gnu-user64.h8
-rw-r--r--gcc/config/mips/iris6.h353
-rw-r--r--gcc/config/mips/iris6.opt45
-rw-r--r--gcc/config/mips/mips-modes.def3
-rw-r--r--gcc/config/mips/mips-protos.h3
-rw-r--r--gcc/config/mips/mips.c86
-rw-r--r--gcc/config/mips/mips.h46
9 files changed, 59 insertions, 549 deletions
diff --git a/gcc/config/mips/driver-native.c b/gcc/config/mips/driver-native.c
index f565c57..f221d78 100644
--- a/gcc/config/mips/driver-native.c
+++ b/gcc/config/mips/driver-native.c
@@ -1,5 +1,5 @@
/* Subroutines for the gcc driver.
- Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -22,59 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
-#ifdef __sgi__
-#include <invent.h>
-#include <sys/sbd.h>
-
-/* Cf. MIPS R10000 Microprocessor User Guide, Version 2.0, 14.13 Processor
- Revision Identifier (PRId) Register (15).
-
- http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_279.html */
-
-static const struct cpu_types {
- int impl;
- const char *cpu;
-} cpu_types[] = {
- { C0_IMP_R2000, "r2000" },
- { C0_IMP_R3000, "r3000" },
- { C0_IMP_R6000, "r6000" },
- { C0_IMP_R4000, "r4000" },
- { C0_IMP_R6000A, "r6000" },
- { C0_IMP_R10000, "r10000" },
- { C0_IMP_R12000, "r12000" },
- { C0_IMP_R14000, "r14000" },
- { C0_IMP_R8000, "r8000" },
- { C0_IMP_R4600, "r4600" },
- { C0_IMP_R4700, "r4600" },
- { C0_IMP_R4650, "r4650" },
- { C0_IMP_R5000, "vr5000" },
- { C0_IMP_RM7000, "rm7000" },
- { C0_IMP_RM5271, "vr5000" },
- { 0, 0 }
-};
-
-static int
-cputype (inventory_t *inv, void *arg)
-{
- if (inv != NULL
- && inv->inv_class == INV_PROCESSOR
- && inv->inv_type == INV_CPUCHIP)
- {
- int i;
- /* inv_state is the cpu revision number. */
- int impl = (inv->inv_state & C0_IMPMASK) >> C0_IMPSHIFT;
-
- for (i = 0; cpu_types[i].cpu != NULL; i++)
- if (cpu_types[i].impl == impl)
- {
- *((const char **) arg) = cpu_types[i].cpu;
- break;
- }
- }
- return 0;
-}
-#endif
-
/* This will be called by the spec parser in gcc.c when it sees
a %:local_cpu_detect(args) construct. Currently it will be called
with either "arch" or "tune" as argument depending on if -march=native
@@ -92,10 +39,8 @@ const char *
host_detect_local_cpu (int argc, const char **argv)
{
const char *cpu = NULL;
-#ifndef __sgi__
char buf[128];
FILE *f;
-#endif
bool arch;
if (argc < 1)
@@ -105,9 +50,6 @@ host_detect_local_cpu (int argc, const char **argv)
if (!arch && strcmp (argv[0], "tune"))
return NULL;
-#ifdef __sgi__
- scaninvent (cputype, &cpu);
-#else
f = fopen ("/proc/cpuinfo", "r");
if (f == NULL)
return NULL;
@@ -133,7 +75,6 @@ host_detect_local_cpu (int argc, const char **argv)
}
fclose (f);
-#endif
if (cpu == NULL)
return NULL;
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index 49c459bc..af03c3d 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -1,6 +1,6 @@
/* Definitions for MIPS systems using GNU userspace.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+ 2007, 2008, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -48,7 +48,6 @@ along with GCC; see the file COPYING3. If not see
#undef SUBTARGET_CC1_SPEC
#define SUBTARGET_CC1_SPEC "%{profile:-p}"
-/* From iris5.h */
/* -G is incompatible with -KPIC which is the default, so only allow objects
in the small data section if the user explicitly asks for it. */
#undef MIPS_DEFAULT_GVALUE
diff --git a/gcc/config/mips/gnu-user64.h b/gcc/config/mips/gnu-user64.h
index 91b021d..a4e2649 100644
--- a/gcc/config/mips/gnu-user64.h
+++ b/gcc/config/mips/gnu-user64.h
@@ -1,5 +1,5 @@
/* Definitions for MIPS systems using GNU userspace and n32/64 abi.
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011
+ Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@@ -52,9 +52,3 @@ along with GCC; see the file COPYING3. If not see
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".")
-
-/* GNU/Linux doesn't use the same floating-point format that IRIX uses
- for long double. There's no need to override this here, since
- ieee_quad_format is the default, but let's put this here to make
- sure nobody thinks we just forgot to set it to something else. */
-#define MIPS_TFMODE_FORMAT mips_quad_format
diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h
deleted file mode 100644
index 7ab1f78..0000000
--- a/gcc/config/mips/iris6.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/* Definitions of target machine for GNU compiler. IRIX 6.5 version.
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/* We are compiling for IRIX 6 now. */
-#undef TARGET_IRIX6
-#define TARGET_IRIX6 1
-
-/* Default to -mabi=n32 and -mips3. */
-#undef MULTILIB_DEFAULTS
-#define MULTILIB_DEFAULTS { "mabi=n32" }
-
-/* -march=native handling only makes sense with compiler running on
- a MIPS chip. */
-#if defined(__mips__)
-extern const char *host_detect_local_cpu (int argc, const char **argv);
-# define EXTRA_SPEC_FUNCTIONS \
- { "local_cpu_detect", host_detect_local_cpu },
-
-# define MARCH_MTUNE_NATIVE_SPECS \
- " %{march=native:%<march=native %:local_cpu_detect(arch)}" \
- " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
-#else
-# define MARCH_MTUNE_NATIVE_SPECS ""
-#endif
-
-/* Force the default ABI onto the command line in order to make the specs
- easier to write. */
-#undef DRIVER_SELF_SPECS
-#define DRIVER_SELF_SPECS \
- "%{!mabi=*: -mabi=n32}", \
- /* Configuration-independent MIPS rules. */ \
- BASE_DRIVER_SELF_SPECS, \
- MARCH_MTUNE_NATIVE_SPECS
-
-/* IRIX 6.5 has the float and long double forms of math functions. */
-#define TARGET_C99_FUNCTIONS 1
-
-/* MIPS specific debugging info */
-#define MIPS_DEBUGGING_INFO 1
-
-/* Force the generation of dwarf .debug_frame sections even if not
- compiling -g. This guarantees that we can unwind the stack. */
-#define DWARF2_FRAME_INFO 1
-
-/* The system unwinder in libexc requires a specific dwarf return address
- column to work. */
-#undef DWARF_FRAME_RETURN_COLUMN
-#define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
-
-/* The size in bytes of a DWARF field indicating an offset or length
- relative to a debug info section, specified to be 4 bytes in the DWARF-2
- specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */
-#define DWARF_OFFSET_SIZE PTR_SIZE
-
-/* The size in bytes of the initial length field in a debug info
- section. The DWARF 3 (draft) specification defines this to be
- either 4 or 12 (with a 4-byte "escape" word when it's 12), but the
- SGI/MIPS ABI predates this standard and defines it to be the same
- as DWARF_OFFSET_SIZE. */
-#define DWARF_INITIAL_LENGTH_SIZE DWARF_OFFSET_SIZE
-
-/* MIPS assemblers don't have the usual .set foo,bar construct;
- .set is used for assembler options instead. */
-#undef SET_ASM_OP
-#define ASM_OUTPUT_DEF(FILE, LABEL1, LABEL2) \
- do \
- { \
- fputc ('\t', FILE); \
- assemble_name (FILE, LABEL1); \
- fputs (" = ", FILE); \
- assemble_name (FILE, LABEL2); \
- fputc ('\n', FILE); \
- } \
- while (0)
-
-#undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX "."
-
-#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
-
-#undef ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
-
-/* The native IRIX 6 linker does not support merging without a special
- elspec(5) file. */
-#ifndef IRIX_USING_GNU_LD
-#undef HAVE_GAS_SHF_MERGE
-#define HAVE_GAS_SHF_MERGE 0
-#endif
-
-/* Specify wchar_t types. */
-#undef WCHAR_TYPE
-#define WCHAR_TYPE (Pmode == DImode ? "int" : "long int")
-
-#undef WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
-
-/* Same for wint_t. */
-#undef WINT_TYPE
-#define WINT_TYPE (Pmode == DImode ? "int" : "long int")
-
-#undef WINT_TYPE_SIZE
-#define WINT_TYPE_SIZE INT_TYPE_SIZE
-
-/* C99 stdint.h types. */
-#define INT8_TYPE "signed char"
-#define INT16_TYPE "short int"
-#define INT32_TYPE "int"
-#define INT64_TYPE "long long int"
-#define UINT8_TYPE "unsigned char"
-#define UINT16_TYPE "short unsigned int"
-#define UINT32_TYPE "unsigned int"
-#define UINT64_TYPE "long long unsigned int"
-
-#define INT_LEAST8_TYPE "signed char"
-#define INT_LEAST16_TYPE "short int"
-#define INT_LEAST32_TYPE "int"
-#define INT_LEAST64_TYPE "long long int"
-#define UINT_LEAST8_TYPE "unsigned char"
-#define UINT_LEAST16_TYPE "short unsigned int"
-#define UINT_LEAST32_TYPE "unsigned int"
-#define UINT_LEAST64_TYPE "long long unsigned int"
-
-#define INT_FAST8_TYPE "signed char"
-#define INT_FAST16_TYPE "short int"
-#define INT_FAST32_TYPE "int"
-#define INT_FAST64_TYPE "long long int"
-#define UINT_FAST8_TYPE "unsigned char"
-#define UINT_FAST16_TYPE "short unsigned int"
-#define UINT_FAST32_TYPE "unsigned int"
-#define UINT_FAST64_TYPE "long long unsigned int"
-
-#define INTMAX_TYPE "long long int"
-#define UINTMAX_TYPE "long long unsigned int"
-
-#define INTPTR_TYPE "long int"
-#define UINTPTR_TYPE "long unsigned int"
-
-#define SIG_ATOMIC_TYPE "int"
-
-/* Plain char is unsigned in the SGI compiler. */
-#undef DEFAULT_SIGNED_CHAR
-#define DEFAULT_SIGNED_CHAR 0
-
-#define TARGET_OS_CPP_BUILTINS() \
- do \
- { \
- builtin_define_std ("host_mips"); \
- builtin_define_std ("sgi"); \
- builtin_define_std ("unix"); \
- builtin_define_std ("SYSTYPE_SVR4"); \
- builtin_define ("_MODERN_C"); \
- builtin_define ("_SVR4_SOURCE"); \
- builtin_define ("__DSO__"); \
- builtin_assert ("system=unix"); \
- builtin_assert ("system=svr4"); \
- builtin_assert ("machine=sgi"); \
- \
- if (!ISA_MIPS1 && !ISA_MIPS2) \
- builtin_define ("_COMPILER_VERSION=601"); \
- \
- /* We must always define _LONGLONG, even when -ansi is \
- used, because IRIX 5 system header files require it. \
- This is OK, because gcc never warns when long long \
- is used in system header files. \
- \
- An alternative would be to support the SGI builtin \
- type __long_long. */ \
- builtin_define ("_LONGLONG"); \
- \
- /* IRIX 6.5.18 and above provide many ISO C99 \
- features protected by the __c99 macro. \
- libstdc++ v3 needs them as well. */ \
- if (flag_isoc99 || c_dialect_cxx ()) \
- builtin_define ("__c99"); \
- \
- /* The GNU C++ standard library requires that \
- __EXTENSIONS__ and _SGI_SOURCE be defined on at \
- least IRIX 6.2 and probably all IRIX 6 prior to 6.5. \
- We don't need this on IRIX 6.5 itself, but it \
- shouldn't hurt other than the namespace pollution. */ \
- if (!flag_iso || c_dialect_cxx ()) \
- { \
- builtin_define ("__EXTENSIONS__"); \
- builtin_define ("_SGI_SOURCE"); \
- } \
- } \
- while (0)
-
-#undef SUBTARGET_CC1_SPEC
-#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
-
-#undef SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC "%{pthread:-D_REENTRANT}"
-
-#undef INIT_SECTION_ASM_OP
-#define INIT_SECTION_ASM_OP "\t.section\t.gcc_init,\"ax\",@progbits"
-
-#undef FINI_SECTION_ASM_OP
-#define FINI_SECTION_ASM_OP "\t.section\t.gcc_fini,\"ax\",@progbits"
-
-#ifdef IRIX_USING_GNU_LD
-#define IRIX_NO_UNRESOLVED ""
-#else
-#define IRIX_NO_UNRESOLVED "-no_unresolved"
-#endif
-
-#ifdef IRIX_USING_GNU_LD
-#define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
-#define SUBTARGET_WARN_UNUSED_SPEC ""
-#else
-#define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
-#define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
-#endif
-
-/* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC \
- "%{!shared: \
- %{mabi=n32: \
- %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
- %{!p:/usr/lib32/mips4/crt1.o%s}}} \
- %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
- %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
- %{mabi=64: \
- %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
- %{!p:/usr/lib64/mips4/crt1.o}}} \
- %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
- %{!p:/usr/lib64/mips3/crt1.o}}}}} \
- irix-crti.o%s crtbegin.o%s"
-
-#undef LIB_SPEC
-#define LIB_SPEC \
- "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
- -L/usr/lib32} \
- %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
- -L/usr/lib64} \
- %{!shared:" \
- SUBTARGET_DONT_WARN_UNUSED_SPEC \
- " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
- SUBTARGET_WARN_UNUSED_SPEC "}"
-
-/* Avoid getting two warnings for libgcc.a everytime we link. libgcc.a
- contains references to copysignl, so link with libm to resolve them. */
-#undef LIBGCC_SPEC
-#define LIBGCC_SPEC \
- SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc -lm " SUBTARGET_WARN_UNUSED_SPEC
-
-#undef ENDFILE_SPEC
-#define ENDFILE_SPEC \
- "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
- crtend.o%s irix-crtn.o%s \
- %{!shared: \
- %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
- %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
- %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
- %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
-
-/* Generic part of the LINK_SPEC. */
-#undef LINK_SPEC
-#define LINK_SPEC "\
-%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
-%{bestGnum} %{shared} %{non_shared} \
-%{call_shared} %{no_archive} %{exact_version} \
-%{!shared: \
- %{!non_shared: %{!call_shared:%{!r: -call_shared " IRIX_NO_UNRESOLVED "}}}} \
-%{rpath} %{!r: -init __gcc_init -fini __gcc_fini} " IRIX_SUBTARGET_LINK_SPEC
-
-#ifdef IRIX_USING_GNU_LD
-#define IRIX_SUBTARGET_LINK_SPEC \
- "%{mabi=n32: -melf32bmipn32}%{mabi=64: -melf64bmip}"
-#else
- /* Explicitly hide crt symbols that would normally be marked with
- a "hidden" visibility attribute.
-
- We have traditionally disabled this attribute when using the
- native linker because the native linker's visibility support is
- not fully-compatible with the GNU linker's. In particular, the
- native linker does not pull in archive objects purely to resolve
- references to the object's hidden symbols, whereas the GNU
- linker does.
-
- The gcc build system currently hides symbols in some static
- libraries (typically libgcov.a or libgcc.a) whenever visibility
- attributes are supported. On targets with GNU semantics, this
- makes sure that uses of libx.so symbols in one dynamic object are
- not resolved to libx.a symbols in another dynamic object. But
- on targets with IRIX semantics, hiding the symbols prevents the
- static archive from working at all.
-
- It would probably be better to enable visiblity attributes for
- IRIX ld and disable the static archives versioning. It shouldn't
- make anything worse, since libx.a symbols are global by default
- anyway. However, no-one has volunteered to do this yet. */
-
-#define IRIX_SUBTARGET_LINK_SPEC \
- "%{w} -_SYSTYPE_SVR4 -woff 131 \
- %{shared:-hidden_symbol __dso_handle} \
- %{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
-#endif
-
-/* A linker error can empirically be avoided by removing duplicate
- library search directories. */
-#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1
-
-/* The SGI linker doesn't understand constructor priorities. */
-#ifndef IRIX_USING_GNU_LD
-#define SUPPORTS_INIT_PRIORITY 0
-#endif
-
-/* Add -g to mips.h default to avoid confusing gas with local symbols
- generated from stabs info. */
-#undef NM_FLAGS
-#define NM_FLAGS "-Bng"
-
-/* The system header files are C++ aware. */
-/* ??? Unfortunately, most but not all of the headers are C++ aware.
- Specifically, curses.h is not, and as a consequence, defining this
- used to prevent libg++ building. This is no longer the case so
- define it again to prevent other problems, e.g. with getopt in
- unistd.h. We still need some way to fix just those files that need
- fixing. */
-#define NO_IMPLICIT_EXTERN_C 1
-
-/* -G is incompatible with -KPIC which is the default, so only allow objects
- in the small data section if the user explicitly asks for it. */
-#undef MIPS_DEFAULT_GVALUE
-#define MIPS_DEFAULT_GVALUE 0
-
-#define MIPS_TFMODE_FORMAT mips_extended_format
diff --git a/gcc/config/mips/iris6.opt b/gcc/config/mips/iris6.opt
deleted file mode 100644
index 05fc378..0000000
--- a/gcc/config/mips/iris6.opt
+++ /dev/null
@@ -1,45 +0,0 @@
-; IRIX 6.5 options.
-
-; Copyright (C) 2011
-; Free Software Foundation, Inc.
-;
-; This file is part of GCC.
-;
-; GCC is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free
-; Software Foundation; either version 3, or (at your option) any later
-; version.
-;
-; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-; WARRANTY; without even the implied warranty of MERCHANTABILITY or
-; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-; for more details.
-;
-; You should have received a copy of the GNU General Public License
-; along with GCC; see the file COPYING3. If not see
-; <http://www.gnu.org/licenses/>.
-
-; See the GCC internals manual (options.texi) for a description of
-; this file's format.
-
-; Please try to keep this file in ASCII collating order.
-
-bestGnum
-Driver
-
-call_shared
-Driver
-
-exact_version
-Driver
-
-no_archive
-Driver
-
-non_shared
-Driver
-
-pthread
-Driver
-
-; This comment is to ensure we retain the blank line above.
diff --git a/gcc/config/mips/mips-modes.def b/gcc/config/mips/mips-modes.def
index 187c651..ef035ca 100644
--- a/gcc/config/mips/mips-modes.def
+++ b/gcc/config/mips/mips-modes.def
@@ -1,5 +1,5 @@
/* MIPS extra machine modes.
- Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2007, 2008, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
RESET_FLOAT_FORMAT (SF, mips_single_format);
RESET_FLOAT_FORMAT (DF, mips_double_format);
-/* Irix6 will override this via MIPS_TFMODE_FORMAT. */
FLOAT_MODE (TF, 16, mips_quad_format);
/* Vector modes. */
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 45d2537..d1fa160 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -1,6 +1,6 @@
/* Prototypes of target machine for GNU compiler. MIPS version.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
+ 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by A. Lichnewsky (lich@inria.inria.fr).
Changed by Michael Meissner (meissner@osf.org).
@@ -299,7 +299,6 @@ extern bool mips_linked_madd_p (rtx, rtx);
extern bool mips_store_data_bypass_p (rtx, rtx);
extern rtx mips_prefetch_cookie (rtx, rtx);
-extern void irix_asm_output_align (FILE *, unsigned);
extern const char *current_section_name (void);
extern unsigned int current_section_flags (void);
extern bool mips_use_ins_ext_p (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 58f942a..008c776 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5488,9 +5488,6 @@ mips_build_builtin_va_list (void)
layout_type (record);
return record;
}
- else if (TARGET_IRIX6)
- /* On IRIX 6, this type is 'char *'. */
- return build_pointer_type (char_type_node);
else
/* Otherwise, we use 'void *'. */
return ptr_type_node;
@@ -8451,50 +8448,47 @@ mips_file_start (void)
default_file_start ();
/* Generate a special section to describe the ABI switches used to
- produce the resultant binary. This is unnecessary on IRIX and
- causes unwanted warnings from the native linker. */
- if (!TARGET_IRIX6)
- {
- /* Record the ABI itself. Modern versions of binutils encode
- this information in the ELF header flags, but GDB needs the
- information in order to correctly debug binaries produced by
- older binutils. See the function mips_gdbarch_init in
- gdb/mips-tdep.c. */
- fprintf (asm_out_file, "\t.section .mdebug.%s\n\t.previous\n",
- mips_mdebug_abi_name ());
-
- /* There is no ELF header flag to distinguish long32 forms of the
- EABI from long64 forms. Emit a special section to help tools
- such as GDB. Do the same for o64, which is sometimes used with
- -mlong64. */
- if (mips_abi == ABI_EABI || mips_abi == ABI_O64)
- fprintf (asm_out_file, "\t.section .gcc_compiled_long%d\n"
- "\t.previous\n", TARGET_LONG64 ? 64 : 32);
+ produce the resultant binary. */
+
+ /* Record the ABI itself. Modern versions of binutils encode
+ this information in the ELF header flags, but GDB needs the
+ information in order to correctly debug binaries produced by
+ older binutils. See the function mips_gdbarch_init in
+ gdb/mips-tdep.c. */
+ fprintf (asm_out_file, "\t.section .mdebug.%s\n\t.previous\n",
+ mips_mdebug_abi_name ());
+
+ /* There is no ELF header flag to distinguish long32 forms of the
+ EABI from long64 forms. Emit a special section to help tools
+ such as GDB. Do the same for o64, which is sometimes used with
+ -mlong64. */
+ if (mips_abi == ABI_EABI || mips_abi == ABI_O64)
+ fprintf (asm_out_file, "\t.section .gcc_compiled_long%d\n"
+ "\t.previous\n", TARGET_LONG64 ? 64 : 32);
#ifdef HAVE_AS_GNU_ATTRIBUTE
- {
- int attr;
-
- /* No floating-point operations, -mno-float. */
- if (TARGET_NO_FLOAT)
- attr = 0;
- /* Soft-float code, -msoft-float. */
- else if (!TARGET_HARD_FLOAT_ABI)
- attr = 3;
- /* Single-float code, -msingle-float. */
- else if (!TARGET_DOUBLE_FLOAT)
- attr = 2;
- /* 64-bit FP registers on a 32-bit target, -mips32r2 -mfp64. */
- else if (!TARGET_64BIT && TARGET_FLOAT64)
- attr = 4;
- /* Regular FP code, FP regs same size as GP regs, -mdouble-float. */
- else
- attr = 1;
-
- fprintf (asm_out_file, "\t.gnu_attribute 4, %d\n", attr);
- }
+ {
+ int attr;
+
+ /* No floating-point operations, -mno-float. */
+ if (TARGET_NO_FLOAT)
+ attr = 0;
+ /* Soft-float code, -msoft-float. */
+ else if (!TARGET_HARD_FLOAT_ABI)
+ attr = 3;
+ /* Single-float code, -msingle-float. */
+ else if (!TARGET_DOUBLE_FLOAT)
+ attr = 2;
+ /* 64-bit FP registers on a 32-bit target, -mips32r2 -mfp64. */
+ else if (!TARGET_64BIT && TARGET_FLOAT64)
+ attr = 4;
+ /* Regular FP code, FP regs same size as GP regs, -mdouble-float. */
+ else
+ attr = 1;
+
+ fprintf (asm_out_file, "\t.gnu_attribute 4, %d\n", attr);
+ }
#endif
- }
/* If TARGET_ABICALLS, tell GAS to generate -KPIC code. */
if (TARGET_ABICALLS)
@@ -15982,10 +15976,6 @@ mips_option_override (void)
}
}
-#ifdef MIPS_TFMODE_FORMAT
- REAL_MODE_FORMAT (TFmode) = &MIPS_TFMODE_FORMAT;
-#endif
-
/* Make sure that the user didn't turn off paired single support when
MIPS-3D support is requested. */
if (TARGET_MIPS3D
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 5d7f022..3f284a8 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -158,15 +158,9 @@ struct mips_cpu_info {
This is true for both the PIC and non-PIC VxWorks RTP modes. */
#define TARGET_USE_PIC_FN_ADDR_REG (TARGET_ABICALLS || TARGET_VXWORKS_RTP)
-/* True if .gpword or .gpdword should be used for switch tables.
-
- Although GAS does understand .gpdword, the SGI linker mishandles
- the relocations GAS generates (R_MIPS_GPREL32 followed by R_MIPS_64).
- We therefore disable GP-relative switch tables for n64 on IRIX targets. */
+/* True if .gpword or .gpdword should be used for switch tables. */
#define TARGET_GPWORD \
- (TARGET_ABICALLS \
- && !TARGET_ABSOLUTE_ABICALLS \
- && !(mips_abi == ABI_64 && TARGET_IRIX6))
+ (TARGET_ABICALLS && !TARGET_ABSOLUTE_ABICALLS)
/* True if the output must have a writable .eh_frame.
See ASM_PREFERRED_EH_DATA_FORMAT for details. */
@@ -319,9 +313,6 @@ struct mips_cpu_info {
those loads and stores follow it. */
#define TARGET_SYNC_AFTER_SC (!TARGET_OCTEON)
-/* IRIX specific stuff. */
-#define TARGET_IRIX6 0
-
/* Define preprocessor macros for the -march and -mtune options.
PREFIX is either _MIPS_ARCH or _MIPS_TUNE, INFO is the selected
processor. If INFO's canonical name is "foo", define PREFIX to
@@ -348,10 +339,7 @@ struct mips_cpu_info {
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
- /* Everyone but IRIX defines this to mips. */ \
- if (!TARGET_IRIX6) \
- builtin_assert ("machine=mips"); \
- \
+ builtin_assert ("machine=mips"); \
builtin_assert ("cpu=mips"); \
builtin_define ("__mips__"); \
builtin_define ("_mips"); \
@@ -369,22 +357,20 @@ struct mips_cpu_info {
if (TARGET_64BIT) \
builtin_define ("__mips64"); \
\
- if (!TARGET_IRIX6) \
+ /* Treat _R3000 and _R4000 like register-size \
+ defines, which is how they've historically \
+ been used. */ \
+ if (TARGET_64BIT) \
{ \
- /* Treat _R3000 and _R4000 like register-size \
- defines, which is how they've historically \
- been used. */ \
- if (TARGET_64BIT) \
- { \
- builtin_define_std ("R4000"); \
- builtin_define ("_R4000"); \
- } \
- else \
- { \
- builtin_define_std ("R3000"); \
- builtin_define ("_R3000"); \
- } \
+ builtin_define_std ("R4000"); \
+ builtin_define ("_R4000"); \
+ } \
+ else \
+ { \
+ builtin_define_std ("R3000"); \
+ builtin_define ("_R3000"); \
} \
+ \
if (TARGET_FLOAT64) \
builtin_define ("__mips_fpr=64"); \
else \
@@ -548,7 +534,7 @@ struct mips_cpu_info {
{ \
builtin_define ("_LANGUAGE_OBJECTIVE_C"); \
builtin_define ("__LANGUAGE_OBJECTIVE_C"); \
- /* Bizarre, but needed at least for Irix. */ \
+ /* Bizarre, but retained for backwards compatibility. */ \
builtin_define_std ("LANGUAGE_C"); \
builtin_define ("_LANGUAGE_C"); \
} \