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