From 2ec6afdde74db9ab4223db14c2dde07bd4057ed9 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sat, 4 Feb 1995 10:16:09 -0800 Subject: [PATCH] New file. From-SVN: r8866 --- gcc/config/mips/abi64.h | 166 ++++++++++++++++++++++ gcc/config/mips/cross64.h | 36 +++++ gcc/config/mips/iris6.h | 279 +++++++++++++++++++++++++++++++++++++ gcc/config/mips/t-cross64 | 19 +++ gcc/config/mips/t-iris6 | 11 ++ gcc/config/mips/x-iris6 | 2 + gcc/config/mips/xm-iris6.h | 21 +++ 7 files changed, 534 insertions(+) create mode 100644 gcc/config/mips/abi64.h create mode 100644 gcc/config/mips/cross64.h create mode 100644 gcc/config/mips/iris6.h create mode 100644 gcc/config/mips/t-cross64 create mode 100644 gcc/config/mips/t-iris6 create mode 100644 gcc/config/mips/x-iris6 create mode 100644 gcc/config/mips/xm-iris6.h diff --git a/gcc/config/mips/abi64.h b/gcc/config/mips/abi64.h new file mode 100644 index 00000000000..b8456924f66 --- /dev/null +++ b/gcc/config/mips/abi64.h @@ -0,0 +1,166 @@ +/* Definitions of target machine for GNU compiler. 64 bit ABI support. + Copyright (C) 1994 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC 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 2, or (at your option) +any later version. + +GNU CC 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 GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Macros to implement the 64 bit ABI. This file is meant to be included + after mips.h. */ + +#undef ABI_64BIT +#define ABI_64BIT 1 + +/* For Irix 6, -mips3 implies TARGET_LONG64. */ +#undef TARGET_LONG64 +#define TARGET_LONG64 (target_flags & MASK_64BIT) + +#undef CPP_PREDEFINES +#define CPP_PREDEFINES \ + "-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \ + -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \ + -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)" + +/* We must make -mips3 do what -mlong64 used to do. */ +#undef CPP_SPEC +#define CPP_SPEC "\ +%{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \ +%{.cc: -D_LANGUAGE_C_PLUS_PLUS} \ +%{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \ +%{.C: -D_LANGUAGE_C_PLUS_PLUS} \ +%{.m: -D_LANGUAGE_OBJECTIVE_C -D_LANGUAGE_C} \ +%{.S: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ +%{.s: -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ +%{!.S:%{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}\ +%{mfp32: -D_MIPS_FPSET=16}%{!mfp32: -D_MIPS_FPSET=32} \ +%{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ +%{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ +%{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ +%{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \ +%{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4}}}} \ +%{mips1: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ +%{mips2: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ +%{mips3: -D_MIPS_SIM=_MIPS_SIM_ABI64} \ +%{mips4: -D_MIPS_SIM=_MIPS_SIM_ABI64} \ +%{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_MIPS_SIM=_MIPS_SIM_ABI64}}}} \ +%{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ +%{mips1: -D_MIPS_SZLONG=32}%{mips2: -D_MIPS_SZLONG=32} \ +%{!mips1:%{!mips2: -D_MIPS_SZLONG=64}} \ +%{mips1: -D_MIPS_SZPTR=32}%{mips2: -D_MIPS_SZPTR=32} \ +%{mips3: -D_MIPS_SZPTR=64}%{mips4: -D_MIPS_SZPTR=64} \ +%{!mips1: %{!mips2: %{!mips3: %{!mips4: -D_MIPS_SZPTR=64}}}} \ +%{!mips1:%{!mips2: -D_COMPILER_VERSION=601}} \ +%{mips1: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ +%{mips2: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ +%{!mips1:%{!mips2: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ +%{mips3:-U__mips -D__mips=3} \ +%{!mips1:%{!mips2:-U__mips -D__mips=4}}" + +#undef EMPTY_FIELD_BOUNDARY +#define EMPTY_FIELD_BOUNDARY 32 + +#undef STACK_BOUNDARY +#define STACK_BOUNDARY 128 + +#undef MIPS_STACK_ALIGN +#define MIPS_STACK_ALIGN(LOC) (((LOC)+15) & ~15) + +#undef GP_ARG_LAST +#define GP_ARG_LAST (mips_isa < 3 ? GP_REG_FIRST + 7 : GP_REG_FIRST + 11) +#undef FP_ARG_LAST +#define FP_ARG_LAST (mips_isa < 3 ? FP_REG_FIRST + 15 : FP_REG_FIRST + 19) + +/* fp20-23 are now caller saved. */ +#undef SUBTARGET_CONDITIONAL_REGISTER_USAGE +#define SUBTARGET_CONDITIONAL_REGISTER_USAGE \ +{ \ + if (mips_isa >= 3) \ + { \ + int regno; \ + for (regno = FP_REG_FIRST + 20; regno < FP_REG_FIRST + 24; regno++) \ + call_used_regs[regno] = 1; \ + } \ +} + +#undef MAX_ARGS_IN_REGISTERS +#define MAX_ARGS_IN_REGISTERS (mips_isa < 3 ? 4 : 8) + +#undef REG_PARM_STACK_SPACE +#define REG_PARM_STACK_SPARC(FNDECL) \ + (mips_abi < 3 \ + ? (MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL) \ + : 0) + +#define FUNCTION_ARG_PADDING(MODE, TYPE) \ + (! BYTES_BIG_ENDIAN \ + ? upward \ + : (((MODE) == BLKmode \ + ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ + && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT))\ + : (GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY \ + && (mips_isa < 3 || GET_MODE_CLASS (MODE) == MODE_INT))) \ + ? downward : upward)) + +extern struct rtx_def *type_dependent_reg (); +#define TYPE_DEPENDENT_REG(REGNO, INDEX, TYPE) \ + type_dependent_reg (REGNO, INDEX, TYPE) + +#undef RETURN_IN_MEMORY +#define RETURN_IN_MEMORY(TYPE) \ + (mips_isa < 3 ? TYPE_MODE (TYPE) == BLKmode : int_size_in_bytes (TYPE) > 16) + +extern struct rtx_def *mips_function_value (); +#undef FUNCTION_VALUE +#define FUNCTION_VALUE(VALTYPE, FUNC) mips_function_value (VALTYPE, FUNC) + +/* For varargs, we must save the current argument, because it is the fake + argument va_alist, and will need to be converted to the real argument. + For stdarg, we do not need to save the current argument, because it + is a real argument. */ +#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \ +{ if (mips_isa >= 3 && (CUM).arg_words < MAX_ARGS_IN_REGISTERS - 1) \ + { \ + PRETEND_SIZE \ + = (MAX_ARGS_IN_REGISTERS - (CUM).arg_words \ + - ! current_function_varargs) * UNITS_PER_WORD; \ + \ + if (! (NO_RTL)) \ + move_block_from_reg \ + ((CUM).arg_words + GP_ARG_FIRST + ! current_function_varargs, \ + gen_rtx (MEM, BLKmode, \ + plus_constant (virtual_incoming_args_rtx, \ + - PRETEND_SIZE)), \ + (MAX_ARGS_IN_REGISTERS - (CUM).arg_words \ + - ! current_function_varargs), \ + PRETEND_SIZE, 0); \ + } \ +} + +#define STRICT_ARGUMENT_NAMING + +/* ??? Unimplemented stuff follows. */ + +/* ??? Add support for 16 byte/128 bit long doubles here when + mips_isa >= 3. */ + +/* ??? Make main return zero if user did not specify return value. */ + +/* ??? Add support for .interfaces section, so as to get linker warnings + when stdarg functions called without prototype in scope? */ + +/* ??? Could optimize structure passing by putting the right register rtx + into the field decl, so that if we use the field, we can take the value from + a register instead of from memory. */ + diff --git a/gcc/config/mips/cross64.h b/gcc/config/mips/cross64.h new file mode 100644 index 00000000000..19c17fb5013 --- /dev/null +++ b/gcc/config/mips/cross64.h @@ -0,0 +1,36 @@ +/* Configuration for an Irix 5 host and Irix 6 target using SGI's cross64 + package. */ + +#include "mips/iris6.h" + +#define STANDARD_INCLUDE_DIR "/usr/cross64/usr/include" +#undef MD_EXEC_PREFIX +#define MD_EXEC_PREFIX "/usr/cross64/usr/bin/" +#undef MD_STARTFILE_PREFIX +#define MD_STARTFILE_PREFIX "/usr/cross64/usr/lib/lib64/" + +/* Must add TOOLROOT to the environment, or else the assembler will not + work. */ +#define INIT_ENVIRONMENT \ + putenv ("TOOLROOT=/usr/cross64") + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{mips1:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{mips2:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{!mips1:%{!mips2:%{pg:/usr/cross64/usr/lib64/mips4/gcrt1.o} \ + %{!pg:%{p:/usr/cross64/usr/lib64/mips4/mcrt1.o \ + /usr/cross64/usr/lib64/mips4/libprof1.a} \ + %{!p:/usr/cross64/usr/lib64/mips4/crt1.o}}}}" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + "%{mips1:crtn.o%s}%{mips2:crtn.o%s}%{!mips1:%{!mips2:/usr/cross64/usr/lib64/mips4/crtn.o}}" + +#undef LINK_SPEC +#define LINK_SPEC "\ +-64 -_SYSTYPE_SVR4 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ +%{bestGnum} %{shared} %{non_shared} \ +%{call_shared} %{no_archive} %{exact_version} \ +%{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \ +%{!mips1:%{!mips2:-L/usr/cross64/usr/lib64/mips4 -L/usr/cross64/usr/lib64}}" diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h new file mode 100644 index 00000000000..ea710257274 --- /dev/null +++ b/gcc/config/mips/iris6.h @@ -0,0 +1,279 @@ +/* Definitions of target machine for GNU compiler. Iris version 6. + Copyright (C) 1994 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC 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 2, or (at your option) +any later version. + +GNU CC 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 GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Irix 6 uses DWARF. */ +#define DWARF_DEBUGGING_INFO +#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG + +/* Default to -mips4. */ +#define TARGET_DEFAULT MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT +#define MIPS_ISA_DEFAULT 4 + +#include "mips/iris5gas.h" +#include "mips/abi64.h" + +/* Irix 5 stuff that we don't need for Irix 6. */ +#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. */ + +#undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */ + +/* This is how to equate one symbol to another symbol. The syntax used is + `SYM1=SYM2'. Note that this is different from the way equates are done + with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'. */ + +#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t"); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, " = "); \ + assemble_name (FILE, LABEL2); \ + fprintf (FILE, "\n"); \ + } while (0) + +#define POPSECTION_ASM_OP ".popsection" + +/* To enable use of init and fini sections. */ +#define INIT_SECTION_ASM_OP ".section\t.init" +#undef LD_INIT_SWITCH +#undef LD_FINI_SWITCH +#undef HAS_INIT_SECTION + +#define DEBUG_SECTION ".debug,1,0,0,1" +#define LINE_SECTION ".line,1,0,0,1" +#define SFNAMES_SECTION ".debug_sfnames,1,0,0,1" +#define SRCINFO_SECTION ".debug_srcinfo,1,0,0,1" +#define MACINFO_SECTION ".debug_macinfo,1,0,0,1" +#define PUBNAMES_SECTION ".debug_pubnames,1,0,0,1" +#define ARANGES_SECTION ".debug_aranges,1,0,0,1" + +#undef ASM_SPEC +#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) != 0 +/* GAS */ +#define ASM_SPEC "\ +%{mmips-as: \ + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ +%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{v} \ +%{noasmopt:-O0} \ +%{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ +%{g} %{g0} %{g1} %{g2} %{g3} \ +%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \ +%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \ +%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \ +%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \ +%{membedded-pic}" + +#else +/* not GAS */ +/* Must pass -g0 to the assembler, otherwise it may overwrite our + debug info with its own debug info. */ +/* Must pass -show instead of -v. */ +/* Must pass -G 0 to the assembler, otherwise we may get warnings about + GOT overflow. */ +#define ASM_SPEC "\ +%{!mgas: \ + %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \ + %{pipe: %e-pipe is not supported.} \ + %{K}} \ +%{G*} %{EB} %{EL} %{v:-show} \ +%{mips1} %{mips2} %{mips3} %{mips4} \ +%{!mips1: %{!mips2: %{!mips3: %{!mips4: -mips4}}}} \ +%{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \ +-g0 -G 0 %{membedded-pic}" + +#endif + +/* Stuff for constructors. Start here. */ + +#define CONST_SECTION_ASM_OP_32 "\t.rdata" +#define CONST_SECTION_ASM_OP_64 ".section\t.rodata" +#define CTORS_SECTION_ASM_OP ".section\t.ctors,1,2,0,4" +#define DTORS_SECTION_ASM_OP ".section\t.dtors,1,2,0,4" + +/* This is the pseudo-op used to generate a 32-bit word of data with a + specific value in some section. This is the same for all known svr4 + assemblers. */ + +#define INT_ASM_OP ".word" + +/* A default list of other sections which we might be "in" at any given + time. For targets that use additional sections (e.g. .tdesc) you + should override this definition in the target-specific file which + includes this file. */ + +#undef EXTRA_SECTIONS +#define EXTRA_SECTIONS in_sdata, in_rdata, in_const, in_ctors, in_dtors, in_bss + +/* A default list of extra section function definitions. For targets + that use additional sections (e.g. .tdesc) you should override this + definition in the target-specific file which includes this file. */ + +/* ??? rdata_section is now same as svr4 const_section. */ + +#undef EXTRA_SECTION_FUNCTIONS +#define EXTRA_SECTION_FUNCTIONS \ +void \ +sdata_section () \ +{ \ + if (in_section != in_sdata) \ + { \ + fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ + in_section = in_sdata; \ + } \ +} \ + \ +void \ +rdata_section () \ +{ \ + if (in_section != in_rdata) \ + { \ + if (mips_isa >= 3) \ + fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_64); \ + else \ + fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP_32); \ + in_section = in_rdata; \ + } \ +} \ + CTORS_SECTION_FUNCTION \ + DTORS_SECTION_FUNCTION + +#define CTORS_SECTION_FUNCTION \ +void \ +ctors_section () \ +{ \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ +} + +#define DTORS_SECTION_FUNCTION \ +void \ +dtors_section () \ +{ \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ +} + +/* A C statement (sans semicolon) to output an element in the table of + global constructors. */ +#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + +/* A C statement (sans semicolon) to output an element in the table of + global destructors. */ +#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + +/* Stuff for constructors. End here. */ + +/* ??? Perhaps just include svr4.h in this file? */ + +/* ??? SGI assembler may core dump when compiling with -g. + Sometimes as succeeds, but then we get a linker error. (cmds.c in 072.sc) + Getting rid of .file solves both problems. */ +#undef ASM_OUTPUT_FILENAME +#define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \ +do \ + { \ + fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \ + output_quoted_string (STREAM, NAME); \ + fputs ("\n", STREAM); \ + } \ +while (0) + +/* ??? SGI assembler gives warning whenever .lcomm is used. */ +#undef ASM_OUTPUT_LOCAL +#define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGN) \ +do \ + { \ + if (mips_isa >= 3) \ + { \ + fputs ("\t.section\t.bss\n", STREAM); \ + ASM_DECLARE_OBJECT_NAME (STREAM, NAME, 0); \ + ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \ + ASM_OUTPUT_SKIP (STREAM, SIZE); \ + fprintf (STREAM, "\t%s\n", POPSECTION_ASM_OP); \ + } \ + else \ + mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (SIZE)); \ + } \ +while (0) + +#undef ASM_OUTPUT_INTERNAL_LABEL +#define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM) \ + fprintf (STREAM, ".%s%d:\n", PREFIX, NUM) + +/* This is how to store into the string LABEL + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. */ + +#undef ASM_GENERATE_INTERNAL_LABEL +#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ + sprintf (LABEL, "*.%s%d", PREFIX, NUM) + +#undef STARTFILE_SPEC +/* Profiling is supported via libprof1.a not -lc_p as in Irix 3. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{mips1:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{mips2:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}} \ + %{!mips1:%{!mips2:%{pg:/usr/lib64/gcrt1.o}%{!pg:%{p:/usr/lib64/mcrt1.o /usr/lib64/libprof1.a}%{!p:/usr/lib64/crt1.o}}}}" + +#undef LIB_SPEC +#define LIB_SPEC "%{p:libprof1.a%s}%{pg:libprof1.a%s} -lc" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + "%{mips1:crtn.o%s}%{mips2:crtn.o%s}%{!mips1:%{!mips2:/usr/lib64/crtn.o}}" + +#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: -call_shared -no_unresolved}}} \ +-_SYSTYPE_SVR4" + +/* ??? Debugging does not work. We get many assembler core dumps, + and even some linker core dumps. */ +#undef DBX_DEBUGGING_INFO +#undef SDB_DEBUGGING_INFO +#undef MIPS_DEBUGGING_INFO +#undef DWARF_DEBUGGING_INFO +#undef PREFERRED_DEBUGGING_TYPE diff --git a/gcc/config/mips/t-cross64 b/gcc/config/mips/t-cross64 new file mode 100644 index 00000000000..9482412a844 --- /dev/null +++ b/gcc/config/mips/t-cross64 @@ -0,0 +1,19 @@ +SYSTEM_HEADER_DIR = /usr/cross64/usr/include + +AR = /usr/cross64/usr/bin/ar + +FLOAT_H = $(CROSS_FLOAT_H) + +# The rest of the file is identical to t-iris6. + +# Suppress building libgcc1.a, since the MIPS compiler port is complete +# and does not need anything from libgcc1.a. +LIBGCC1 = +CROSS_LIBGCC1 = + +MULTILIB_OPTIONS=mips1/mips2/mips3/mips4 +MULTILIB_DIRNAMES= +MULTILIB_MATCHES= + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/t-iris6 b/gcc/config/mips/t-iris6 new file mode 100644 index 00000000000..e1a4d50ce41 --- /dev/null +++ b/gcc/config/mips/t-iris6 @@ -0,0 +1,11 @@ +# Suppress building libgcc1.a, since the MIPS compiler port is complete +# and does not need anything from libgcc1.a. +LIBGCC1 = +CROSS_LIBGCC1 = + +MULTILIB_OPTIONS=mips1/mips2/mips3/mips4 +MULTILIB_DIRNAMES= +MULTILIB_MATCHES= + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/mips/x-iris6 b/gcc/config/mips/x-iris6 new file mode 100644 index 00000000000..a1a4facc42f --- /dev/null +++ b/gcc/config/mips/x-iris6 @@ -0,0 +1,2 @@ +# Find all of the declarations from the header files +FIXPROTO_DEFINES= -D__EXTENSIONS__ diff --git a/gcc/config/mips/xm-iris6.h b/gcc/config/mips/xm-iris6.h new file mode 100644 index 00000000000..775497cc80f --- /dev/null +++ b/gcc/config/mips/xm-iris6.h @@ -0,0 +1,21 @@ +#define MIPS_OVERRIDE_ALLOCA +#ifndef __GNUC__ +#include +#else +extern void *alloca (); +#endif + +#include "mips/xm-iris5.h" + +#undef HOST_BITS_PER_LONG +#define HOST_BITS_PER_LONG 64 + +/* Declare some functions needed for this machine. We don't want to + include these in the sources since other machines might define them + differently. */ + +extern void *malloc (), *realloc (), *calloc (); + +#ifndef inhibit_libc +#include "string.h" +#endif -- 2.30.2