annotate src/m/powerpc.h @ 267:966663fcf606 r20-5b32

Import from CVS: tag r20-5b32
author cvs
date Mon, 13 Aug 2007 10:26:29 +0200
parents e70b3a057e12
children c5d627a313b1
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 Power PC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1987, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1995 Board of Trustees, University of Illinois
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 /* The following line tells the configuration script what sort of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 operating system this machine is likely to run.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 USUAL-OPSYS="solaris2-5" */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #ifdef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 # define POWERPC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 # ifndef powerpc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 # define powerpc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 # endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #ifdef __GNUC__
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 149
diff changeset
35 # define C_OPTIMIZE_SWITCH "-O"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 /* XEmacs change */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 # ifdef USE_LCC
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 149
diff changeset
39 # define C_OPTIMIZE_SWITCH "-O4 -Oi"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 # else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 /* This level of optimization is reported to work. */
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 149
diff changeset
42 # define C_OPTIMIZE_SWITCH "-O2"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 # endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 /* XINT must explicitly sign-extend */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 #define EXPLICIT_SIGN_EXTEND
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
247
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
50 #ifndef __linux__
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 /* Data type of load average, as read out of kmem. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #define LOAD_AVE_TYPE long
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 /* 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
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
247
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
58 #else /* mklinux */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
59 #if 0
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
60 /* The following line tells the configuration script what sort of
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
61 operating system this machine is likely to run.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
62 USUAL-OPSYS="linux" */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
63
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
64 /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
65 is the most significant byte. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
66
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
67 #define WORDS_BIG_ENDIAN
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
68 #endif
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
69
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
70 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
71 * group of arguments and treat it as an array of the arguments. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
72
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
73 #define NO_ARG_ARRAY
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
74
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
75 #if 0
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
76 /* Now define a symbol for the cpu type, if your compiler
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
77 does not define it automatically. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
78
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
79 /* #define IBMR2AIX */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
80
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
81 /* Use type int rather than a union, to represent Lisp_Object */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
82 /* This is desirable for most machines. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
83
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
84 /* #define NO_UNION_TYPE */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
85
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
86 /* Define CANNOT_DUMP on machines where unexec does not work.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
87 Then the function dump-emacs will not be defined
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
88 and temacs will do (load "loadup") automatically unless told otherwise. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
89
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
90 /* #define CANNOT_DUMP */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
91
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
92 #define UNEXEC unexelf.o
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
93 #endif
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
94
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
95 /* Define addresses, macros, change some setup for dump */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
96
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
97 #define NO_REMAP
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
98
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
99 #if 0
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
100 #define TEXT_START 0x00001000
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
101 #define TEXT_END 0
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
102 #define DATA_START 0x01000000
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
103 #define DATA_END 0
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
104
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
105 /* The data segment in this machine always starts at address 0x10000000.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
106 An address of data cannot be stored correctly in a Lisp object;
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
107 we always lose the high bits. We must tell XPNTR to add them back. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
108
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
109 #define DATA_SEG_BITS 0x10000000
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
110 #endif
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
111
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
112 /* Use type int rather than a union, to represent Lisp_Object */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
113
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
114 /* #define NO_UNION_TYPE */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
115
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
116 #ifdef CANNOT_DUMP
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
117 /* Define shared memory segment symbols */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
118
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
119 #define PURE_SEG_BITS 0x30000000
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
120
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
121 /* Use shared memory. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
122 /* This is turned off because it does not always work. See etc/AIX.DUMP. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
123 /* #define HAVE_SHM */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
124 #define SHMKEY 5305035 /* used for shared memory code segments */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
125 #endif /* CANNOT_DUMP */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
126
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
127 #define N_BADMAG(x) BADMAG(x)
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
128 #define N_TXTOFF(x) A_TEXTPOS(x)
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
129 #define N_SYMOFF(x) A_SYMPOS(x)
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
130 /* #define A_TEXT_OFFSET(HDR) sizeof(HDR) */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
131 /* #define ADJUST_EXEC_HEADER \
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
132 unexec_text_start += sizeof(hdr); \
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
133 unexec_data_start = ohdr.a_dbase
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
134 */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
135 #undef ADDR_CORRECT
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
136 #define ADDR_CORRECT(x) ((int)(x))
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
137
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
138 /* Define C_ALLOCA if this machine does not support a true alloca
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
139 and the one written in C should be used instead.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
140 Define HAVE_ALLOCA to say that the system provides a properly
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
141 working alloca function and it should be used.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
142 Define neither one if an assembler-language alloca
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
143 in the file alloca.s should be used. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
144
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
145 #define HAVE_ALLOCA
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
146
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
147 /* Specify the font for X to use.
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
148 This used to be Rom14.500; that's nice on the X server shipped with
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
149 the RS/6000, but it's not available on other servers. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
150 #define X_DEFAULT_FONT "fixed"
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
151
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
152 /* Here override various assumptions in ymakefile */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
153
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
154 #define START_FILES
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
155 /* #define HAVE_SYSVIPC */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
156 /* #define HAVE_GETWD */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
157
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
158 /* Don't try to include sioctl.h or ptem.h. */
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
159 #undef NEED_SIOCTL
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
160 #undef NEED_PTEM_H
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
161
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
162 #define ORDINARY_LINK
267
966663fcf606 Import from CVS: tag r20-5b32
cvs
parents: 247
diff changeset
163 #define LD_SWITCH_MACHINE -T ${srcdir}/src/ppc.ldscript
247
e70b3a057e12 Import from CVS: tag r20-5b22
cvs
parents: 163
diff changeset
164 #endif