OSDN Git Service

(CPP_SPEC): Define LANGUAGE_ASSEMBLY, not
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / iris3.h
1 /* Definitions of target machine for GNU compiler.  Iris version.
2    Copyright (C) 1991 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 #define SGI_TARGET 1            /* inform other mips files this is SGI */
21
22 /* Names to predefine in the preprocessor for this target machine.  */
23
24 #define CPP_PREDEFINES  "-Dunix -Dmips -Dsgi -DSVR3 -Dhost_mips -DMIPSEB -DSYSTYPE_SYSV"
25
26 #define STARTFILE_SPEC  "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
27
28 #define CPP_SPEC "\
29 %{!ansi:-D__EXTENSIONS__} -D_MIPSEB -D_SYSTYPE_SYSV \
30 %{.S:   -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
31 %{.s:   -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
32 %{.cc:  -D_LANGUAGE_C_PLUS_PLUS} \
33 %{.cxx: -D_LANGUAGE_C_PLUS_PLUS} \
34 %{.C:   -D_LANGUAGE_C_PLUS_PLUS} \
35 %{.m:   -D_LANGUAGE_OBJECTIVE_C} \
36 %{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.C: %{!.m: -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}"
37
38 #define LIB_SPEC        "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} crtn.o%s"
39
40 #define MACHINE_TYPE    "Silicon Graphics Mips"
41
42 /* SGI Iris doesn't support -EB/-EL like other MIPS processors.  */
43
44 #define ASM_SPEC "\
45 %{!mgas: \
46         %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \
47         %{pipe: %e-pipe is not supported.} \
48         %{mips1} %{mips2} %{mips3} \
49         %{noasmopt:-O0} \
50         %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
51         %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K} \
52         %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
53         %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
54         %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
55         %{gcoff:-g} %{gstabs0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}} \
56 %{G*}"
57
58 #define LINK_SPEC "\
59 %{G*} \
60 %{!mgas: %{mips1} %{mips2} %{mips3} \
61          %{bestGnum} %{shared} %{non_shared}}"
62
63 /* Always use 1 for .file number.  I [meissner@osf.org] wonder why
64    IRIS needs this.  */
65
66 #define SET_FILE_NUMBER() num_source_filenames = 1
67
68 /* Put out a label after a .loc.  I [meissner@osf.org] wonder why
69    IRIS needs this.  */
70
71 #define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno)
72
73 #define STACK_ARGS_ADJUST(SIZE)                                         \
74 {                                                                       \
75   SIZE.constant += 4;                                                   \
76   if (SIZE.constant < 32)                                               \
77     SIZE.constant = 32;                                                 \
78 }
79
80 /* Define this macro to control use of the character `$' in
81    identifier names.  The value should be 0, 1, or 2.  0 means `$'
82    is not allowed by default; 1 means it is allowed by default if
83    `-traditional' is used; 2 means it is allowed by default provided
84    `-ansi' is not used.  1 is the default; there is no need to
85    define this macro in that case. */
86
87 #define DOLLARS_IN_IDENTIFIERS 0
88
89 /* Tell G++ not to create constructors or destructors with $'s in them.  */
90
91 #define NO_DOLLAR_IN_LABEL 1
92
93 /* Specify size_t, ptrdiff_t, and wchar_t types.  */
94 #define SIZE_TYPE       "unsigned int"
95 #define PTRDIFF_TYPE    "int"
96 #define WCHAR_TYPE      "unsigned char"
97 #define WCHAR_TYPE_SIZE BITS_PER_UNIT
98
99 /* Generate calls to memcpy, etc., not bcopy, etc.  */
100 #define TARGET_MEM_FUNCTIONS
101
102 /* Plain char is unsigned in the SGI compiler.  */
103 #define DEFAULT_SIGNED_CHAR 0
104
105
106 /* A C statement to initialize the variable parts of a trampoline. 
107    ADDR is an RTX for the address of the trampoline; FNADDR is an
108    RTX for the address of the nested function; STATIC_CHAIN is an
109    RTX for the static chain value that should be passed to the
110    function when it is called.
111
112    Silicon Graphics machines are supposed to not have a mprotect
113    function to enable execute protection, but the stack already
114    has execute protection turned on.  Because the MIPS chips have
115    no method to flush the icache without a system call, this can lose
116    if the same address is used for multiple trampolines.  */
117
118 #define INITIALIZE_TRAMPOLINE(ADDR, FUNC, CHAIN)                            \
119 {                                                                           \
120   rtx addr = ADDR;                                                          \
121   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (addr, 28)), FUNC);   \
122   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (addr, 32)), CHAIN);  \
123 }
124
125
126 /* Attempt to turn on access permissions for the stack.  */
127
128 #define TRANSFER_FROM_TRAMPOLINE                                        \
129                                                                         \
130 void                                                                    \
131 __enable_execute_stack (addr)                                           \
132      char *addr;                                                        \
133 {                                                                       \
134 }
135
136 #include "mips/mips.h"