1 /* Definitions of target machine for GNU compiler. MIPS GNU Hurd version.
2 Copyright (C) 1995, 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #define TARGET_DEFAULT MASK_GAS
23 #include <mips/mips.h>
25 #undef SWITCH_TAKES_ARG
27 #undef ASM_OUTPUT_IDENT
28 #undef ASM_OUTPUT_SOURCE_LINE
29 #undef READONLY_DATA_SECTION
31 #undef ASM_DECLARE_FUNCTION_NAME
32 #undef ASM_DECLARE_OBJECT_NAME
33 /* #undef PREFERRED_DEBUGGING_TYPE */
38 #undef MD_STARTFILE_PREFIX
40 #define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)");
42 /* Output at beginning of assembler file. */
43 /* The .file command should always begin the output. */
45 #define ASM_FILE_START(FILE) \
47 mips_asm_file_start (FILE); \
48 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
52 #define ASM_FILE_END(FILE) \
54 mips_asm_file_end(FILE); \
55 fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
56 IDENT_ASM_OP, version_string); \
59 #undef ASM_OUTPUT_SOURCE_LINE
60 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
63 fprintf ((FILE), ".LM%d:\n\t%s %d,0,%d,.LM%d\n", \
64 sym_lineno, ASM_STABN_OP, N_SLINE, (LINE), sym_lineno); \
67 #undef ASM_DECLARE_FUNCTION_NAME
68 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
70 extern FILE *asm_out_text_file; \
73 STREAM = asm_out_text_file; \
74 fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
75 assemble_name (STREAM, NAME); \
77 fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
78 putc ('\n', STREAM); \
79 ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
80 HALF_PIC_DECLARE (NAME); \
83 /* Switch Recognition by gcc.c. Add -G xx support */
84 #undef SWITCH_TAKES_ARG
85 #define SWITCH_TAKES_ARG(CHAR) \
86 (DEFAULT_SWITCH_TAKES_ARG(CHAR) || (CHAR) == 'G')
88 #undef DEFAULT_PCC_STRUCT_RETURN
89 #define DEFAULT_PCC_STRUCT_RETURN 1
91 #undef DBX_REGISTER_NUMBER
92 #define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ]
97 #define CPP_PREDEFINES "-Dmips -Acpu(mips) -Amachine(mips) \
98 -Dunix -Asystem(unix) -DMACH -Asystem(mach) -D__GNU__ -Asystem(gnu) \
99 -DMIPSEB -DR3000 -D_MIPSEB -D_R3000 \
100 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32"
104 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
105 %{bestGnum} %{shared} %{non_shared} \
106 %{call_shared} %{no_archive} %{exact_version} \
107 %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
111 #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
113 #undef STARTFILE_SPEC
114 #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
117 #define MACHINE_TYPE "GNU MIPS/ELF"
119 #undef YES_UNDERSCORE
121 #undef SDB_DEBUGGING_INFO
122 #undef DBX_DEBUGGING_INFO
123 #undef MIPS_DEBUGGING_INFO
124 #define DWARF_DEBUGGING_INFO
126 #define NO_MIPS_SELECT_SECTION
128 /* Get machine-independent configuration parameters for the GNU system. */