comparison src/m/acorn.h @ 9023:1f1081c31047

Initial revision
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 Sep 1994 18:35:06 +0000
parents
children d8000a9e6003
comparison
equal deleted inserted replaced
9022:10fa443c671a 9023:1f1081c31047
1 /* Machine description file for Acorn RISCiX machines.
2 Copyright (C) 1994 Free Software Foundation, Inc.
3
4 This file is part of GNU Emacs.
5
6 GNU Emacs 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 Emacs 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 Emacs; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20
21
22 /* The following three symbols give information on
23 the size of various data types. */
24
25 #define SHORTBITS 16 /* Number of bits in a short */
26
27 #define INTBITS 32 /* Number of bits in an int */
28
29 #define LONGBITS 32 /* Number of bits in a long */
30
31 /* Define BIG_ENDIAN iff lowest-numbered byte in a word
32 is the most significant byte. */
33
34 #undef BIG_ENDIAN
35
36 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
37 * group of arguments and treat it as an array of the arguments. We can't
38 * do this on the arm with gcc, since the first 4 args are in registers. */
39
40 #ifdef __GNUC__
41 #define NO_ARG_ARRAY
42 #else
43 #undef NO_ARG_ARRAY
44 #endif
45
46 /* Define WORD_MACHINE if addresses and such have
47 * to be corrected before they can be used as byte counts. */
48
49 #undef WORD_MACHINE
50
51 /* Define how to take a char and sign-extend into an int.
52 On machines where char is signed, this is a no-op. */
53
54 /* ARM note - The RISCiX Norcroft C Compiler has ALL
55 non-32-bit types as unsigned */
56
57 #define SIGN_EXTEND_CHAR(c) (((int)(c) << 24) >> 24)
58
59 /* Now define a symbol for the cpu type, if your compiler
60 does not define it automatically:
61 Ones defined so far include vax, m68000, ns16000, pyramid,
62 orion, tahoe, APOLLO and many others */
63
64 /* ARM note - this is done by the Norcroft compiler - symbol is `__arm' */
65
66 /* Use type int rather than a union, to represent Lisp_Object */
67 /* This is desirable for most machines. */
68
69 #define NO_UNION_TYPE
70
71 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
72 the 24-bit bit field into an int. In other words, if bit fields
73 are always unsigned.
74
75 If you use NO_UNION_TYPE, this flag does not matter. */
76
77 #define EXPLICIT_SIGN_EXTEND
78
79 #ifdef LDAV_SYMBOL
80 #undef LDAV_SYMBOL
81 #endif
82
83 #define LDAV_SYMBOL "_iavenrun"
84
85
86 /* Data type of load average, as read out of kmem. */
87
88 #define LOAD_AVE_TYPE long
89
90 /* Convert that into an integer that is 100 for a load average of 1.0 */
91
92 /*
93 * Scale factor for scaled integers used to count
94 * %cpu time and load averages.
95 */
96
97 /* FSHIFT and FSCALE are defined in param.h, but are required by
98 LOAD_AVE_CVT, so they need to be defined here. */
99
100 #ifndef FSHIFT
101 #define FSHIFT 8 /* bits to right of fixed binary point */
102 #endif
103
104 #ifndef FSCALE
105 #define FSCALE (1<<FSHIFT)
106 #endif
107
108 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
109
110 /* Define CANNOT_DUMP on machines where unexec does not work.
111 Then the function dump-emacs will not be defined
112 and temacs will do (load "loadup") automatically unless told otherwise. */
113
114 #undef CANNOT_DUMP
115
116 /* Define VIRT_ADDR_VARIES if the virtual addresses of
117 pure and impure space as loaded can vary, and even their
118 relative order cannot be relied on.
119
120 Otherwise Emacs assumes that text space precedes data space,
121 numerically. */
122
123 #undef VIRT_ADDR_VARIES
124
125 /* This prevents Emacs dumping an unsqueezed binary with the
126 SQUEEZE bit set in the magic number. */
127
128 #define ADJUST_EXEC_HEADER {hdr.a_magic &= ~MF_SQUEEZED;}
129
130 /* Define C_ALLOCA if this machine does not support a true alloca
131 and the one written in C should be used instead.
132 Define HAVE_ALLOCA to say that the system provides a properly
133 working alloca function and it should be used.
134 Define neither one if an assembler-language alloca
135 in the file alloca.s should be used. */
136
137 #ifdef __GNUC__
138
139 /* Use builtin alloca. Also be sure that no other ones are tried out. */
140 #define alloca __builtin_alloca
141 #define HAVE_ALLOCA
142
143 /* Keep gcc/RISCiX happy - it uses __gccmain where other versions of
144 gcc use __main, because of a library routine name clash. */
145 #define __main __gccmain
146
147 #else
148 #define C_ALLOCA
149 #undef HAVE_ALLOCA
150 #endif /* __GNUC__ */
151
152 /* Define NO_REMAP if memory segmentation makes it not work well
153 to change the boundary between the text section and data section
154 when Emacs is dumped. If you define this, the preloaded Lisp
155 code will not be sharable; but that's better than failing completely. */
156
157 #define NO_REMAP
158
159
160 #ifndef NOT_C_CODE
161 #define TEXT_START 0x8000
162 #define DATA_END &_edata
163 extern int _edata;
164 #define etext _etext
165 #endif
166
167 /* Avoid debugging library */
168 #define LIBS_DEBUG
169
170 /* Avoid sharing libc */
171 #define LIB_STANDARD -lc_n
172
173 /* Avoid sharing libX11 */
174 #define LIB_X11_LIB -lX11_n
175
176 /* All kinds of symbol definitions, so as to avoid multiply defined symbol
177 errors from the RISCiX linker. */
178
179 #ifdef __GNUC__
180 #define C_DEBUG_SWITCH
181
182 #define C_OPTIMIZE_SWITCH -O1 -fomit-frame-pointer -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree -D___type=
183
184 #else
185 #define C_DEBUG_SWITCH -O -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree
186 #endif
187
188 /* Turn this on to avoid the emacs malloc and use standard one */
189
190 #undef SYSTEM_MALLOC
191
192 /* Use <dirent.h>. */
193 #define SYSV_SYSTEM_DIR
194
195 /* PURESIZE needs to be slightly bigger on the Arm */
196 #define PURESIZE 260000
197
198 /* For the portable alloca */
199 #define STACK_DIRECTION -1
200
201 #ifdef NO_REMAP
202 /* CRT0_O is defined in s/riscix1-1.h or s/riscix1-2.h, as appropriate. */
203 #define START_FILES pre-crt0.o CRT0_O
204 #else
205 Cannot
206 do
207 this
208 yet
209 #endif