binutils-gdb/gdb/config/i386/tm-ptx.h

195 lines
6.5 KiB
C
Raw Normal View History

/* Target machine definitions for GDB on a Sequent Symmetry under ptx
with Weitek 1167 and i387 support.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000,
2003 Free Software Foundation, Inc.
Symmetry version by Jay Vosburgh (fubar@sequent.com).
1999-07-08 04:19:36 +08:00
This file is part of GDB.
1999-07-08 04:19:36 +08:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
1999-07-08 04:19:36 +08:00
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
1999-07-08 04:19:36 +08:00
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef TM_PTX_H
#define TM_PTX_H 1
/* I don't know if this will work for cross-debugging, even if you do get
a copy of the right include file. */
#include <sys/reg.h>
#ifdef SEQUENT_PTX4
* c-exp.y (THIS): Delete token and grammar rule. (yylex): Don't return THIS. * cp-valprint.c (vtbl_ptr_name_old): Delete. (cp_is_vtbl_ptr_type): Don't check vtbl_ptr_name_old. * demangle.c (cplus_markers): Update comment. Put '$' first. Remove CPLUS_MARKER. (_initialize_demangler): Don't call set_cplus_marker_for_demangling. * jv-exp.y (THIS): Delete token and grammar rule. (yylex): Don't return THIS. * mips-tdep.c (mips_dump_tdep): Don't dump CPLUS_MARKER. * objc-exp.y (THIS): Delete token and grammar rule. (yylex): Don't return THIS. * p-exp.y (yylex): Remove reference to CPLUS_MARKER. * stabsread.c (vptr_name, vb_name): Replace CPLUS_MARKER with '$'. (read_member_functions): Likewise for opname. (read_tilde_fields): Use is_cplus_marker. * defs.h (CPLUS_MARKER): Don't define. * config/tm-sysv4.h (CPLUS_MARKER): Likewise. * config/i386/xm-i386sco.h (CPLUS_MARKER): Likewise. * config/mips/tm-irix3.h (CPLUS_MARKER): Likewise. * config/mips/tm-irix6.h (CPLUS_MARKER): Likewise. * config/rs6000/tm-rs6000.h (CPLUS_MARKER): Likewise. * config/i386/tm-i386v4.h: Delete file. * config/djgpp/fnchange.lst: Delete tm-i386v4.h. * config/i386/tm-i386sol2.h: Include "i386/tm-i386.h" instead. * config/i386/tm-i386v42mp.h: Include "i386/tm-i386.h" instead. * config/i386/tm-ptx.h: Include "i386/tm-i386.h" instead. * config/i386/i386gnu.mt (TM_FILE): Use tm-i386.h. * config/i386/i386sco5.mt (TM_FILE): Likewise. * config/i386/i386v4.mt (TM_FILE): Likewise. * config/i386/ncr3000.mt (TM_FILE): Likewise.
2002-10-11 22:02:39 +08:00
#include "i386/tm-i386.h"
#else /* !SEQUENT_PTX4 */
#include "i386/tm-i386.h"
#endif
/* Amount PC must be decremented by after a breakpoint. This is often the
number of bytes in BREAKPOINT but not always (such as now). */
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
/* Number of machine registers */
#undef NUM_REGS
#define NUM_REGS 49
/* Initializer for an array of names of registers. There should be at least
NUM_REGS strings in this initializer. Any excess ones are simply ignored.
The order of the first 8 registers must match the compiler's numbering
scheme (which is the same as the 386 scheme) and also regmap in the various
*-nat.c files. */
#undef REGISTER_NAME
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
"esp", "ebp", "esi", "edi", \
"eip", "eflags", "st0", "st1", \
"st2", "st3", "st4", "st5", \
"st6", "st7", "fp1", "fp2", \
"fp3", "fp4", "fp5", "fp6", \
"fp7", "fp8", "fp9", "fp10", \
"fp11", "fp12", "fp13", "fp14", \
"fp15", "fp16", "fp17", "fp18", \
"fp19", "fp20", "fp21", "fp22", \
"fp23", "fp24", "fp25", "fp26", \
"fp27", "fp28", "fp29", "fp30", \
"fp31" }
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
#define EAX_REGNUM 0
#define ECX_REGNUM 1
#define EDX_REGNUM 2
#define EBX_REGNUM 3
#define ESP_REGNUM 4
#define EBP_REGNUM 5
#define ESI_REGNUM 6
#define EDI_REGNUM 7
#define EIP_REGNUM 8
#define EFLAGS_REGNUM 9
#define ST0_REGNUM 10
#define ST1_REGNUM 11
#define ST2_REGNUM 12
#define ST3_REGNUM 13
#define ST4_REGNUM 14
#define ST5_REGNUM 15
#define ST6_REGNUM 16
#define ST7_REGNUM 17
#define FP1_REGNUM 18 /* first 1167 register */
/* Get %fp2 - %fp31 by addition, since they are contiguous */
#undef SP_REGNUM
#define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */
#undef FP_REGNUM
#define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */
#undef PC_REGNUM
#define PC_REGNUM EIP_REGNUM /* Contains program counter */
#undef PS_REGNUM
#define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */
/*
* For ptx, this is a little bit bizarre, since the register block
* is below the u area in memory. This means that blockend here ends
* up being negative (for the call from coredep.c) since the value in
* u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us
* u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define
* FETCH_INFERIOR_REGISTERS (and supply our own functions for that),
* the core file case will be the only use of this function.
*/
#define REGISTER_U_ADDR(addr, blockend, regno) \
{ (addr) = ptx_register_u_addr((blockend), (regno)); }
2000-05-28 09:12:42 +08:00
extern int ptx_register_u_addr (int, int);
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. 10 i*86 registers, 8 i387
registers, and 31 Weitek 1167 registers */
#undef REGISTER_BYTES
#define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
/* Largest value REGISTER_RAW_SIZE can have. */
2003-03-03 Andrew Cagney <cagney@redhat.com> Make MAX_REGISTER_RAW_SIZE and MAX_REGISTER_VIRTUAL_SIZE optional. * gdbarch.sh (DEPRECATED_MAX_REGISTER_RAW_SIZE): Variable with predicate. Replace MAX_REGISTER_RAW_SIZE. (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto for MAX_REGISTER_VIRTUAL_SIZE. * regcache.c (legacy_max_register_raw_size): New function. (legacy_max_register_virtual_size): New function. * defs.h (MAX_REGISTER_VIRTUAL_SIZE): Define. (MAX_REGISTER_RAW_SIZE): Define. (legacy_max_register_raw_size): Declare. (legacy_max_register_virtual_size): Declare. * config/sparc/tm-sparc.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Update. * config/sparc/tm-sp64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto. * config/pa/tm-hppa.h (DEPRECATED_MAX_REGISTER_RAW_SIZE) (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE): Ditto. * config/pa/tm-hppa64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * config/ia64/tm-ia64.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * config/i386/tm-ptx.h (DEPRECATED_MAX_REGISTER_RAW_SIZE): Ditto. * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. * vax-tdep.c (vax_gdbarch_init): Update. * v850-tdep.c (v850_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * sh-tdep.c (sh_gdbarch_init): Update. * s390-tdep.c (s390_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): Update. * ns32k-tdep.c (ns32k_gdbarch_init): Update. * mn10300-tdep.c (mn10300_gdbarch_init): Update. * mips-tdep.c (mips_gdbarch_init): Update. * mcore-tdep.c (mcore_gdbarch_init): Update. * m68k-tdep.c (m68k_gdbarch_init): Update. * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. * ia64-tdep.c (ia64_gdbarch_init): Update. * i386-tdep.c (i386_gdbarch_init): Update. * hppa-tdep.c (hppa_gdbarch_init): Update. * h8300-tdep.c (h8300_gdbarch_init): Update. * frv-tdep.c (frv_gdbarch_init): Update. * cris-tdep.c (cris_gdbarch_init): Update. * avr-tdep.c (avr_gdbarch_init): Update. * arm-tdep.c (arm_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * d10v-tdep.c (d10v_gdbarch_init): Do not set max_register_raw_size or max_register_virtual_size.
2003-03-04 04:50:20 +08:00
#undef DEPRECATED_MAX_REGISTER_RAW_SIZE
#define DEPRECATED_MAX_REGISTER_RAW_SIZE 10
/* Nonzero if register N requires conversion
from raw format to virtual format. */
#undef REGISTER_CONVERTIBLE
#define REGISTER_CONVERTIBLE(N) \
((N < ST0_REGNUM) ? 0 : \
(N < FP1_REGNUM) ? 1 : \
0)
1999-07-08 04:19:36 +08:00
/* Convert data from raw format for register REGNUM
to virtual format for register REGNUM. */
1999-07-08 04:19:36 +08:00
extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */
#undef REGISTER_CONVERT_TO_VIRTUAL
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
(REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \
(FROM),(TO)) : \
(void)memcpy ((TO), (FROM), 4))
1999-07-08 04:19:36 +08:00
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
#undef REGISTER_CONVERT_TO_RAW
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
(REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \
(FROM),(TO)) : \
(void)memcpy ((TO), (FROM), 4))
/* Return the GDB type object for the "standard" data type
of data in register N. */
/*
* Note: the 1167 registers (the last line, builtin_type_float) are
* generally used in pairs, with each pair being treated as a double.
* It it also possible to use them singly as floats. I'm not sure how
* in gdb to treat the register pair pseudo-doubles. -fubar
*/
#undef REGISTER_VIRTUAL_TYPE
#define REGISTER_VIRTUAL_TYPE(N) \
((N < ST0_REGNUM) ? builtin_type_int : \
(N < FP1_REGNUM) ? builtin_type_double : \
builtin_type_float)
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
+ * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename + EXTRACT_RETURN_VALUE. + (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename + EXTRACT_STRUCT_VALUE_ADDRESS. + * gdbarch.h, gdbarch.c: Regenerate. + + * values.c (value_being_returned): Handle + DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. + (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE. + + * arm-linux-tdep.c (arm_linux_init_abi): Update. + * arm-tdep.c (arm_gdbarch_init): Update. + * avr-tdep.c (avr_gdbarch_init): Update. + * cris-tdep.c (cris_gdbarch_init): Update. + * d10v-tdep.c (d10v_gdbarch_init): Update. + * ia64-tdep.c (ia64_gdbarch_init): Update. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. + * rs6000-tdep.c (rs6000_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sh-tdep.c (sh_gdbarch_init): Update. + * s390-tdep.c (s390_gdbarch_init): Update. + * sparc-tdep.c (sparc_gdbarch_init): Update. + * ns32k-tdep.c (ns32k_gdbarch_init): Update. + * v850-tdep.c (v850_gdbarch_init): Update. + * vax-tdep.c (vax_gdbarch_init): Update. + * x86-64-tdep.c (x86_64_gdbarch_init): Update. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. + + * config/arc/tm-arc.h: Update. + * config/d30v/tm-d30v.h: Update. + * config/fr30/tm-fr30.h: Update. + * config/h8300/tm-h8300.h: Update. * config/h8500/tm-h8500.h: Update. * config/i386/tm-i386.h: Update. * config/i386/tm-ptx.h: Update. * config/i386/tm-symmetry.h: Update. * config/i960/tm-i960.h: Update. * config/m32r/tm-m32r.h: Update. * config/m68k/tm-delta68.h: Update. * config/m68k/tm-linux.h: Update. * config/m68k/tm-m68k.h: Update. * config/m88k/tm-m88k.h: Update. * config/mcore/tm-mcore.h: Update. * config/mips/tm-mips.h: Update. * config/mn10200/tm-mn10200.h: Update. * config/pa/tm-hppa.h: Update. * config/pa/tm-hppa64.h: Update. * config/sparc/tm-sp64.h: Update. * config/sparc/tm-sparc.h: Update. * config/sparc/tm-sparclet.h: Update. * config/z8k/tm-z8k.h: Update.
2002-06-15 06:55:51 +08:00
#undef DEPRECATED_EXTRACT_RETURN_VALUE
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
1999-07-08 04:19:36 +08:00
#endif /* ifndef TM_PTX_H */