Import final gcc2 snapshot (990109)
[official-gcc.git] / gcc / config / mips / gnu.h
blobbf48bc4dbca2bf9714fbf4d310a217aaccea4f53
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)
9 any later version.
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
26 #undef ASM_FILE_END
27 #undef ASM_OUTPUT_IDENT
28 #undef ASM_OUTPUT_SOURCE_LINE
29 #undef READONLY_DATA_SECTION
30 #undef SELECT_SECTION
31 #undef ASM_DECLARE_FUNCTION_NAME
32 #undef ASM_DECLARE_OBJECT_NAME
33 /* #undef PREFERRED_DEBUGGING_TYPE */
35 #include <svr4.h>
37 #undef MD_EXEC_PREFIX
38 #undef MD_STARTFILE_PREFIX
39 #undef TARGET_VERSION
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. */
44 #undef ASM_FILE_START
45 #define ASM_FILE_START(FILE) \
46 do { \
47 mips_asm_file_start (FILE); \
48 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
49 } while (0)
51 #undef ASM_FILE_END
52 #define ASM_FILE_END(FILE) \
53 do { \
54 mips_asm_file_end(FILE); \
55 fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
56 IDENT_ASM_OP, version_string); \
57 } while (0)
59 #undef ASM_OUTPUT_SOURCE_LINE
60 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
61 do { \
62 ++sym_lineno; \
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); \
65 } while (0)
67 #undef ASM_DECLARE_FUNCTION_NAME
68 #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
69 do { \
70 extern FILE *asm_out_text_file; \
72 if (TARGET_GP_OPT) \
73 STREAM = asm_out_text_file; \
74 fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
75 assemble_name (STREAM, NAME); \
76 putc (',', STREAM); \
77 fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
78 putc ('\n', STREAM); \
79 ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
80 HALF_PIC_DECLARE (NAME); \
81 } while (0)
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) ]
94 #define MIPS_GNU
96 #undef CPP_PREDEFINES
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"
102 #undef LINK_SPEC
103 #define LINK_SPEC "\
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}}} \
108 -systype /gnu/ "
110 #undef LIB_SPEC
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}"
116 #undef MACHINE_TYPE
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. */
129 #include <gnu.h>