|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. MIPS GNU Hurd version.
2: Copyright (C) 1995 Free Software Foundation, Inc.
3:
4: This file is part of GNU CC.
5:
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.
10:
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.
15:
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. */
20:
21: #include <mips/mips.h>
22:
23: #undef SWITCH_TAKES_ARG
24: #undef ASM_FILE_END
25: #undef ASM_OUTPUT_IDENT
26: #undef ASM_OUTPUT_SOURCE_LINE
27: #undef READONLY_DATA_SECTION
28: #undef SELECT_SECTION
29: #undef ASM_DECLARE_FUNCTION_NAME
30: #undef ASM_DECLARE_OBJECT_NAME
31: /* #undef PREFERRED_DEBUGGING_TYPE */
32:
33: #include <svr4.h>
34:
35: #undef MD_EXEC_PREFIX
36: #undef MD_STARTFILE_PREFIX
37: #undef TARGET_VERSION
38: #define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)");
39:
40: /* Output at beginning of assembler file. */
41: /* The .file command should always begin the output. */
42: #undef ASM_FILE_START
43: #define ASM_FILE_START(FILE) \
44: do { \
45: mips_asm_file_start (FILE); \
46: fprintf (FILE, "\t.version\t\"01.01\"\n"); \
47: } while (0)
48:
49: #undef ASM_FILE_END
50: #define ASM_FILE_END(FILE) \
51: do { \
52: mips_asm_file_end(FILE); \
53: fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n", \
54: IDENT_ASM_OP, version_string); \
55: } while (0)
56:
57: #undef ASM_OUTPUT_SOURCE_LINE
58: #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
59: do { \
60: ++sym_lineno; \
61: fprintf ((FILE), ".LM%d:\n\t%s %d,0,%d,.LM%d\n", \
62: sym_lineno, ASM_STABN_OP, N_SLINE, (LINE), sym_lineno); \
63: } while (0)
64:
65: #undef ASM_DECLARE_FUNCTION_NAME
66: #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
67: do { \
68: extern FILE *asm_out_text_file; \
69: \
70: if (TARGET_GP_OPT) \
71: STREAM = asm_out_text_file; \
72: fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
73: assemble_name (STREAM, NAME); \
74: putc (',', STREAM); \
75: fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
76: putc ('\n', STREAM); \
77: ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
78: HALF_PIC_DECLARE (NAME); \
79: } while (0)
80:
81: /* Switch Recognition by gcc.c. Add -G xx support */
82: #undef SWITCH_TAKES_ARG
83: #define SWITCH_TAKES_ARG(CHAR) \
84: ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
85: || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
86: || (CHAR) == 'I' || (CHAR) == 'm' \
87: || (CHAR) == 'h' || (CHAR) == 'z' \
88: || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'G')
89:
90: #undef DEFAULT_PCC_STRUCT_RETURN
91: #define DEFAULT_PCC_STRUCT_RETURN 1
92:
93: #undef DBX_REGISTER_NUMBER
94: #define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ]
95:
96: #define MIPS_GNU
97:
98: #undef CPP_PREDEFINES
99: #define CPP_PREDEFINES GNU_CPP_PREDEFINES("mips") \
100: "-DMIPSEB -DR3000 -D_MIPSEB -D_R3000 \
101: -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32"
102:
103: #undef ASM_SPEC
104: #define ASM_SPEC "\
105: %{mmips-as: \
106: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} \
107: %{pipe: %e-pipe is not supported.} \
108: %{K}} \
109: %{!mmips-as: \
110: %{mcpu=*}} \
111: %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \
112: %{noasmopt:-O0} \
113: %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
114: %{g} %{g0} %{g1} %{g2} %{g3} \
115: %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
116: %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
117: %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
118: %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \
119: %{membedded-pic}"
120:
121: #undef LINK_SPEC
122: #define LINK_SPEC "\
123: %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
124: %{bestGnum} %{shared} %{non_shared} \
125: %{call_shared} %{no_archive} %{exact_version} \
126: %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
127: -systype /gnu/ "
128:
129: #undef LIB_SPEC
130: #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s"
131:
132: #undef STARTFILE_SPEC
133: #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
134:
135: #undef MACHINE_TYPE
136: #define MACHINE_TYPE "GNU MIPS/ELF"
137:
138: #undef YES_UNDERSCORE
139:
140: #undef SDB_DEBUGGING_INFO
141: #undef DBX_DEBUGGING_INFO
142: #undef MIPS_DEBUGGING_INFO
143: #define DWARF_DEBUGGING_INFO
144:
145: #define NO_MIPS_SELECT_SECTION
146:
147: /* Get machine-independent configuration parameters for the GNU system. */
148: #include <gnu.h>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.