1 // OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx
2 // OBSOLETE with Weitek 1167 and i387 support.
4 // OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000,
5 // OBSOLETE 2003 Free 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_PTX_H
27 // OBSOLETE #define TM_PTX_H 1
29 // OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
30 // OBSOLETE a copy of the right include file. */
32 // OBSOLETE #include <sys/reg.h>
34 // OBSOLETE #ifdef SEQUENT_PTX4
35 // OBSOLETE #include "i386/tm-i386.h"
36 // OBSOLETE #else /* !SEQUENT_PTX4 */
37 // OBSOLETE #include "i386/tm-i386.h"
40 // OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
41 // OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
43 // OBSOLETE #undef DECR_PC_AFTER_BREAK
44 // OBSOLETE #define DECR_PC_AFTER_BREAK 0
46 // OBSOLETE /* Number of machine registers */
48 // OBSOLETE #undef NUM_REGS
49 // OBSOLETE #define NUM_REGS 49
51 // OBSOLETE /* Initializer for an array of names of registers. There should be at least
52 // OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
53 // OBSOLETE The order of the first 8 registers must match the compiler's numbering
54 // OBSOLETE scheme (which is the same as the 386 scheme) and also regmap in the various
55 // OBSOLETE *-nat.c files. */
57 // OBSOLETE #undef REGISTER_NAME
58 // OBSOLETE #define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
59 // OBSOLETE "esp", "ebp", "esi", "edi", \
60 // OBSOLETE "eip", "eflags", "st0", "st1", \
61 // OBSOLETE "st2", "st3", "st4", "st5", \
62 // OBSOLETE "st6", "st7", "fp1", "fp2", \
63 // OBSOLETE "fp3", "fp4", "fp5", "fp6", \
64 // OBSOLETE "fp7", "fp8", "fp9", "fp10", \
65 // OBSOLETE "fp11", "fp12", "fp13", "fp14", \
66 // OBSOLETE "fp15", "fp16", "fp17", "fp18", \
67 // OBSOLETE "fp19", "fp20", "fp21", "fp22", \
68 // OBSOLETE "fp23", "fp24", "fp25", "fp26", \
69 // OBSOLETE "fp27", "fp28", "fp29", "fp30", \
72 // OBSOLETE /* Register numbers of various important registers.
73 // OBSOLETE Note that some of these values are "real" register numbers,
74 // OBSOLETE and correspond to the general registers of the machine,
75 // OBSOLETE and some are "phony" register numbers which are too large
76 // OBSOLETE to be actual register numbers as far as the user is concerned
77 // OBSOLETE but do serve to get the desired values when passed to read_register. */
79 // OBSOLETE #define EAX_REGNUM 0
80 // OBSOLETE #define ECX_REGNUM 1
81 // OBSOLETE #define EDX_REGNUM 2
82 // OBSOLETE #define EBX_REGNUM 3
84 // OBSOLETE #define ESP_REGNUM 4
85 // OBSOLETE #define EBP_REGNUM 5
87 // OBSOLETE #define ESI_REGNUM 6
88 // OBSOLETE #define EDI_REGNUM 7
90 // OBSOLETE #define EIP_REGNUM 8
91 // OBSOLETE #define EFLAGS_REGNUM 9
93 // OBSOLETE #define ST0_REGNUM 10
94 // OBSOLETE #define ST1_REGNUM 11
95 // OBSOLETE #define ST2_REGNUM 12
96 // OBSOLETE #define ST3_REGNUM 13
98 // OBSOLETE #define ST4_REGNUM 14
99 // OBSOLETE #define ST5_REGNUM 15
100 // OBSOLETE #define ST6_REGNUM 16
101 // OBSOLETE #define ST7_REGNUM 17
103 // OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
104 // OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
106 // OBSOLETE #undef SP_REGNUM
107 // OBSOLETE #define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */
108 // OBSOLETE #undef FP_REGNUM
109 // OBSOLETE #define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */
110 // OBSOLETE #undef PC_REGNUM
111 // OBSOLETE #define PC_REGNUM EIP_REGNUM /* Contains program counter */
112 // OBSOLETE #undef PS_REGNUM
113 // OBSOLETE #define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */
116 // OBSOLETE * For ptx, this is a little bit bizarre, since the register block
117 // OBSOLETE * is below the u area in memory. This means that blockend here ends
118 // OBSOLETE * up being negative (for the call from coredep.c) since the value in
119 // OBSOLETE * u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us
120 // OBSOLETE * u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define
121 // OBSOLETE * FETCH_INFERIOR_REGISTERS (and supply our own functions for that),
122 // OBSOLETE * the core file case will be the only use of this function.
125 // OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
126 // OBSOLETE { (addr) = ptx_register_u_addr((blockend), (regno)); }
128 // OBSOLETE extern int ptx_register_u_addr (int, int);
130 // OBSOLETE /* Total amount of space needed to store our copies of the machine's
131 // OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
132 // OBSOLETE registers, and 31 Weitek 1167 registers */
134 // OBSOLETE #undef REGISTER_BYTES
135 // OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
137 // OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
139 // OBSOLETE #undef DEPRECATED_MAX_REGISTER_RAW_SIZE
140 // OBSOLETE #define DEPRECATED_MAX_REGISTER_RAW_SIZE 10
142 // OBSOLETE /* Nonzero if register N requires conversion
143 // OBSOLETE from raw format to virtual format. */
145 // OBSOLETE #undef REGISTER_CONVERTIBLE
146 // OBSOLETE #define REGISTER_CONVERTIBLE(N) \
147 // OBSOLETE ((N < ST0_REGNUM) ? 0 : \
148 // OBSOLETE (N < FP1_REGNUM) ? 1 : \
151 // OBSOLETE /* Convert data from raw format for register REGNUM
152 // OBSOLETE to virtual format for register REGNUM. */
153 // OBSOLETE extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */
155 // OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
156 // OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
157 // OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
158 // OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \
159 // OBSOLETE (FROM),(TO)) : \
160 // OBSOLETE (void)memcpy ((TO), (FROM), 4))
162 // OBSOLETE /* Convert data from virtual format for register REGNUM
163 // OBSOLETE to raw format for register REGNUM. */
165 // OBSOLETE #undef REGISTER_CONVERT_TO_RAW
166 // OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
167 // OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
168 // OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \
169 // OBSOLETE (FROM),(TO)) : \
170 // OBSOLETE (void)memcpy ((TO), (FROM), 4))
172 // OBSOLETE /* Return the GDB type object for the "standard" data type
173 // OBSOLETE of data in register N. */
175 // OBSOLETE * Note: the 1167 registers (the last line, builtin_type_float) are
176 // OBSOLETE * generally used in pairs, with each pair being treated as a double.
177 // OBSOLETE * It it also possible to use them singly as floats. I'm not sure how
178 // OBSOLETE * in gdb to treat the register pair pseudo-doubles. -fubar
180 // OBSOLETE #undef REGISTER_VIRTUAL_TYPE
181 // OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
182 // OBSOLETE ((N < ST0_REGNUM) ? builtin_type_int : \
183 // OBSOLETE (N < FP1_REGNUM) ? builtin_type_double : \
184 // OBSOLETE builtin_type_float)
186 // OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
187 // OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
188 // OBSOLETE into VALBUF. */
190 // OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
191 // OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
192 // OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
194 // OBSOLETE #endif /* ifndef TM_PTX_H */
This page took 0.03333 seconds and 4 git commands to generate.