|
|
1.1 root 1: /* m- file for hp9000 series 800 machines.
2: Copyright (C) 1987 Free Software Foundation, Inc.
3:
4: This file is part of GNU Emacs.
5:
6: GNU Emacs is distributed in the hope that it will be useful,
7: but WITHOUT ANY WARRANTY. No author or distributor
8: accepts responsibility to anyone for the consequences of using it
9: or for whether it serves any particular purpose or works at all,
10: unless he says so in writing. Refer to the GNU Emacs General Public
11: License for full details.
12:
13: Everyone is granted permission to copy, modify and redistribute
14: GNU Emacs, but only under the conditions described in the
15: GNU Emacs General Public License. A copy of this license is
16: supposed to have been given to you along with GNU Emacs so you
17: can know your rights and responsibilities. It should be in a
18: file named COPYING. Among other things, the copyright notice
19: and this notice must be preserved on all copies. */
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: #define 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. */
38:
39: #define NO_ARG_ARRAY
40:
41: /* Define WORD_MACHINE if addresses and such have
42: * to be corrected before they can be used as byte counts. */
43:
44: #undef WORD_MACHINE
45:
46: /* Define how to take a char and sign-extend into an int.
47: On machines where char is signed, this is a no-op. */
48:
49: #define SIGN_EXTEND_CHAR(c) (c)
50:
51: /* Now define a symbol for the cpu type, if your compiler
52: does not define it automatically:
53: Ones defined so far include vax, m68000, ns16000, pyramid,
54: orion, tahoe, APOLLO and many others */
55: #ifndef hp9000s800
56: # define hp9000s800
57: #endif
58:
59: /* Use type int rather than a union, to represent Lisp_Object */
60: /* This is desirable for most machines. */
61:
62: #define NO_UNION_TYPE
63:
64: /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
65: the 24-bit bit field into an int. In other words, if bit fields
66: are always unsigned.
67:
68: If you use NO_UNION_TYPE, this flag does not matter. */
69:
70: #define EXPLICIT_SIGN_EXTEND
71:
72: /* Data type of load average, as read out of kmem. */
73:
74: #define LOAD_AVE_TYPE double
75:
76: /* Convert that into an integer that is 100 for a load average of 1.0 */
77:
78: #define LOAD_AVE_CVT(x) ((int) (x * 100.0))
79:
80:
81: /* Define CANNOT_DUMP on machines where unexec does not work.
82: Then the function dump-emacs will not be defined
83: and temacs will do (load "loadup") automatically unless told otherwise. */
84:
85: #undef CANNOT_DUMP
86:
87: /* Define VIRT_ADDR_VARIES if the virtual addresses of
88: pure and impure space as loaded can vary, and even their
89: relative order cannot be relied on.
90:
91: Otherwise Emacs assumes that text space precedes data space,
92: numerically. */
93:
94: #define VIRT_ADDR_VARIES
95:
96: /* Define C_ALLOCA if this machine does not support a true alloca
97: and the one written in C should be used instead.
98: Define HAVE_ALLOCA to say that the system provides a properly
99: working alloca function and it should be used.
100: Define neither one if an assembler-language alloca
101: in the file alloca.s should be used. */
102:
103: #define C_ALLOCA
104: /* #define HAVE_ALLOCA */
105:
106: /* the data segment on this machine always starts at address 0x40000000. */
107:
108: #define DATA_SEG_BITS 0x40000000
109:
110: #define VALBITS 26
111: #define GCTYPEBITS 5
112:
113: #define DATA_START 0x40000000
114: #define TEXT_START 0x00000000
115:
116: #define STACK_DIRECTION 1
117:
118: /* Define NO_REMAP if memory segmentation makes it not work well
119: to change the boundary between the text section and data section
120: when Emacs is dumped. If you define this, the preloaded Lisp
121: code will not be sharable; but that's better than failing completely. */
122:
123: #define NO_REMAP
124:
125: /* This machine requires completely different unexec code
126: which lives in a separate file. Specify the file name. */
127:
128: #define UNEXEC unexhp9k800.o
129:
130: #define LIBS_MACHINE
131: #define LIBS_DEBUG
132:
133: /* Define NEED_BSDTTY if you have such. */
134:
135: #define NEED_BSDTTY
136:
137: /* The standard definitions of these macros would work ok,
138: but these are faster because the constants are short. */
139:
140:
141: #define XUINT(a) (((unsigned)(a) << INTBITS-VALBITS) >> INTBITS-VALBITS)
142:
143: #define XSET(var, type, ptr) \
144: ((var) = ((int)(type) << VALBITS) + (((unsigned) (ptr) << INTBITS-VALBITS) >> INTBITS-VALBITS))
145:
146: #define XSETINT(a, b) XSET(a, XTYPE(a), b)
147: #define XSETUINT(a, b) XSET(a, XTYPE(a), b)
148: #define XSETPNTR(a, b) XSET(a, XTYPE(a), b)
149: #define XMARKBIT(a) ((a) < 0)
150: #define XSETMARKBIT(a,b) ((a) = ((b) ? (a)|MARKBIT : (a) & ~MARKBIT))
151: #define XUNMARK(a) ((a) = (((a) << INTBITS-GCTYPEBITS-VALBITS) >> INTBITS-GCTYPEBITS-VALBITS))
152:
153: /* The symbol in the kernel where the load average is found
154: is named _avenrun. At this time there are two major flavors
155: of hp-ux (there is the s800 and s300 (s200) flavors). The
156: differences are thusly moved to the corresponding m- file.
157: */
158:
159: /* no underscore please */
160: #define LDAV_SYMBOL "avenrun"
161: #define CPTIME_SYMBOL "cp_time"
162: #define DKXFER_SYMBOL "dk_xfer"
163:
164: /* In hpux, for unknown reasons, S_IFLNK is defined even though
165: symbolic links do not exist.
166: Make sure our conditionals based on S_IFLNK are not confused.
167:
168: Here we assume that stat.h is included before config.h
169: so that we can override it here. */
170:
171: #undef S_IFLNK
172:
173: /* Define the BSTRING functions in terms of the sysV functions. */
174:
175: #define bcopy(a,b,s) memcpy (b,a,s)
176: #define bzero(a,s) memset (a,0,s)
177: #define bcmp memcmp
178:
179: /* On USG systems these have different names. */
180:
181: #define index strchr
182: #define rindex strrchr
183:
184: /* Include the file bsdtty.h, since job control exists. */
185: #define NEED_BSDTTY
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.