1/* Definitions of target machine for GNU compiler.  ARM RISCiX 1.1x version.
2   Copyright (C) 1993, 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).
6
7This file is part of GNU CC.
8
9GNU CC is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)
12any later version.
13
14GNU CC is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with GNU CC; see the file COPYING.  If not, write to
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA.  */
23
24/* RISCiX 1.1x is basically the same as 1.2x except that it doesn't have
25   symrename or atexit. */
26
27/* Translation to find startup files.  On RISCiX boxes, gcrt0.o is in
28   /usr/lib.  */
29#define STARTFILE_SPEC  \
30  "%{pg:/usr/lib/gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
31
32#ifndef CPP_PREDEFINES
33#define CPP_PREDEFINES  "-Darm -Driscix -Dunix -Asystem(unix) -Acpu(arm) -Amachine(arm)"
34#endif
35
36/* Riscix 1.1 doesn't have X/OPEN support, so only accept -mbsd (but ignore
37   it).
38   By not having -mxopen and -mno-symrename, we get warning messages,
39   but everything still compiles.  */
40/* None of these is actually used in cc1, so they modify bit 31 */
41#define SUBTARGET_SWITCHES \
42{"bsd", 0x80000000, ""},
43
44
45/* Run-time Target Specification.  */
46#define TARGET_VERSION  \
47  fputs (" (ARM/RISCiX)", stderr);
48
49/* This is used in ASM_FILE_START */
50#define ARM_OS_NAME "RISCiX"
51
52#ifdef riscos
53#define TARGET_WHEN_DEBUGGING  3
54#else
55#define TARGET_WHEN_DEBUGGING  1
56#endif
57
58/* 'char' is signed by default on RISCiX, unsigned on RISCOS.  */
59#ifdef riscos
60#define DEFAULT_SIGNED_CHAR  0
61#else
62#define DEFAULT_SIGNED_CHAR  1
63#endif
64
65/* Define this if the target system supports the function atexit form the
66   ANSI C standard.  If this is not defined, and INIT_SECTION_ASM_OP is not
67   defined, a default exit function will be provided to support C++.
68   The man page only describes on_exit, but atexit is also there.
69   This seems to be missing in early versions. */
70/*#define HAVE_ATEXIT 1 */
71/* Some systems use __main in a way incompatible with its use in gcc, in these
72   cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
73   give the same symbol without quotes for an alternative entry point.  You
74   must define both, or neither. */
75#ifndef NAME__MAIN
76#define NAME__MAIN "__gccmain"
77#define SYMBOL__MAIN __gccmain
78#endif
79
80/* Override the normal default CPU */
81#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm2
82
83/* r10 is reserved by RISCiX  */
84#define SUBTARGET_CONDITIONAL_REGISTER_USAGE 	\
85  fixed_regs[10] = 1;				\
86  call_used_regs[10] = 1;
87
88
89#include "arm/aout.h"
90
91#undef CPP_SPEC
92#define CPP_SPEC "\
93%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %{!ansi: -D_BSD_C} \
94"
95
96
97/* The native RISCiX assembler does not support stabs of any kind; because
98   the native assembler is not used by the compiler, Acorn didn't feel it was
99   necessary to put them in!  */
100
101#ifdef DBX_DEBUGGING_INFO
102#undef DBX_DEBUGGING_INFO
103#endif
104