update copyrights in config dir.
[official-gcc.git] / gcc / config / arm / riscix.h
blob37bd1fe313cc1a851aee058dbc847999b75ce8d5
1 /* Definitions of target machine for GNU compiler. ARM RISCiX version.
2 Copyright (C) 1993, 1994, 1995, 1997, 1999 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, "Do symbol renaming for BSD"}, \
84 {"xopen", 0x80000000, "Do symbol renaming for X/OPEN"}, \
85 {"no-symrename", 0x80000000, "Don't do symbol renaming"},
88 /* Run-time Target Specification. */
89 #define TARGET_VERSION \
90 fputs (" (ARM/RISCiX)", stderr);
92 /* This is used in ASM_FILE_START */
93 #define ARM_OS_NAME "RISCiX"
95 /* Unsigned chars produces much better code than signed. */
96 #define DEFAULT_SIGNED_CHAR 0
98 /* Some systems use __main in a way incompatible with its use in gcc, in these
99 cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
100 give the same symbol without quotes for an alternative entry point. You
101 must define both, or neither. */
102 #ifndef NAME__MAIN
103 #define NAME__MAIN "__gccmain"
104 #define SYMBOL__MAIN __gccmain
105 #endif
107 /* size_t is "unsigned int" in RISCiX */
108 #define SIZE_TYPE "unsigned int"
110 /* ptrdiff_t is "int" in RISCiX */
111 #define PTRDIFF_TYPE "int"
113 /* Maths operation domain error number, EDOM */
114 #define TARGET_EDOM 33
116 /* Override the normal default CPU */
117 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
119 /* r10 is reserved by RISCiX */
120 #define SUBTARGET_CONDITIONAL_REGISTER_USAGE \
121 fixed_regs[10] = 1; \
122 call_used_regs[10] = 1;
124 #include "arm/aout.h"
126 /* The RISCiX assembler does not understand .set */
127 #undef SET_ASM_OP
129 /* Override CPP_SPEC, there's no point handling endianness (and probably
130 not much point handling apcs_pc), and we want to add the right #defines
131 when using the include files. */
132 #undef CPP_SPEC
133 #define CPP_SPEC "%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) \
134 %{mbsd:%{pedantic:%e-mbsd and -pedantic incompatible} -D_BSD_C} \
135 %{mxopen:%{mbsd:%e-mbsd and -mxopen incompatible} \
136 %{pedantic:%e-mxopen and -pedantic incompatible} -D_XOPEN_C} \
137 %{!mbsd:%{!mxopen:%{!ansi: -D_BSD_C}}}"
139 /* The native RISCiX assembler does not support stabs of any kind; because
140 the native assembler is not used by the compiler, Acorn didn't feel it was
141 necessary to put them in! */
143 #ifdef DBX_DEBUGGING_INFO
144 #undef DBX_DEBUGGING_INFO
145 #endif