* Makefile.in (rtlanal.o): Depend on $(TM_P_H).
[official-gcc.git] / gcc / config / arm / riscix.h
blob9d5ff7e309dff5ac7c1e539b9ea19882811e4fa9
1 /* Definitions of target machine for GNU compiler. ARM RISCiX version.
2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000
3 Free Software Foundation, Inc.
4 Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
5 work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
6 and Martin Simmons (@harleqn.co.uk).
8 This file is part of GNU CC.
10 GNU CC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
15 GNU CC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GNU CC; see the file COPYING. If not, write to
22 the Free Software Foundation, 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* Translation to find startup files. On RISC iX boxes,
26 crt0, mcrt0 and gcrt0.o are in /usr/lib. */
27 #define STARTFILE_SPEC "\
28 %{pg:/usr/lib/gcrt0.o%s}\
29 %{!pg:%{p:/usr/lib/mcrt0.o%s}\
30 %{!p:/usr/lib/crt0.o%s}}"
32 /* RISC iX has no concept of -lg */
33 /* If -static is specified then link with -lc_n */
35 #ifndef LIB_SPEC
36 #define LIB_SPEC "\
37 %{g*:-lg}\
38 %{!p:%{!pg:%{!static:-lc}%{static:-lc_n}}}\
39 %{p:-lc_p}\
40 %{pg:-lc_p}"
41 #endif
43 /* The RISC iX assembler never deletes any symbols from the object module;
44 and, by default, ld doesn't either. -X causes local symbols starting
45 with 'L' to be deleted, which is what we want. */
46 #ifndef LINK_SPEC
47 #define LINK_SPEC "-X"
48 #endif
50 #ifndef CPP_PREDEFINES
51 #define CPP_PREDEFINES \
52 "-Darm -Driscix -Dunix -Asystem=unix -Acpu=arm -Amachine=arm"
53 #endif
56 /* RISCiX has some weird symbol name munging, that is done to the object module
57 after assembly, which enables multiple libraries to be supported within
58 one (possibly shared) library. It basically changes the symbol name of
59 certain symbols (for example _bcopy is converted to _$bcopy if using BSD)
60 Symrename's parameters are determined as follows:
61 -mno-symrename Don't run symrename
62 -mbsd symrename -BSD <file>
63 -mxopen symrename -XOPEN <file>
64 -ansi symrename - <file>
65 <none> symrename -BSD <file>
68 #ifndef ASM_FINAL_SPEC
69 #if !defined (CROSS_COMPILE)
70 #define ASM_FINAL_SPEC "\
71 %{!mno-symrename: \
72 \n /usr/bin/symrename \
73 -%{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible}BSD}\
74 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible}\
75 %{pedantic:%e-mxopen and -pedantic incompatible}XOPEN}\
76 %{!mbsd:%{!mxopen:%{!ansi:BSD}}} %{c:%{o*:%*}%{!o*:%b.o}}%{!c:%U.o}}"
77 #endif
78 #endif
80 /* None of these is actually used in cc1. If we don't define them in target
81 switches cc1 complains about them. For the sake of argument lets allocate
82 bit 31 of target flags for such options. */
83 #define SUBTARGET_SWITCHES \
84 {"bsd", 0x80000000, N_("Do symbol renaming for BSD")}, \
85 {"xopen", 0x80000000, N_("Do symbol renaming for X/OPEN")}, \
86 {"no-symrename", 0x80000000, N_("Don't do symbol renaming")},
89 /* Run-time Target Specification. */
90 #define TARGET_VERSION \
91 fputs (" (ARM/RISCiX)", stderr);
93 /* This is used in ASM_FILE_START */
94 #define ARM_OS_NAME "RISCiX"
96 /* Unsigned chars produces much better code than signed. */
97 #define DEFAULT_SIGNED_CHAR 0
99 /* Some systems use __main in a way incompatible with its use in gcc, in these
100 cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
101 give the same symbol without quotes for an alternative entry point. You
102 must define both, or neither. */
103 #ifndef NAME__MAIN
104 #define NAME__MAIN "__gccmain"
105 #define SYMBOL__MAIN __gccmain
106 #endif
108 /* size_t is "unsigned int" in RISCiX */
109 #define SIZE_TYPE "unsigned int"
111 /* ptrdiff_t is "int" in RISCiX */
112 #define PTRDIFF_TYPE "int"
114 /* Maths operation domain error number, EDOM */
115 #define TARGET_EDOM 33
117 /* Override the normal default CPU */
118 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
120 /* r10 is reserved by RISCiX */
121 #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
122 fixed_regs[10] = 1; \
123 call_used_regs[10] = 1;
125 #include "arm/aout.h"
127 /* The RISCiX assembler does not understand .set */
128 #undef SET_ASM_OP
130 /* Override CPP_SPEC, there's no point handling endianness (and probably
131 not much point handling apcs_pc), and we want to add the right #defines
132 when using the include files. */
133 #undef CPP_SPEC
134 #define CPP_SPEC "%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) \
135 %{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \
136 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \
137 %{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \
138 %{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}"
140 /* The native RISCiX assembler does not support stabs of any kind; because
141 the native assembler is not used by the compiler, Acorn didn't feel it was
142 necessary to put them in! */
144 #ifdef DBX_DEBUGGING_INFO
145 #undef DBX_DEBUGGING_INFO
146 #endif