annotate src/m/acorn.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 0132846995bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* Machine description file for Acorn RISCiX machines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 /* Define WORD_MACHINE if addresses and such have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 * to be corrected before they can be used as byte counts. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #undef WORD_MACHINE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 /* Define how to take a char and sign-extend into an int.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 On machines where char is signed, this is a no-op. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 /* ARM note - The RISCiX Norcroft C Compiler has ALL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 non-32-bit types as unsigned */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #define SIGN_EXTEND_CHAR(c) (((int)(c) << 24) >> 24)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 /* Now define a symbol for the cpu type, if your compiler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 does not define it automatically:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 Ones defined so far include vax, m68000, ns16000, pyramid,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 orion, tahoe, APOLLO and many others */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 /* ARM note - this is done by the Norcroft compiler - symbol is `__arm' */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 the bit field into an int. In other words, if bit fields
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 are always unsigned.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 If you use NO_UNION_TYPE, this flag does not matter. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #define EXPLICIT_SIGN_EXTEND
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #ifdef LDAV_SYMBOL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #undef LDAV_SYMBOL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 #define LDAV_SYMBOL "_iavenrun"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 /* Data type of load average, as read out of kmem. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #define LOAD_AVE_TYPE long
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 /* Convert that into an integer that is 100 for a load average of 1.0 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 * Scale factor for scaled integers used to count
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 * %cpu time and load averages.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 /* FSHIFT and FSCALE are defined in param.h, but are required by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 LOAD_AVE_CVT, so they need to be defined here. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 #ifndef FSHIFT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 #define FSHIFT 8 /* bits to right of fixed binary point */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 #ifndef FSCALE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 #define FSCALE (1<<FSHIFT)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 /* Define CANNOT_DUMP on machines where unexec does not work.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 Then the function dump-emacs will not be defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 and temacs will do (load "loadup") automatically unless told otherwise. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 #undef CANNOT_DUMP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 /* Define VIRT_ADDR_VARIES if the virtual addresses of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 pure and impure space as loaded can vary, and even their
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 relative order cannot be relied on.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 Otherwise Emacs assumes that text space precedes data space,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 numerically. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 #undef VIRT_ADDR_VARIES
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 /* This prevents Emacs dumping an unsqueezed binary with the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 SQUEEZE bit set in the magic number. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 #define ADJUST_EXEC_HEADER {hdr.a_magic &= ~MF_SQUEEZED;}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 /* Define C_ALLOCA if this machine does not support a true alloca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 and the one written in C should be used instead.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 Define HAVE_ALLOCA to say that the system provides a properly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 working alloca function and it should be used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 Define neither one if an assembler-language alloca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 in the file alloca.s should be used. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 #ifdef __GNUC__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 /* Use builtin alloca. Also be sure that no other ones are tried out. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 #define alloca __builtin_alloca
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 #define HAVE_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 /* Keep gcc/RISCiX happy - it uses __gccmain where other versions of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 gcc use __main, because of a library routine name clash. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 #define __main __gccmain
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 #define C_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #undef HAVE_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 #endif /* __GNUC__ */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 /* Define NO_REMAP if memory segmentation makes it not work well
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 to change the boundary between the text section and data section
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 when Emacs is dumped. If you define this, the preloaded Lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 code will not be sharable; but that's better than failing completely. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 #define NO_REMAP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 #define TEXT_START 0x8000
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 #define DATA_END &_edata
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 extern int _edata;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 #define etext _etext
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 /* Avoid debugging library */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 #define LIBS_DEBUG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 /* Avoid sharing libc */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 #define LIB_STANDARD -lc_n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 /* Avoid sharing libX11 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 #define LIB_X11_LIB -lX11_n
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 /* All kinds of symbol definitions, so as to avoid multiply defined symbol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 errors from the RISCiX linker. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 #ifdef __GNUC__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 #define C_DEBUG_SWITCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 #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=
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 #define C_DEBUG_SWITCH -O -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 /* Turn this on to avoid the emacs malloc and use standard one */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 #undef SYSTEM_MALLOC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 /* For the portable alloca */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 #define STACK_DIRECTION -1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 #ifdef NO_REMAP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 /* CRT0_O is defined in s/riscix1-1.h or s/riscix1-2.h, as appropriate. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 #define START_FILES pre-crt0.o CRT0_O
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 Cannot
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 yet
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 #endif