diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-02 00:21:56 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-02 00:21:56 +0000 |
commit | ce10b2558b19f8eefc5ea030d077d8e4d4086adc (patch) | |
tree | 0dd71c21138a3a7bbe4887d00e5c94ff332a9767 /gcc | |
parent | d87976fbdef32e4ea147f23f38193a0aa14702bb (diff) | |
download | gcc-ce10b2558b19f8eefc5ea030d077d8e4d4086adc.tar.gz |
* config/mips/iris5.h (SET_FILE_NUMBER): Moved here from iris3.h.
Undef before redefinition.
(LABEL_AFTER_LOC): Likewise.
(DEFAULT_SIGNED_CHAR): Likewise.
(ASM_OUTPUT_ASCII): Moved here from iris4.h.
Fix IRIX spelling.
* config/mips/iris3.h: Remove, unused.
* config/mips/iris4.h: Likewise.
* config/mips/mips.h (STACK_ARGS_ADJUST): Remove, unused.
* config/mips/iris5.h (TARGET_DEFAULT): Move ...
* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here to
target_cpu_default.
* config/mips/iris5.h: Move explicit includes ...
* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here.
* config/mips/iris6.h (MIPS_ISA_DEFAULT, MIPS_ABI_DEFAULT): Move ...
* config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to
tm_defines.
* config/mips/iris6.h (TARGET_DEFAULT): Move ...
* config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to
target_cpu_default.
* config/mips/iris6.h: Fix IRIX spelling.
(MULTILIB_DEFAULTS): Undef before redefinition.
* config/mips/iris6.h: Move explicit includes ...
* config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68808 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 35 | ||||
-rw-r--r-- | gcc/config.gcc | 22 | ||||
-rw-r--r-- | gcc/config/mips/iris5.h | 52 | ||||
-rw-r--r-- | gcc/config/mips/iris6.h | 39 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 10 |
5 files changed, 104 insertions, 54 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd61cda1260..2e02edc63ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,38 @@ +2003-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * config/mips/iris5.h (SET_FILE_NUMBER): Moved here from iris3.h. + Undef before redefinition. + (LABEL_AFTER_LOC): Likewise. + (DEFAULT_SIGNED_CHAR): Likewise. + (ASM_OUTPUT_ASCII): Moved here from iris4.h. + Fix IRIX spelling. + + * config/mips/iris3.h: Remove, unused. + * config/mips/iris4.h: Likewise. + + * config/mips/mips.h (STACK_ARGS_ADJUST): Remove, unused. + + * config/mips/iris5.h (TARGET_DEFAULT): Move ... + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here to + target_cpu_default. + + * config/mips/iris5.h: Move explicit includes ... + * config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): ... here. + + * config/mips/iris6.h (MIPS_ISA_DEFAULT, MIPS_ABI_DEFAULT): Move ... + * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to + tm_defines. + + * config/mips/iris6.h (TARGET_DEFAULT): Move ... + * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here to + target_cpu_default. + + * config/mips/iris6.h: Fix IRIX spelling. + (MULTILIB_DEFAULTS): Undef before redefinition. + + * config/mips/iris6.h: Move explicit includes ... + * config.gcc (mips-sgi-irix6*, mips-sgi-irix5cross64): ... here. + Wed Jul 2 02:16:48 CEST 2003 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_mark_needed_node, cgraph_varpool_mark_needed_node, diff --git a/gcc/config.gcc b/gcc/config.gcc index 688604cda32..7bcfb40028a 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1391,21 +1391,23 @@ mcore-*-pe*) tmake_file=mcore/t-mcore-pe ;; mips-sgi-irix6*o32) # SGI System V.4., IRIX 6, O32 ABI + tm_file="${tm_file} mips/iris5.h" if test x$gas = xyes then - tm_file="mips/iris5.h mips/iris5gas.h mips/iris6-o32-gas.h" + tm_file="${tm_file} mips/iris5gas.h mips/iris6-o32-gas.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h mips/dbxmdebug.h" fi tmake_file=mips/t-iris5-gas else - tm_file="mips/iris5.h mips/iris6-o32-as.h" + tm_file="${tm_file} mips/iris6-o32-as.h" tmake_file=mips/t-iris5-as fi tm_file="${tm_file} mips/iris6-o32.h" tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6" xm_file=mips/xm-iris5.h + target_cpu_default="MASK_ABICALLS" # mips-tfile doesn't work yet # See comment in mips/iris5.h file. use_collect2=yes @@ -1414,21 +1416,24 @@ mips-sgi-irix6*o32) # SGI System V.4., IRIX 6, O32 ABI # fi ;; mips-sgi-irix6*) # SGI System V.4., IRIX 6 + tm_file="${tm_file} mips/iris5.h mips/iris6.h" if test "x$gnu_ld" = xyes then - tm_file="mips/iris6.h mips/iris6gld.h" - else - tm_file=mips/iris6.h + tm_file="${tm_file} mips/iris6gld.h" fi tmake_file="mips/t-iris mips/t-iris5-6 mips/t-iris6" + target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT" + tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" # if test x$enable_threads = xyes; then # thread_file='irix' # fi ;; mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64 - tm_file="mips/iris6.h mips/cross64.h" + tm_file="${tm_file} mips/iris5.h mips/iris6.h mips/cross64.h" xm_file=mips/xm-iris5.h tmake_file="mips/t-iris mips/t-cross64" + target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT" + tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" # See comment in mips/iris[56].h files. use_collect2=yes # if test x$enable_threads = xyes; then @@ -1436,20 +1441,21 @@ mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64 # fi ;; mips-sgi-irix5*) # SGI System V.4., IRIX 5 + tm_file="${tm_file} mips/iris5.h" if test x$gas = xyes then - tm_file="mips/iris5.h mips/iris5gas.h" + tm_file="${tm_file} mips/iris5gas.h" if test x$stabs = xyes then tm_file="${tm_file} dbx.h mips/dbxmdebug.h" fi tmake_file=mips/t-iris5-gas else - tm_file=mips/iris5.h tmake_file=mips/t-iris5-as fi tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6" xm_file=mips/xm-iris5.h + target_cpu_default="MASK_ABICALLS" # mips-tfile doesn't work yet # See comment in mips/iris5.h file. use_collect2=yes diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h index a3af82d339e..a0d1e936d7e 100644 --- a/gcc/config/mips/iris5.h +++ b/gcc/config/mips/iris5.h @@ -1,6 +1,6 @@ -/* Definitions of target machine for GNU compiler. Iris version 5. +/* Definitions of target machine for GNU compiler. IRIX version 5. Copyright (C) 1993, 1995, 1996, 1998, 2000, - 2001, 2002 Free Software Foundation, Inc. + 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. @@ -21,23 +21,16 @@ Boston, MA 02111-1307, USA. */ #define TARGET_IRIX5 1 -#ifndef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_ABICALLS -#endif #define ABICALLS_ASM_OP "\t.option pic2" -#include "mips/iris3.h" -#include "mips/mips.h" -#include "mips/iris4.h" - -/* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c. */ +/* IRIX 5 doesn't use COFF, so disable special COFF handling in collect2.c. */ #undef OBJECT_FORMAT_COFF /* ??? This is correct, but not very useful, because there is no file that uses this macro. */ /* ??? The best way to handle global constructors under ELF is to use .init and .fini sections. Unfortunately, there is apparently no way to get - the Irix 5.x (x <= 2) assembler to create these sections. So we instead + the IRIX 5.x (x <= 2) assembler to create these sections. So we instead use collect. The linker can create these sections via -init and -fini options, but using this would require modifying how crtstuff works, and I will leave that for another time (or someone else). */ @@ -58,6 +51,10 @@ Boston, MA 02111-1307, USA. */ #define WCHAR_TYPE_SIZE INT_TYPE_SIZE #define MAX_WCHAR_TYPE_SIZE 64 +/* Plain char is unsigned in the SGI compiler. */ +#undef DEFAULT_SIGNED_CHAR +#define DEFAULT_SIGNED_CHAR 0 + #define WORD_SWITCH_TAKES_ARG(STR) \ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ || !strcmp (STR, "rpath")) @@ -153,7 +150,19 @@ Boston, MA 02111-1307, USA. */ #undef MACHINE_TYPE #define MACHINE_TYPE "SGI running IRIX 5.x" - /* Dollar signs are OK in Irix5 but not in Irix3. */ +/* Always use 1 for .file number. I [meissner@osf.org] wonder why + IRIX needs this. */ + +#undef SET_FILE_NUMBER +#define SET_FILE_NUMBER() num_source_filenames = 1 + +/* Put out a label after a .loc. I [meissner@osf.org] wonder why + IRIX needs this. */ + +#undef LABEL_AFTER_LOC +#define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno) + + /* Dollar signs are OK in IRIX 5 but not in IRIX 3. */ #undef DOLLARS_IN_IDENTIFIERS #undef NO_DOLLAR_IN_LABEL @@ -162,7 +171,24 @@ Boston, MA 02111-1307, USA. */ #undef MIPS_DEFAULT_GVALUE #define MIPS_DEFAULT_GVALUE 0 -/* In Irix 5, we must output a `.global name .text' directive for every used +/* Some assemblers have a bug that causes backslash escaped chars in .ascii + to be misassembled, so we just completely avoid it. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ +do { \ + const unsigned char *s_ = (const unsigned char *)(PTR); \ + unsigned len_ = (LEN); \ + unsigned i_; \ + for (i_ = 0; i_ < len_; s_++, i_++) \ + { \ + if ((i_ % 8) == 0) \ + fputs ("\n\t.byte\t", (FILE)); \ + fprintf ((FILE), "%s0x%x", (i_%8?",":""), *s_); \ + } \ + fputs ("\n", (FILE)); \ +} while (0) + +/* In IRIX 5, we must output a `.global name .text' directive for every used but undefined function. If we don't, the linker may perform an optimization (skipping over the insns that set $gp) when it is unsafe. This is used indirectly by ASM_OUTPUT_EXTERNAL. */ diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index efdf4c245fe..2a6befdd681 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -1,4 +1,4 @@ -/* Definitions of target machine for GNU compiler. Iris version 6. +/* Definitions of target machine for GNU compiler. IRIX version 6. Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -19,25 +19,18 @@ 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. */ -/* Let mips.c know we need the Irix6 functions. */ +/* Let mips.c know we need the IRIX 6 functions. */ #define TARGET_IRIX6 1 /* Default to -mabi=n32 and -mips3. */ -#define MIPS_ISA_DEFAULT 3 -#define MIPS_ABI_DEFAULT ABI_N32 +#undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS { "mabi=n32" } -#ifndef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT) -#endif - -#include "mips/iris5.h" - -/* Irix6 assembler does handle DWARF2 directives. Override setting in - irix5.h file. */ +/* IRIX 6 assembler does handle DWARF2 directives. Override setting in + iris5.h file. */ #undef DWARF2_UNWIND_INFO -/* The Irix6 assembler will sometimes assign labels to the wrong +/* The IRIX 6 assembler will sometimes assign labels to the wrong section unless the labels are within .ent/.end blocks. Therefore, we avoid creating such labels. */ #define DWARF2_GENERATE_TEXT_SECTION_LABEL 0 @@ -58,19 +51,19 @@ Boston, MA 02111-1307, USA. */ #undef WINT_TYPE_SIZE #define WINT_TYPE_SIZE 32 -/* For Irix 6, -mabi=64 implies TARGET_LONG64. */ +/* For IRIX 6, -mabi=64 implies TARGET_LONG64. */ /* This is handled in override_options. */ #undef SUBTARGET_CC1_SPEC #define SUBTARGET_CC1_SPEC "" -/* We must pass -D_LONGLONG always, even when -ansi is used, because irix6 +/* We must pass -D_LONGLONG always, even when -ansi is used, because IRIX 6 system header files require it. This is OK, because gcc never warns when long long is used in system header files. Alternatively, we can add support for the SGI builtin type __long_long. */ /* The GNU C++ standard library requires that __EXTENSIONS__ and - _SGI_SOURCE be defined on at least irix6.2 and probably all IRIX 6 + _SGI_SOURCE be defined on at least IRIX 6.2 and probably all IRIX 6 prior to 6.5. They normally get defined if !ansi, for g++ we want them regardless. We don't need this on IRIX 6.5 itself, but it shouldn't hurt other than the namespace pollution. */ @@ -145,7 +138,7 @@ Boston, MA 02111-1307, USA. */ } \ } while (0) -/* Irix 6 uses DWARF-2. */ +/* IRIX 6 uses DWARF-2. */ #define DWARF2_DEBUGGING_INFO 1 #define MIPS_DEBUGGING_INFO 1 #undef PREFERRED_DEBUGGING_TYPE @@ -167,7 +160,7 @@ Boston, MA 02111-1307, USA. */ as DWARF_OFFSET_SIZE. */ #define DWARF_INITIAL_LENGTH_SIZE DWARF_OFFSET_SIZE -/* There is no GNU as port for Irix6 yet, so we set MD_EXEC_PREFIX so that +/* There is no GNU as port for IRIX 6 yet, so we set MD_EXEC_PREFIX so that gcc will automatically find SGI as instead of searching the user's path. The latter can fail when building a cross compiler if the user has . in the path before /usr/bin, since then gcc will find and try to use the link @@ -182,13 +175,13 @@ Boston, MA 02111-1307, USA. */ #undef MACHINE_TYPE #define MACHINE_TYPE "SGI running IRIX 6.x" -/* Irix 5 stuff that we don't need for Irix 6. */ +/* IRIX 5 stuff that we don't need for IRIX 6. */ /* ??? We do need this for the -mabi=32 switch though. */ #undef ASM_OUTPUT_UNDEF_FUNCTION #undef ASM_OUTPUT_EXTERNAL_LIBCALL #undef ASM_DECLARE_FUNCTION_SIZE -/* Stuff we need for Irix 6 that isn't in Irix 5. */ +/* Stuff we need for IRIX 6 that isn't in IRIX 5. */ /* The SGI assembler doesn't like labels before the .ent, so we must output the .ent and function name here, which is the normal place for it. */ @@ -237,7 +230,7 @@ Boston, MA 02111-1307, USA. */ #define TYPE_ASM_OP "\t.type\t" #define SIZE_ASM_OP "\t.size\t" -/* Irix assembler does not support the init_priority C++ attribute. */ +/* IRIX assembler does not support the init_priority C++ attribute. */ #undef SUPPORTS_INIT_PRIORITY #define SUPPORTS_INIT_PRIORITY 0 @@ -416,7 +409,7 @@ do \ } \ while (0) -/* Define the `__builtin_va_list' type for the ABI. On Irix6, this +/* Define the `__builtin_va_list' type for the ABI. On IRIX 6, this type is `char *'. */ #undef BUILD_VA_LIST_TYPE #define BUILD_VA_LIST_TYPE(VALIST) \ @@ -448,7 +441,7 @@ do { \ #define LOCAL_LABEL_PREFIX ((mips_abi == ABI_32 || mips_abi == ABI_O64) \ ? "$" : ".") -/* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */ +/* Profiling is supported via libprof1.a not -lc_p as in IRIX 3. */ /* ??? If no mabi=X option give, but a mipsX option is, then should depend on the mipsX option. */ #undef STARTFILE_SPEC diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 06cf288ff42..f69376acb49 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2532,16 +2532,6 @@ extern enum reg_class mips_char_to_class[256]; ((mips_abi == ABI_32 || mips_abi == ABI_O64 || mips_abi == ABI_EABI) \ ? 64 : 128) -/* Make sure 4 words are always allocated on the stack. */ - -#ifndef STACK_ARGS_ADJUST -#define STACK_ARGS_ADJUST(SIZE) \ -{ \ - if (SIZE.constant < 4 * UNITS_PER_WORD) \ - SIZE.constant = 4 * UNITS_PER_WORD; \ -} -#endif - /* A C expression that should indicate the number of bytes of its own arguments that a function pops on returning, or 0 |