1 // OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
2 // OBSOLETE with Weitek 1167 and i387 support.
4 // OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free
5 // OBSOLETE Software Foundation, Inc.
7 // OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.com).
9 // OBSOLETE This file is part of GDB.
11 // OBSOLETE This program is free software; you can redistribute it and/or modify
12 // OBSOLETE it under the terms of the GNU General Public License as published by
13 // OBSOLETE the Free Software Foundation; either version 2 of the License, or
14 // OBSOLETE (at your option) any later version.
16 // OBSOLETE This program is distributed in the hope that it will be useful,
17 // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // OBSOLETE GNU General Public License for more details.
21 // OBSOLETE You should have received a copy of the GNU General Public License
22 // OBSOLETE along with this program; if not, write to the Free Software
23 // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
24 // OBSOLETE Boston, MA 02111-1307, USA. */
26 // OBSOLETE #ifndef TM_SYMMETRY_H
27 // OBSOLETE #define TM_SYMMETRY_H 1
29 // OBSOLETE #include "regcache.h"
30 // OBSOLETE #include "doublest.h"
32 // OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
33 // OBSOLETE a copy of the right include file. */
34 // OBSOLETE #include <machine/reg.h>
36 // OBSOLETE #include "i386/tm-i386.h"
38 // OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
39 // OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
41 // OBSOLETE #undef DECR_PC_AFTER_BREAK
42 // OBSOLETE #define DECR_PC_AFTER_BREAK 0
44 // OBSOLETE /* Number of machine registers */
46 // OBSOLETE #undef NUM_REGS
47 // OBSOLETE #define NUM_REGS 49
49 // OBSOLETE /* Initializer for an array of names of registers.
50 // OBSOLETE There should be NUM_REGS strings in this initializer. */
52 // OBSOLETE /* Initializer for an array of names of registers. There should be at least
53 // OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
54 // OBSOLETE Symmetry registers are in this weird order to match the register numbers
55 // OBSOLETE in the symbol table entries. If you change the order, things will probably
56 // OBSOLETE break mysteriously for no apparent reason. Also note that the st(0)...
57 // OBSOLETE st(7) 387 registers are represented as st0...st7. */
59 // OBSOLETE #undef REGISTER_NAME
60 // OBSOLETE #define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \
61 // OBSOLETE "ebx", "esi", "edi", "st2", "st3", \
62 // OBSOLETE "st4", "st5", "st6", "st7", "esp", \
63 // OBSOLETE "ebp", "eip", "eflags","fp1", "fp2", \
64 // OBSOLETE "fp3", "fp4", "fp5", "fp6", "fp7", \
65 // OBSOLETE "fp8", "fp9", "fp10", "fp11", "fp12", \
66 // OBSOLETE "fp13", "fp14", "fp15", "fp16", "fp17", \
67 // OBSOLETE "fp18", "fp19", "fp20", "fp21", "fp22", \
68 // OBSOLETE "fp23", "fp24", "fp25", "fp26", "fp27", \
69 // OBSOLETE "fp28", "fp29", "fp30", "fp31" }
71 // OBSOLETE /* Register numbers of various important registers.
72 // OBSOLETE Note that some of these values are "real" register numbers,
73 // OBSOLETE and correspond to the general registers of the machine,
74 // OBSOLETE and some are "phony" register numbers which are too large
75 // OBSOLETE to be actual register numbers as far as the user is concerned
76 // OBSOLETE but do serve to get the desired values when passed to read_register. */
78 // OBSOLETE #define EAX_REGNUM 0
79 // OBSOLETE #define EDX_REGNUM 1
80 // OBSOLETE #define ECX_REGNUM 2
81 // OBSOLETE #define ST0_REGNUM 3
82 // OBSOLETE #define ST1_REGNUM 4
83 // OBSOLETE #define EBX_REGNUM 5
84 // OBSOLETE #define ESI_REGNUM 6
85 // OBSOLETE #define EDI_REGNUM 7
86 // OBSOLETE #define ST2_REGNUM 8
87 // OBSOLETE #define ST3_REGNUM 9
89 // OBSOLETE #define ST4_REGNUM 10
90 // OBSOLETE #define ST5_REGNUM 11
91 // OBSOLETE #define ST6_REGNUM 12
92 // OBSOLETE #define ST7_REGNUM 13
94 // OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
95 // OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
97 // OBSOLETE #undef SP_REGNUM
98 // OBSOLETE #define SP_REGNUM 14 /* (usp) Contains address of top of stack */
99 // OBSOLETE #define ESP_REGNUM 14
100 // OBSOLETE #undef FP_REGNUM
101 // OBSOLETE #define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */
102 // OBSOLETE #define EBP_REGNUM 15
103 // OBSOLETE #undef PC_REGNUM
104 // OBSOLETE #define PC_REGNUM 16 /* (eip) Contains program counter */
105 // OBSOLETE #define EIP_REGNUM 16
106 // OBSOLETE #undef PS_REGNUM
107 // OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */
108 // OBSOLETE #define EFLAGS_REGNUM 17
111 // OBSOLETE * Following macro translates i386 opcode register numbers to Symmetry
112 // OBSOLETE * register numbers. This is used by i386_frame_find_saved_regs.
114 // OBSOLETE * %eax %ecx %edx %ebx %esp %ebp %esi %edi
115 // OBSOLETE * i386 0 1 2 3 4 5 6 7
116 // OBSOLETE * Symmetry 0 2 1 5 14 15 6 7
119 // OBSOLETE #define I386_REGNO_TO_SYMMETRY(n) \
120 // OBSOLETE ((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n))
122 // OBSOLETE /* The magic numbers below are offsets into u_ar0 in the user struct.
123 // OBSOLETE * They live in <machine/reg.h>. Gdb calls this macro with blockend
124 // OBSOLETE * holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are
125 // OBSOLETE * saved in the u area (along with a few others that aren't useful
126 // OBSOLETE * here. See <machine/reg.h>).
129 // OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
130 // OBSOLETE { struct user foo; /* needed for finding fpu regs */ \
131 // OBSOLETE switch (regno) { \
132 // OBSOLETE case 0: \
133 // OBSOLETE addr = blockend + EAX * sizeof(int); break; \
134 // OBSOLETE case 1: \
135 // OBSOLETE addr = blockend + EDX * sizeof(int); break; \
136 // OBSOLETE case 2: \
137 // OBSOLETE addr = blockend + ECX * sizeof(int); break; \
138 // OBSOLETE case 3: /* st(0) */ \
139 // OBSOLETE addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \
141 // OBSOLETE case 4: /* st(1) */ \
142 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \
144 // OBSOLETE case 5: \
145 // OBSOLETE addr = blockend + EBX * sizeof(int); break; \
146 // OBSOLETE case 6: \
147 // OBSOLETE addr = blockend + ESI * sizeof(int); break; \
148 // OBSOLETE case 7: \
149 // OBSOLETE addr = blockend + EDI * sizeof(int); break; \
150 // OBSOLETE case 8: /* st(2) */ \
151 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \
153 // OBSOLETE case 9: /* st(3) */ \
154 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \
156 // OBSOLETE case 10: /* st(4) */ \
157 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \
159 // OBSOLETE case 11: /* st(5) */ \
160 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \
162 // OBSOLETE case 12: /* st(6) */ \
163 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \
165 // OBSOLETE case 13: /* st(7) */ \
166 // OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \
168 // OBSOLETE case 14: \
169 // OBSOLETE addr = blockend + ESP * sizeof(int); break; \
170 // OBSOLETE case 15: \
171 // OBSOLETE addr = blockend + EBP * sizeof(int); break; \
172 // OBSOLETE case 16: \
173 // OBSOLETE addr = blockend + EIP * sizeof(int); break; \
174 // OBSOLETE case 17: \
175 // OBSOLETE addr = blockend + FLAGS * sizeof(int); break; \
176 // OBSOLETE case 18: /* fp1 */ \
177 // OBSOLETE case 19: /* fp2 */ \
178 // OBSOLETE case 20: /* fp3 */ \
179 // OBSOLETE case 21: /* fp4 */ \
180 // OBSOLETE case 22: /* fp5 */ \
181 // OBSOLETE case 23: /* fp6 */ \
182 // OBSOLETE case 24: /* fp7 */ \
183 // OBSOLETE case 25: /* fp8 */ \
184 // OBSOLETE case 26: /* fp9 */ \
185 // OBSOLETE case 27: /* fp10 */ \
186 // OBSOLETE case 28: /* fp11 */ \
187 // OBSOLETE case 29: /* fp12 */ \
188 // OBSOLETE case 30: /* fp13 */ \
189 // OBSOLETE case 31: /* fp14 */ \
190 // OBSOLETE case 32: /* fp15 */ \
191 // OBSOLETE case 33: /* fp16 */ \
192 // OBSOLETE case 34: /* fp17 */ \
193 // OBSOLETE case 35: /* fp18 */ \
194 // OBSOLETE case 36: /* fp19 */ \
195 // OBSOLETE case 37: /* fp20 */ \
196 // OBSOLETE case 38: /* fp21 */ \
197 // OBSOLETE case 39: /* fp22 */ \
198 // OBSOLETE case 40: /* fp23 */ \
199 // OBSOLETE case 41: /* fp24 */ \
200 // OBSOLETE case 42: /* fp25 */ \
201 // OBSOLETE case 43: /* fp26 */ \
202 // OBSOLETE case 44: /* fp27 */ \
203 // OBSOLETE case 45: /* fp28 */ \
204 // OBSOLETE case 46: /* fp29 */ \
205 // OBSOLETE case 47: /* fp30 */ \
206 // OBSOLETE case 48: /* fp31 */ \
207 // OBSOLETE addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \
211 // OBSOLETE /* Total amount of space needed to store our copies of the machine's
212 // OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
213 // OBSOLETE registers, and 31 Weitek 1167 registers */
215 // OBSOLETE #undef REGISTER_BYTES
216 // OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
218 // OBSOLETE /* Nonzero if register N requires conversion
219 // OBSOLETE from raw format to virtual format. */
221 // OBSOLETE #undef REGISTER_CONVERTIBLE
222 // OBSOLETE #define REGISTER_CONVERTIBLE(N) \
223 // OBSOLETE (((N) < 3) ? 0 : \
224 // OBSOLETE ((N) < 5) ? 1 : \
225 // OBSOLETE ((N) < 8) ? 0 : \
226 // OBSOLETE ((N) < 14) ? 1 : \
229 // OBSOLETE #include "floatformat.h"
231 // OBSOLETE /* Convert data from raw format for register REGNUM in buffer FROM
232 // OBSOLETE to virtual format with type TYPE in buffer TO. */
234 // OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
235 // OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
237 // OBSOLETE DOUBLEST val; \
238 // OBSOLETE floatformat_to_doublest (&floatformat_i387_ext, (FROM), &val); \
239 // OBSOLETE deprecated_store_floating ((TO), TYPE_LENGTH (TYPE), val); \
242 // OBSOLETE /* Convert data from virtual format with type TYPE in buffer FROM
243 // OBSOLETE to raw format for register REGNUM in buffer TO. */
245 // OBSOLETE #undef REGISTER_CONVERT_TO_RAW
246 // OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
248 // OBSOLETE DOUBLEST val = deprecated_extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
249 // OBSOLETE floatformat_from_doublest (&floatformat_i387_ext, &val, (TO)); \
252 // OBSOLETE /* Return the GDB type object for the "standard" data type
253 // OBSOLETE of data in register N. */
255 // OBSOLETE #undef REGISTER_VIRTUAL_TYPE
256 // OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
257 // OBSOLETE ((N < 3) ? builtin_type_int : \
258 // OBSOLETE (N < 5) ? builtin_type_double : \
259 // OBSOLETE (N < 8) ? builtin_type_int : \
260 // OBSOLETE (N < 14) ? builtin_type_double : \
261 // OBSOLETE builtin_type_int)
263 // OBSOLETE /* Store the address of the place in which to copy the structure the
264 // OBSOLETE subroutine will return. This is called from call_function.
265 // OBSOLETE Native cc passes the address in eax, gcc (up to version 2.5.8)
266 // OBSOLETE passes it on the stack. gcc should be fixed in future versions to
267 // OBSOLETE adopt native cc conventions. */
269 // OBSOLETE #undef DEPRECATED_PUSH_ARGUMENTS
270 // OBSOLETE #undef STORE_STRUCT_RETURN
271 // OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR))
273 // OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
274 // OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
275 // OBSOLETE into VALBUF. */
277 // OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
278 // OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
279 // OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
281 // OBSOLETE /* The following redefines make backtracing through sigtramp work.
282 // OBSOLETE They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
283 // OBSOLETE from the sigcontext structure which is pushed by the kernel on the
284 // OBSOLETE user stack, along with a pointer to it. */
286 // OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name))
288 // OBSOLETE /* Offset to saved PC in sigcontext, from <signal.h>. */
289 // OBSOLETE #define SIGCONTEXT_PC_OFFSET 16
291 // OBSOLETE #endif /* ifndef TM_SYMMETRY_H */
This page took 0.035388 seconds and 4 git commands to generate.