without gas.
(mips-sgi-irix6*): Likewise.
* config/mips/iris6gas.h: New file.
* gcc/config.gcc (mips-sgi-irix6*): Use it.
* config/mips/mips.h (TARGET_IRIX): Provide default.
(TARGET_IRIX5): Likewise.
(TARGET_SGI_O32_AS): Likewise.
* config/mips/iris5.h (TARGET_IRIX): Redefine as 1.
(TARGET_IRIX5): Likewise.
* config/mips/iris6.h (TARGET_IRIX6): Remove.
(TARGET_IRIX5): Redefine as 0.
* config/mips/mips.c (mips_output_external): Test for IRIX 6 O32
linker workaround with TARGET_IRIX and mips_abi instead of
ASM_OUTPUT_UNDEF_FUNCTION.
(mips_file_end): Inline old ASM_OUTPUT_UNDEF_FUNCTION definition,
testing TARGET_IRIX and mips_abi explicitly.
* config/mips/iris5.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove.
* config/mips/iris6.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove undef.
* config/mips/mips.c (irix_output_external_libcall): Renamed from
mips_output_external_libcall.
Use new TARGET_IRIX in guard.
* config/mips/mips-protos.h (irix_output_external_libcall): Match
this.
* config/mips/iris5.h (TARGET_ASM_EXTERNAL_LIBCALL): Likewise.
* config/mips/iris5gas.h (HAVE_GAS_SHF_MERGE): Update comment.
Define as 0.
* config/mips/iris6.h (FUNCTION_NAME_ALREADY_DECLARED): Define
depending on mips_abi.
* config/mips/linux.h (FUNCTION_NAME_ALREADY_DECLARED): Define as 1.
* config/mips/mips.c (mips_output_function_prologue): Test
FUNCTION_NAME_ALREADY_DECLARED at runtime.
(mips_output_function_epilogue): Likewise.
(build_mips16_function_stub): Likewise.
(build_mips16_call_stub): Likewise.
* config/mips/mips.h (FUNCTION_NAME_ALREADY_DECLARED): Provide
default.
* config/mips/iris6.h (DWARF2_UNWIND_INFO): Don't define for native
IRIX 6 O32 assembler.
(SUBTARGET_CC1_SPEC): Enforce mips2 ISA with O32 ABI.
(TARGET_OS_CPP_BUILTINS): Define _ABIO32, use it to define
_MIPS_SIM for O32 ABI.
(DWARF2_FRAME_INFO): Don't define for native IRIX 6 O32 assembler.
(ASM_DECLARE_FUNCTION_NAME): Integrate mips.h version.
(ASM_DECLARE_FUNCTION_SIZE): Move undef before redefinition.
Integrate O32 version.
(SUBTARGET_ASM_SPEC): Handle -mabi=32.
(SUBTARGET_ASM_DEBUGGING_SPEC): Add mdebug_asm_spec for gas with
O32 ABI.
(BSS_SECTION_ASM_OP_32): Define.
(BSS_SECTION_ASM_OP_64): Likewise.
(BSS_SECTION_ASM_OP): Define differently for O32 and N32/N64 ABIs
using them.
(TARGET_ASM_NAMED_SECTION): Reflect renaming.
Move up to allow override for O32 ABI without GNU as.
(EH_FRAME_SECTION_NAME): Define explicitly.
(MUST_USE_SJLJ_EXCEPTIONS): Define.
[_MIPS_SIM == _ABIO32 && !GAS] (CTORS_SECTION_ASM_OP,
DTORS_SECTION_ASM_OP): Dummy definitions.
(TARGET_ASM_NAMED_SECTION): Undef statically.
(EH_FRAME_SECTION_NAME): Likewise.
(ASM_OUTPUT_FILENAME): Integrate mips.h version.
(LINK_SPEC): Only use default options -call_shared -no_unresolved
without -r.
Don't pass -init, -fini with -mabi=32.
(COLLECT_PARSE_FLAG): Define.
* config/mips/mips.c (iris6_asm_named_section_1): Changed guard to
TARGET_IRIX.
Renamed to use irix_ prefix.
(iris6_asm_named_section): Likewise.
(iris_section_align_entry_eq): Likewise.
(iris_section_align_entry_hash): Likewise.
(iris6_file_start): Likewise.
(iris6_section_align_1): Likewise.
(iris6_file_end): Likewise.
(iris6_section_type_flags): Likewise.
(iris_section_align_htab): Likewise.
(iris_orig_asm_out_file): Likewise.
[TARGET_IRIX] (TARGET_ASM_FILE_START): Reflect rename.
(TARGET_ASM_FILE_END): Likewise.
(TARGET_SECTION_TYPE_FLAGS): Likewise.
* config/mips/mips.c [TARGET_IRIX5 && !TARGET_IRIX6]
(TARGET_ASM_UNALIGNED_HI_OP): Use runtime initialization in
override_options instead.
(TARGET_ASM_UNALIGNED_SI_OP): Likewise.
(TARGET_ASM_UNALIGNED_DI_OP): Likewise.
* config/mips/mips.c (override_options) [USE_COLLECT2]: Restore
flag_gnu_linker to defaults without USE_COLLECT2 for non-IRIX O32
assemblers.
Likewise for constructor/destructor handling.
(override_options): Handle IRIX O32 assembler quirks.
[TARGET_IRIX] (irix_asm_named_section): Handle O32 ABI with and
without gas.
(mips_file_start): Use new TARGET_IRIX.
(mips_declare_object_name): No special processing for IRIX O32
assembler.
(mips_finish_declare_object): Likewise.
(irix_asm_output_align): Renamed from iris6_asm_output_align.
Don't record alignment for O32 ABI.
(irix_file_start): Renamed from iris6_file_start.
Return early for O32 ABI.
(irix_file_end): Renamed from iris6_file_end.
Don't emit .section directives for O32 ABI.
* config/mips/iris6.h (ASM_OUTPUT_ALIGN): Reflect renaming.
* config/mips/mips-protos.h (irix_asm_output_align): Likewise.
* config/mips/t-iris6 (MULTILIB_OPTIONS): Add mabi=32.
(MULTILIB_OSDIRNAMES): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72600
138bc75d-0d04-0410-961f-
82ee72b054a4
2003-10-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ * config.gcc (mips-sgi-irix6*o32): Only enable use_collect2
+ without gas.
+ (mips-sgi-irix6*): Likewise.
+
+ * config/mips/iris6gas.h: New file.
+ * gcc/config.gcc (mips-sgi-irix6*): Use it.
+
+ * config/mips/mips.h (TARGET_IRIX): Provide default.
+ (TARGET_IRIX5): Likewise.
+ (TARGET_SGI_O32_AS): Likewise.
+ * config/mips/iris5.h (TARGET_IRIX): Redefine as 1.
+ (TARGET_IRIX5): Likewise.
+ * config/mips/iris6.h (TARGET_IRIX6): Remove.
+ (TARGET_IRIX5): Redefine as 0.
+
+ * config/mips/mips.c (mips_output_external): Test for IRIX 6 O32
+ linker workaround with TARGET_IRIX and mips_abi instead of
+ ASM_OUTPUT_UNDEF_FUNCTION.
+ (mips_file_end): Inline old ASM_OUTPUT_UNDEF_FUNCTION definition,
+ testing TARGET_IRIX and mips_abi explicitly.
+ * config/mips/iris5.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove.
+ * config/mips/iris6.h (ASM_OUTPUT_UNDEF_FUNCTION): Remove undef.
+
+ * config/mips/mips.c (irix_output_external_libcall): Renamed from
+ mips_output_external_libcall.
+ Use new TARGET_IRIX in guard.
+ * config/mips/mips-protos.h (irix_output_external_libcall): Match
+ this.
+ * config/mips/iris5.h (TARGET_ASM_EXTERNAL_LIBCALL): Likewise.
+
+ * config/mips/iris5gas.h (HAVE_GAS_SHF_MERGE): Update comment.
+ Define as 0.
+
+ * config/mips/iris6.h (FUNCTION_NAME_ALREADY_DECLARED): Define
+ depending on mips_abi.
+ * config/mips/linux.h (FUNCTION_NAME_ALREADY_DECLARED): Define as 1.
+ * config/mips/mips.c (mips_output_function_prologue): Test
+ FUNCTION_NAME_ALREADY_DECLARED at runtime.
+ (mips_output_function_epilogue): Likewise.
+ (build_mips16_function_stub): Likewise.
+ (build_mips16_call_stub): Likewise.
+ * config/mips/mips.h (FUNCTION_NAME_ALREADY_DECLARED): Provide
+ default.
+
+ * config/mips/iris6.h (DWARF2_UNWIND_INFO): Don't define for native
+ IRIX 6 O32 assembler.
+ (SUBTARGET_CC1_SPEC): Enforce mips2 ISA with O32 ABI.
+ (TARGET_OS_CPP_BUILTINS): Define _ABIO32, use it to define
+ _MIPS_SIM for O32 ABI.
+ (DWARF2_FRAME_INFO): Don't define for native IRIX 6 O32 assembler.
+ (ASM_DECLARE_FUNCTION_NAME): Integrate mips.h version.
+ (ASM_DECLARE_FUNCTION_SIZE): Move undef before redefinition.
+ Integrate O32 version.
+ (SUBTARGET_ASM_SPEC): Handle -mabi=32.
+ (SUBTARGET_ASM_DEBUGGING_SPEC): Add mdebug_asm_spec for gas with
+ O32 ABI.
+ (BSS_SECTION_ASM_OP_32): Define.
+ (BSS_SECTION_ASM_OP_64): Likewise.
+ (BSS_SECTION_ASM_OP): Define differently for O32 and N32/N64 ABIs
+ using them.
+ (TARGET_ASM_NAMED_SECTION): Reflect renaming.
+ Move up to allow override for O32 ABI without GNU as.
+ (EH_FRAME_SECTION_NAME): Define explicitly.
+ (MUST_USE_SJLJ_EXCEPTIONS): Define.
+ [_MIPS_SIM == _ABIO32 && !GAS] (CTORS_SECTION_ASM_OP,
+ DTORS_SECTION_ASM_OP): Dummy definitions.
+ (TARGET_ASM_NAMED_SECTION): Undef statically.
+ (EH_FRAME_SECTION_NAME): Likewise.
+ (ASM_OUTPUT_FILENAME): Integrate mips.h version.
+ (LINK_SPEC): Only use default options -call_shared -no_unresolved
+ without -r.
+ Don't pass -init, -fini with -mabi=32.
+ (COLLECT_PARSE_FLAG): Define.
+
+ * config/mips/mips.c (iris6_asm_named_section_1): Changed guard to
+ TARGET_IRIX.
+ Renamed to use irix_ prefix.
+ (iris6_asm_named_section): Likewise.
+ (iris_section_align_entry_eq): Likewise.
+ (iris_section_align_entry_hash): Likewise.
+ (iris6_file_start): Likewise.
+ (iris6_section_align_1): Likewise.
+ (iris6_file_end): Likewise.
+ (iris6_section_type_flags): Likewise.
+ (iris_section_align_htab): Likewise.
+ (iris_orig_asm_out_file): Likewise.
+ [TARGET_IRIX] (TARGET_ASM_FILE_START): Reflect rename.
+ (TARGET_ASM_FILE_END): Likewise.
+ (TARGET_SECTION_TYPE_FLAGS): Likewise.
+
+ * config/mips/mips.c [TARGET_IRIX5 && !TARGET_IRIX6]
+ (TARGET_ASM_UNALIGNED_HI_OP): Use runtime initialization in
+ override_options instead.
+ (TARGET_ASM_UNALIGNED_SI_OP): Likewise.
+ (TARGET_ASM_UNALIGNED_DI_OP): Likewise.
+ * config/mips/mips.c (override_options) [USE_COLLECT2]: Restore
+ flag_gnu_linker to defaults without USE_COLLECT2 for non-IRIX O32
+ assemblers.
+ Likewise for constructor/destructor handling.
+ (override_options): Handle IRIX O32 assembler quirks.
+ [TARGET_IRIX] (irix_asm_named_section): Handle O32 ABI with and
+ without gas.
+ (mips_file_start): Use new TARGET_IRIX.
+ (mips_declare_object_name): No special processing for IRIX O32
+ assembler.
+ (mips_finish_declare_object): Likewise.
+ (irix_asm_output_align): Renamed from iris6_asm_output_align.
+ Don't record alignment for O32 ABI.
+ (irix_file_start): Renamed from iris6_file_start.
+ Return early for O32 ABI.
+ (irix_file_end): Renamed from iris6_file_end.
+ Don't emit .section directives for O32 ABI.
+ * config/mips/iris6.h (ASM_OUTPUT_ALIGN): Reflect renaming.
+ * config/mips/mips-protos.h (irix_asm_output_align): Likewise.
+
+ * config/mips/t-iris6 (MULTILIB_OPTIONS): Add mabi=32.
+ (MULTILIB_OSDIRNAMES): Likewise.
+
+2003-10-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
* collect2.c (COLLECT_PARSE_FLAG): Provide default.
(main): Use it.
* doc/tm.texi (COLLECT_PARSE_FLAG): Document it.
target_cpu_default="MASK_ABICALLS"
# mips-tfile doesn't work yet
# See comment in mips/iris5.h file.
- use_collect2=yes
+ if test x$gas = xno
+ then
+ use_collect2=yes
+ fi
# if test x$enable_threads = xyes; then
# thread_file='irix'
# fi
;;
mips-sgi-irix6*) # SGI System V.4., IRIX 6
tm_file="${tm_file} mips/iris5.h mips/iris6.h"
+ if test x$gas = xyes
+ then
+ tm_file="${tm_file} mips/iris6gas.h"
+ fi
if test "x$gnu_ld" = xyes
then
tm_file="${tm_file} mips/iris6gld.h"
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"
+ # See comment in mips/iris5.h file. Only enabled for O32 ABI
+ # without GNU as.
+ if test x$gas = xno
+ then
+ use_collect2=yes
+ fi
# if test x$enable_threads = xyes; then
# thread_file='irix'
# fi
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* We are compiling for IRIX now. */
+#undef TARGET_IRIX
+#define TARGET_IRIX 1
+
+/* Allow some special handling for IRIX 5. */
+#undef TARGET_IRIX5
#define TARGET_IRIX5 1
#define ABICALLS_ASM_OP "\t.option pic2"
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. */
-#define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME) \
-do { \
- fputs ("\t.globl ", FILE); \
- assemble_name (FILE, NAME); \
- fputs (" .text\n", FILE); \
-} while (0)
-
/* Also do this for libcalls. */
#undef TARGET_ASM_EXTERNAL_LIBCALL
-#define TARGET_ASM_EXTERNAL_LIBCALL mips_output_external_libcall
+#define TARGET_ASM_EXTERNAL_LIBCALL irix_output_external_libcall
/* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
This is used indirectly by ASM_OUTPUT_EXTERNAL. */
#define NM_FLAGS "-Bng"
/* Disable SHF_MERGE support. Even if gas supports it, the IRIX ld does not
- without a special elspec(5) file. */
+ without a special elspec(5) file.
+
+ FIXME: Only do this if not using GNU ld. */
#undef HAVE_GAS_SHF_MERGE
+#define HAVE_GAS_SHF_MERGE 0
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Let mips.c know we need the IRIX 6 functions. */
-#define TARGET_IRIX6 1
+/* No more special IRIX 5 handling. */
+#undef TARGET_IRIX5
+#define TARGET_IRIX5 0
/* Default to -mabi=n32 and -mips3. */
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mabi=n32" }
-/* IRIX 6 assembler does handle DWARF2 directives. Override setting in
- iris5.h file. */
+/* The IRIX 6 O32 assembler cannot calculate label differences, while both
+ the N32/N64 assembler and gas can. Override setting in iris5.h file. */
#undef DWARF2_UNWIND_INFO
+#define DWARF2_UNWIND_INFO !TARGET_SGI_O32_AS
/* The IRIX 6 assembler will sometimes assign labels to the wrong
section unless the labels are within .ent/.end blocks. Therefore,
/* For IRIX 6, -mabi=64 implies TARGET_LONG64. */
/* This is handled in override_options. */
+/* Default to the mips2 ISA for the O32 ABI. */
#undef SUBTARGET_CC1_SPEC
-#define SUBTARGET_CC1_SPEC ""
+#define SUBTARGET_CC1_SPEC "%{mabi=32: %{!mips*: -mips2}}"
/* #line directives let the O32 assembler create object files that cause the
O32 linker to crash. */
\
if (mips_abi == ABI_32) \
{ \
- builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32"); \
+ builtin_define ("_ABIO32=1"); \
+ builtin_define ("_MIPS_SIM=_ABIO32"); \
builtin_define ("_MIPS_SZLONG=32"); \
builtin_define ("_MIPS_SZPTR=32"); \
} \
/* 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
+#define DWARF2_FRAME_INFO !TARGET_SGI_O32_AS
/* 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
#undef MACHINE_TYPE
#define MACHINE_TYPE "SGI running IRIX 6.x"
-/* 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_DECLARE_FUNCTION_SIZE
-
/* 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
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do { \
- fputs ("\t.ent\t", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
+ if (mips_abi != ABI_32) \
+ { \
+ fputs ("\t.ent\t", STREAM); \
+ assemble_name (STREAM, NAME); \
+ fputs ("\n", STREAM); \
+ assemble_name (STREAM, NAME); \
+ fputs (":\n", STREAM); \
+ } \
} while (0)
/* Likewise, the SGI assembler doesn't like labels after the .end, so we
must output the .end here. */
+#undef ASM_DECLARE_FUNCTION_SIZE
#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
do { \
- fputs ("\t.end\t", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
+ if (mips_abi == ABI_32) \
+ { \
+ tree name_tree = get_identifier (NAME); \
+ TREE_ASM_WRITTEN (name_tree) = 1; \
+ } \
+ else \
+ { \
+ fputs ("\t.end\t", STREAM); \
+ assemble_name (STREAM, NAME); \
+ fputs ("\n", STREAM); \
+ } \
} while (0)
/* Tell function_prologue in mips.c that we have already output the .ent/.end
pseudo-ops. */
-#define FUNCTION_NAME_ALREADY_DECLARED
+#undef FUNCTION_NAME_ALREADY_DECLARED
+#define FUNCTION_NAME_ALREADY_DECLARED (mips_abi != ABI_32)
#undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
on the mipsX option. */
/* If no mips[3,4] option given, give the appropriate default for mabi=X */
#undef SUBTARGET_ASM_SPEC
-#define SUBTARGET_ASM_SPEC "%{!mabi*:-n32} %{!mips*: %{!mabi*:-mips3} %{mabi=n32|mabi=64:-mips3}}"
+#define SUBTARGET_ASM_SPEC "%{!mabi*:-n32} %{mabi=32:-32} %{!mips*: %{!mabi*:-mips3} %{mabi=32:-mips2} %{mabi=n32|mabi=64:-mips3}}"
/* Must pass -g0 to the assembler, otherwise it may overwrite our
debug info with its own debug info. */
#define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
#undef SUBTARGET_ASM_DEBUGGING_SPEC
-#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
+#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0 %(mdebug_asm_spec)"
/* The MIPS assembler occasionally misoptimizes. Since GCC should be
doing scheduling anyhow, just turn off optimization in the assembler. */
and dtor lists this way, so we use -init and -fini to invoke the
do_global_* functions instead of running collect2. */
-#define BSS_SECTION_ASM_OP "\t.section\t.bss"
+#define BSS_SECTION_ASM_OP_32 "\t.data"
+#define BSS_SECTION_ASM_OP_64 "\t.section\t.bss"
+#define BSS_SECTION_ASM_OP \
+ (mips_abi != ABI_32 && mips_abi != ABI_O64 \
+ ? BSS_SECTION_ASM_OP_64 \
+ : BSS_SECTION_ASM_OP_32)
#undef READONLY_DATA_SECTION_ASM_OP
#define READONLY_DATA_SECTION_ASM_OP_32 "\t.rdata"
? READONLY_DATA_SECTION_ASM_OP_64 \
: READONLY_DATA_SECTION_ASM_OP_32)
+/* Switch into a generic section. */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION irix_asm_named_section
+
+/* The default definition in defaults.h cannot cope with the runtime-variable
+ definition of DWARF2_UNWIND_INFO above, so define here explicitly. */
+#define EH_FRAME_SECTION_NAME ".eh_frame"
+
+/* MUST_USE_SJLJ_EXCEPTIONS has the same problem. */
+#define MUST_USE_SJLJ_EXCEPTIONS (DWARF2_UNWIND_INFO == 0)
+
+/* The native IRIX 6 O32 assembler doesn't support named sections, while
+ the N32/N64 assembler does. We need crt{begin, end}.o for the N32/N64
+ ABIs, but there's no way to disable them for just one multilib.
+ Therefore we provide dummy definitions to allow crtstuff.c to compile,
+ but the resulting files are not used for the O32 ABI. */
+
+#if (defined _ABIO32 && _MIPS_SIM == _ABIO32) \
+ && ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GAS) == 0
+
+/* Provide dummy definitions. */
+#define CTORS_SECTION_ASM_OP ""
+#define DTORS_SECTION_ASM_OP ""
+
+/* Undef so JCR_SECTION_NAME isn't defined and __JCR_{LIST, END}__ are not
+ used. */
+#undef TARGET_ASM_NAMED_SECTION
+
+/* Undef so __EH_FRAME_BEGIN__/__FRAME_END__ are not used. */
+#undef EH_FRAME_SECTION_NAME
+
+#endif /* _MIPS_SIM == _ABIO32 && !GAS */
+
/* Define functions to read the name and flags of the current section.
- They are used by iris6_asm_output_align. */
+ They are used by irix_asm_output_align. */
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
abort (); \
}
-/* Switch into a generic section. */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION iris6_asm_named_section
-
/* SGI assembler needs all sorts of extra help to do alignment properly. */
#undef ASM_OUTPUT_ALIGN
-#define ASM_OUTPUT_ALIGN iris6_asm_output_align
+#define ASM_OUTPUT_ALIGN irix_asm_output_align
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT (32768*8)
#define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
do \
{ \
- fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \
+ if (mips_abi == ABI_32) \
+ fprintf (STREAM, "\t.file\t%d ", NUM_SOURCE_FILENAMES); \
+ else \
+ fprintf (STREAM, "\t#.file\t%d ", NUM_SOURCE_FILENAMES); \
output_quoted_string (STREAM, NAME); \
fputs ("\n", STREAM); \
} \
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
%{bestGnum} %{shared} %{non_shared} \
%{call_shared} %{no_archive} %{exact_version} %{w} \
-%{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}} \
-%{rpath} -init __do_global_ctors -fini __do_global_dtors \
+%{!shared: %{!non_shared: %{!call_shared:%{!r: -call_shared -no_unresolved}}}} \
+%{rpath} %{!mabi=32: -init __do_global_ctors -fini __do_global_dtors} \
%{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \
-_SYSTYPE_SVR4 -woff 131 \
%{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
+/* We need to disable collecting for the N32 and N64 ABIs. */
+#define COLLECT_PARSE_FLAG(FLAG) \
+do { \
+ if (! strcmp (FLAG, "-n32") || ! strcmp (FLAG, "-64")) \
+ do_collecting = 0; \
+ if (! strcmp (FLAG, "-32") || ! strcmp (FLAG, "-o32")) \
+ do_collecting = 1; \
+} while (0)
+
#define MIPS_TFMODE_FORMAT mips_extended_format
--- /dev/null
+/* Definitions of target machine for GNU compiler. IRIX 6 with GNU as. */
+
+/* Override mips.h version to match DWARF 2 default. */
+#undef MDEBUG_ASM_SPEC
+#define MDEBUG_ASM_SPEC "%{gstabs*|gcoff*:-mdebug} \
+%{!gstabs*:%{!gcoff*:-no-mdebug}}"
+
+/* Override iris6.h version to always use -init/-fini.
+
+ FIXME: integrate those use separate spec/define for this? */
+#undef LINK_SPEC
+#define LINK_SPEC "\
+%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
+%{bestGnum} %{shared} %{non_shared} \
+%{call_shared} %{no_archive} %{exact_version} %{w} \
+%{!shared: %{!non_shared: %{!call_shared:%{!r: -call_shared -no_unresolved}}}} \
+%{rpath} -init __do_global_ctors -fini __do_global_dtors \
+%{shared:-hidden_symbol __do_global_ctors,__do_global_ctors_1,__do_global_dtors} \
+-_SYSTYPE_SVR4 -woff 131 \
+%{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64}%{!mabi*: -n32}"
+
+/* Disable SHF_MERGE support. Even if gas supports it, the IRIX 6 O32 ld
+ does not without a special elspec(5) file.
+
+ FIXME: Only do this if not using GNU ld. */
+#if HAVE_GAS_SHF_MERGE
+#undef HAVE_GAS_SHF_MERGE
+#define HAVE_GAS_SHF_MERGE (mips_abi != ABI_32)
+#endif /* HAVE_GAS_SHF_MERGE */
+
+/* There's no need to perform collecting with GNU as. */
+#undef COLLECT_PARSE_FLAG
/* Tell function_prologue in mips.c that we have already output the .ent/.end
pseudo-ops. */
-#define FUNCTION_NAME_ALREADY_DECLARED
+#define FUNCTION_NAME_ALREADY_DECLARED 1
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
(flag_pic \
extern void print_operand (FILE *, rtx, int);
extern void print_operand_address (FILE *, rtx);
extern int mips_output_external (FILE *, tree, const char *);
-#if TARGET_IRIX5 || TARGET_IRIX6
-extern void mips_output_external_libcall (rtx);
+#if TARGET_IRIX
+extern void irix_output_external_libcall (rtx);
#endif
extern void mips_output_filename (FILE *, const char *);
extern void mips_output_lineno (FILE *, int);
extern int mips_return_in_memory (tree);
extern const char *mips_emit_prefetch (rtx *);
-extern void iris6_asm_output_align (FILE *, unsigned);
+extern void irix_asm_output_align (FILE *, unsigned);
extern const char *current_section_name (void);
extern unsigned int current_section_flags (void);
static int mips_use_dfa_pipeline_interface (void);
static void mips_init_libfuncs (void);
-#ifdef TARGET_IRIX6
-static void iris6_asm_named_section_1 (const char *, unsigned int,
- unsigned int);
-static void iris6_asm_named_section (const char *, unsigned int);
-static int iris_section_align_entry_eq (const void *, const void *);
-static hashval_t iris_section_align_entry_hash (const void *);
-static void iris6_file_start (void);
-static int iris6_section_align_1 (void **, void *);
+#if TARGET_IRIX
+static void irix_asm_named_section_1 (const char *, unsigned int,
+ unsigned int);
+static void irix_asm_named_section (const char *, unsigned int);
+static int irix_section_align_entry_eq (const void *, const void *);
+static hashval_t irix_section_align_entry_hash (const void *);
+static void irix_file_start (void);
+static int irix_section_align_1 (void **, void *);
static void copy_file_data (FILE *, FILE *);
-static void iris6_file_end (void);
-static unsigned int iris6_section_type_flags (tree, const char *, int);
+static void irix_file_end (void);
+static unsigned int irix_section_type_flags (tree, const char *, int);
#endif
/* Structure to be filled in by compute_frame_size with register
#undef TARGET_ASM_INTEGER
#define TARGET_ASM_INTEGER mips_assemble_integer
-#if TARGET_IRIX5 && !TARGET_IRIX6
-#undef TARGET_ASM_UNALIGNED_HI_OP
-#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.half\t"
-#undef TARGET_ASM_UNALIGNED_SI_OP
-#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.word\t"
-/* The IRIX 6 O32 assembler gives an error for `align 0; .dword', contrary
- to the documentation, so disable it. */
-#undef TARGET_ASM_UNALIGNED_DI_OP
-#define TARGET_ASM_UNALIGNED_DI_OP NULL
-#endif
-
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE mips_output_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
#undef TARGET_ASM_FILE_START
#undef TARGET_ASM_FILE_END
-#ifdef TARGET_IRIX6
-#define TARGET_ASM_FILE_START iris6_file_start
-#define TARGET_ASM_FILE_END iris6_file_end
+#if TARGET_IRIX
+#define TARGET_ASM_FILE_START irix_file_start
+#define TARGET_ASM_FILE_END irix_file_end
#else
#define TARGET_ASM_FILE_START mips_file_start
#define TARGET_ASM_FILE_END mips_file_end
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
-#ifdef TARGET_IRIX6
+#if TARGET_IRIX
#undef TARGET_SECTION_TYPE_FLAGS
-#define TARGET_SECTION_TYPE_FLAGS iris6_section_type_flags
+#define TARGET_SECTION_TYPE_FLAGS irix_section_type_flags
#endif
#undef TARGET_INIT_LIBFUNCS
if (mips_abi != ABI_32 && mips_abi != ABI_O64)
flag_pcc_struct_return = 0;
+#if defined(USE_COLLECT2)
+ /* For IRIX 5 or IRIX 6 with integrated O32 ABI support, USE_COLLECT2 is
+ always defined when GNU as is not in use, but collect2 is only used
+ for the O32 ABI, so override the toplev.c and target-def.h defaults
+ for flag_gnu_linker, TARGET_ASM_{CONSTRUCTOR, DESTRUCTOR} and
+ TARGET_HAVE_CTORS_DTORS.
+
+ Since the IRIX 5 and IRIX 6 O32 assemblers cannot handle named
+ sections, constructor/destructor handling depends on the ABI in use.
+
+ Since USE_COLLECT2 is defined, we only need to restore the non-collect2
+ defaults for the N32/N64 ABIs. */
+ if (TARGET_IRIX && !TARGET_SGI_O32_AS)
+ {
+ flag_gnu_linker = 1;
+
+ targetm.have_ctors_dtors = true;
+ targetm.asm_out.constructor = default_named_section_asm_out_constructor;
+ targetm.asm_out.destructor = default_named_section_asm_out_destructor;
+ }
+#endif
+
+ /* Handle some quirks of the IRIX 5 and IRIX 6 O32 assemblers. */
+
+ if (TARGET_SGI_O32_AS)
+ {
+ /* They don't recognize `.[248]byte'. */
+ targetm.asm_out.unaligned_op.hi = "\t.align 0\n\t.half\t";
+ targetm.asm_out.unaligned_op.si = "\t.align 0\n\t.word\t";
+ /* The IRIX 6 O32 assembler gives an error for `align 0; .dword',
+ contrary to the documentation, so disable it. */
+ targetm.asm_out.unaligned_op.di = NULL;
+
+ /* They cannot handle named sections. */
+ targetm.have_named_sections = false;
+ /* Therefore, EH_FRAME_SECTION_NAME isn't defined and we must use
+ collect2. */
+ targetm.terminate_dw2_eh_frame_info = true;
+ targetm.asm_out.eh_frame_section = collect2_eh_frame_section;
+
+ /* They cannot handle debug information. */
+ if (write_symbols != NO_DEBUG)
+ {
+ /* Adapt wording to IRIX version: IRIX 5 only had a single ABI,
+ so -mabi=32 isn't usually specified. */
+ if (TARGET_IRIX5)
+ warning ("-g is only supported using GNU as,");
+ else
+ warning ("-g is only supported using GNU as with -mabi=32,");
+ warning ("-g option disabled");
+ write_symbols = NO_DEBUG;
+ }
+ }
+
if ((target_flags_explicit & MASK_BRANCHLIKELY) == 0)
{
/* If neither -mbranch-likely nor -mno-branch-likely was given
extern_head = p;
}
-#ifdef ASM_OUTPUT_UNDEF_FUNCTION
- if (TREE_CODE (decl) == FUNCTION_DECL
+ if (TARGET_IRIX && mips_abi == ABI_32
+ && TREE_CODE (decl) == FUNCTION_DECL
/* ??? Don't include alloca, since gcc will always expand it
inline. If we don't do this, the C++ library fails to build. */
&& strcmp (name, "alloca")
p->size = -1;
extern_head = p;
}
-#endif
return 0;
}
-#if TARGET_IRIX5 || TARGET_IRIX6
+#if TARGET_IRIX
void
-mips_output_external_libcall (rtx fun)
+irix_output_external_libcall (rtx fun)
{
register struct extern_list *p;
if (TARGET_GAS)
{
-#if defined(OBJECT_FORMAT_ELF) && !(TARGET_IRIX5 || TARGET_IRIX6)
+#if defined(OBJECT_FORMAT_ELF) && !TARGET_IRIX
/* Generate a special section to describe the ABI switches used to
produce the resultant binary. This used to be done by the assembler
setting bits in the ELF header's flags field, but we have run out of
if (! TREE_ASM_WRITTEN (name_tree))
{
TREE_ASM_WRITTEN (name_tree) = 1;
-#ifdef ASM_OUTPUT_UNDEF_FUNCTION
- if (p->size == -1)
- ASM_OUTPUT_UNDEF_FUNCTION (asm_out_file, p->name);
+ /* In IRIX 5 or IRIX 6 for the O32 ABI, 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. */
+ if (TARGET_IRIX && mips_abi == ABI_32 && p->size == -1)
+ {
+ fputs ("\t.globl ", asm_out_file);
+ assemble_name (asm_out_file, p->name);
+ fputs (" .text\n", asm_out_file);
+ }
else
-#endif
{
fputs ("\t.extern\t", asm_out_file);
assemble_name (asm_out_file, p->name);
mips_declare_object_name (FILE *stream, const char *name,
tree decl ATTRIBUTE_UNUSED)
{
+ if (!TARGET_SGI_O32_AS)
+ {
#ifdef ASM_OUTPUT_TYPE_DIRECTIVE
- ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "object");
+ ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "object");
#endif
- size_directive_output = 0;
- if (!flag_inhibit_size_directive && DECL_SIZE (decl))
- {
- HOST_WIDE_INT size;
+ size_directive_output = 0;
+ if (!flag_inhibit_size_directive && DECL_SIZE (decl))
+ {
+ HOST_WIDE_INT size;
- size_directive_output = 1;
- size = int_size_in_bytes (TREE_TYPE (decl));
- ASM_OUTPUT_SIZE_DIRECTIVE (stream, name, size);
+ size_directive_output = 1;
+ size = int_size_in_bytes (TREE_TYPE (decl));
+ ASM_OUTPUT_SIZE_DIRECTIVE (stream, name, size);
+ }
}
mips_declare_object (stream, name, "", ":\n", 0);
const char *name;
name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
- if (!flag_inhibit_size_directive
+ if (!TARGET_SGI_O32_AS
+ && !flag_inhibit_size_directive
&& DECL_SIZE (decl) != 0
&& !at_end && top_level
&& DECL_INITIAL (decl) == error_mark_node
static void
mips_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
const char *fnname;
-#endif
HOST_WIDE_INT tsize = cfun->machine->frame.total_size;
/* ??? When is this really needed? At least the GNU assembler does not
&& current_function_args_info.fp_code != 0)
build_mips16_function_stub (file);
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- /* Get the function name the same way that toplev.c does before calling
- assemble_start_function. This is needed so that the name used here
- exactly matches the name used in ASM_DECLARE_FUNCTION_NAME. */
- fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
-
- if (!flag_inhibit_size_directive)
+ if (!FUNCTION_NAME_ALREADY_DECLARED)
{
- fputs ("\t.ent\t", file);
+ /* Get the function name the same way that toplev.c does before calling
+ assemble_start_function. This is needed so that the name used here
+ exactly matches the name used in ASM_DECLARE_FUNCTION_NAME. */
+ fnname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
+
+ if (!flag_inhibit_size_directive)
+ {
+ fputs ("\t.ent\t", file);
+ assemble_name (file, fnname);
+ fputs ("\n", file);
+ }
+
assemble_name (file, fnname);
- fputs ("\n", file);
+ fputs (":\n", file);
}
- assemble_name (file, fnname);
- fputs (":\n", file);
-#endif
-
if (!flag_inhibit_size_directive)
{
/* .frame FRAMEREG, FRAMESIZE, RETREG */
set_noreorder = set_nomacro = 0;
}
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- if (!flag_inhibit_size_directive)
+ if (!FUNCTION_NAME_ALREADY_DECLARED && !flag_inhibit_size_directive)
{
const char *fnname;
assemble_name (file, fnname);
fputs ("\n", file);
}
-#endif
while (string_constants != NULL)
{
/* ??? If FUNCTION_NAME_ALREADY_DECLARED is defined, then we are
within a .ent, and we can not emit another .ent. */
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- fputs ("\t.ent\t", file);
- assemble_name (file, stubname);
- fputs ("\n", file);
-#endif
+ if (!FUNCTION_NAME_ALREADY_DECLARED)
+ {
+ fputs ("\t.ent\t", file);
+ assemble_name (file, stubname);
+ fputs ("\n", file);
+ }
assemble_name (file, stubname);
fputs (":\n", file);
fprintf (file, "\t.set\treorder\n");
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- fputs ("\t.end\t", file);
- assemble_name (file, stubname);
- fputs ("\n", file);
-#endif
+ if (!FUNCTION_NAME_ALREADY_DECLARED)
+ {
+ fputs ("\t.end\t", file);
+ assemble_name (file, stubname);
+ fputs ("\n", file);
+ }
fprintf (file, "\t.set\tmips16\n");
fprintf (asm_out_file, "\t.set\tnomips16\n");
assemble_start_function (stubdecl, stubname);
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- fputs ("\t.ent\t", asm_out_file);
- assemble_name (asm_out_file, stubname);
- fputs ("\n", asm_out_file);
+ if (!FUNCTION_NAME_ALREADY_DECLARED)
+ {
+ fputs ("\t.ent\t", asm_out_file);
+ assemble_name (asm_out_file, stubname);
+ fputs ("\n", asm_out_file);
- assemble_name (asm_out_file, stubname);
- fputs (":\n", asm_out_file);
-#endif
+ assemble_name (asm_out_file, stubname);
+ fputs (":\n", asm_out_file);
+ }
/* We build the stub code by hand. That's the only way we can
do it, since we can't generate 32 bit code during a 16 bit
ASM_DECLARE_FUNCTION_SIZE (asm_out_file, stubname, stubdecl);
#endif
-#ifndef FUNCTION_NAME_ALREADY_DECLARED
- fputs ("\t.end\t", asm_out_file);
- assemble_name (asm_out_file, stubname);
- fputs ("\n", asm_out_file);
-#endif
+ if (!FUNCTION_NAME_ALREADY_DECLARED)
+ {
+ fputs ("\t.end\t", asm_out_file);
+ assemble_name (asm_out_file, stubname);
+ fputs ("\n", asm_out_file);
+ }
fprintf (asm_out_file, "\t.set\tmips16\n");
\f
-#ifdef TARGET_IRIX6
+#if TARGET_IRIX
/* Output assembly to switch to section NAME with attribute FLAGS. */
static void
-iris6_asm_named_section_1 (const char *name, unsigned int flags,
+irix_asm_named_section_1 (const char *name, unsigned int flags,
unsigned int align)
{
unsigned int sh_type, sh_flags, sh_entsize;
}
static void
-iris6_asm_named_section (const char *name, unsigned int flags)
+irix_asm_named_section (const char *name, unsigned int flags)
{
- iris6_asm_named_section_1 (name, flags, 0);
+ if (TARGET_SGI_O32_AS)
+ default_no_named_section (name, flags);
+ else if (mips_abi == ABI_32 && TARGET_GAS)
+ default_elf_asm_named_section (name, flags);
+ else
+ irix_asm_named_section_1 (name, flags, 0);
}
/* In addition to emitting a .align directive, record the maximum
alignment requested for the current section. */
-struct GTY (()) iris_section_align_entry
+struct GTY (()) irix_section_align_entry
{
const char *name;
unsigned int log;
unsigned int flags;
};
-static htab_t iris_section_align_htab;
-static FILE *iris_orig_asm_out_file;
+static htab_t irix_section_align_htab;
+static FILE *irix_orig_asm_out_file;
static int
-iris_section_align_entry_eq (const void *p1, const void *p2)
+irix_section_align_entry_eq (const void *p1, const void *p2)
{
- const struct iris_section_align_entry *old = p1;
+ const struct irix_section_align_entry *old = p1;
const char *new = p2;
return strcmp (old->name, new) == 0;
}
static hashval_t
-iris_section_align_entry_hash (const void *p)
+irix_section_align_entry_hash (const void *p)
{
- const struct iris_section_align_entry *old = p;
+ const struct irix_section_align_entry *old = p;
return htab_hash_string (old->name);
}
void
-iris6_asm_output_align (FILE *file, unsigned int log)
+irix_asm_output_align (FILE *file, unsigned int log)
{
const char *section = current_section_name ();
- struct iris_section_align_entry **slot, *entry;
-
- if (! section)
- abort ();
+ struct irix_section_align_entry **slot, *entry;
- slot = (struct iris_section_align_entry **)
- htab_find_slot_with_hash (iris_section_align_htab, section,
- htab_hash_string (section), INSERT);
- entry = *slot;
- if (! entry)
+ if (mips_abi != ABI_32)
{
- entry = (struct iris_section_align_entry *)
- xmalloc (sizeof (struct iris_section_align_entry));
- *slot = entry;
- entry->name = section;
- entry->log = log;
- entry->flags = current_section_flags ();
+ if (! section)
+ abort ();
+
+ slot = (struct irix_section_align_entry **)
+ htab_find_slot_with_hash (irix_section_align_htab, section,
+ htab_hash_string (section), INSERT);
+ entry = *slot;
+ if (! entry)
+ {
+ entry = (struct irix_section_align_entry *)
+ xmalloc (sizeof (struct irix_section_align_entry));
+ *slot = entry;
+ entry->name = section;
+ entry->log = log;
+ entry->flags = current_section_flags ();
+ }
+ else if (entry->log < log)
+ entry->log = log;
}
- else if (entry->log < log)
- entry->log = log;
fprintf (file, "\t.align\t%u\n", log);
}
-/* The Iris assembler does not record alignment from .align directives,
+/* The IRIX assembler does not record alignment from .align directives,
but takes it from the first .section directive seen. Play file
switching games so that we can emit a .section directive at the
beginning of the file with the proper alignment attached. */
static void
-iris6_file_start (void)
+irix_file_start (void)
{
mips_file_start ();
- iris_orig_asm_out_file = asm_out_file;
+ if (mips_abi == ABI_32)
+ return;
+
+ irix_orig_asm_out_file = asm_out_file;
asm_out_file = tmpfile ();
- iris_section_align_htab = htab_create (31, iris_section_align_entry_hash,
- iris_section_align_entry_eq, NULL);
+ irix_section_align_htab = htab_create (31, irix_section_align_entry_hash,
+ irix_section_align_entry_eq, NULL);
}
static int
-iris6_section_align_1 (void **slot, void *data ATTRIBUTE_UNUSED)
+irix_section_align_1 (void **slot, void *data ATTRIBUTE_UNUSED)
{
- const struct iris_section_align_entry *entry
- = *(const struct iris_section_align_entry **) slot;
+ const struct irix_section_align_entry *entry
+ = *(const struct irix_section_align_entry **) slot;
- iris6_asm_named_section_1 (entry->name, entry->flags, 1 << entry->log);
+ irix_asm_named_section_1 (entry->name, entry->flags, 1 << entry->log);
return 1;
}
}
static void
-iris6_file_end (void)
+irix_file_end (void)
{
- /* Emit section directives with the proper alignment at the top of the
- real output file. */
- FILE *temp = asm_out_file;
- asm_out_file = iris_orig_asm_out_file;
- htab_traverse (iris_section_align_htab, iris6_section_align_1, NULL);
+ if (mips_abi != ABI_32)
+ {
+ /* Emit section directives with the proper alignment at the top of the
+ real output file. */
+ FILE *temp = asm_out_file;
+ asm_out_file = irix_orig_asm_out_file;
+ htab_traverse (irix_section_align_htab, irix_section_align_1, NULL);
- /* Copy the data emitted to the temp file to the real output file. */
- copy_file_data (asm_out_file, temp);
+ /* Copy the data emitted to the temp file to the real output file. */
+ copy_file_data (asm_out_file, temp);
+ }
mips_file_end ();
}
default code. */
static unsigned int
-iris6_section_type_flags (tree decl, const char *section, int relocs_p)
+irix_section_type_flags (tree decl, const char *section, int relocs_p)
{
unsigned int flags;
return flags;
}
-
-#endif /* TARGET_IRIX6 */
+#endif /* TARGET_IRIX */
#include "gt-mips.h"
#define TARGET_NEWABI (mips_abi == ABI_N32 || mips_abi == ABI_64)
+/* IRIX specific stuff. */
+#define TARGET_IRIX 0
+#define TARGET_IRIX5 0
+#define TARGET_SGI_O32_AS (TARGET_IRIX && mips_abi == ABI_32 && !TARGET_GAS)
+
/* 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
#define ASM_OUTPUT_EXTERNAL(STREAM,DECL,NAME) \
mips_output_external(STREAM,DECL,NAME)
-
/* This is how to declare a function name. The actual work of
emitting the label is moved to function_prologue, so that we can
get the line number correctly emitted before the .ent directive,
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL)
+#ifndef FUNCTION_NAME_ALREADY_DECLARED
+#define FUNCTION_NAME_ALREADY_DECLARED 0
+#endif
+
/* 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.
# ??? If no mabi=X option given, but a mipsX option is, then should deal
# with that.
-# ??? mabi=32 is deliberately left off the list because it doesn't work yet.
-MULTILIB_OPTIONS=mabi=n32/mabi=64
+MULTILIB_OPTIONS=mabi=32/mabi=n32/mabi=64
MULTILIB_DIRNAMES=
MULTILIB_MATCHES=
-MULTILIB_OSDIRNAMES=. mabi=64
+MULTILIB_OSDIRNAMES=mabi=32 . mabi=64
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib