]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/config/pa/tm-hppa.h
2004-04-17 Randolph Chung <tausq@debian.org>
[thirdparty/binutils-gdb.git] / gdb / config / pa / tm-hppa.h
CommitLineData
c906108c 1/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
343af405
AC
2
3 Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
4 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
5 Foundation, Inc.
c906108c
SS
6
7 Contributed by the Center for Software Science at the
8 University of Utah (pa-gdb-bugs@cs.utah.edu).
9
c5aa993b 10 This file is part of GDB.
c906108c 11
c5aa993b
JM
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
c906108c 16
c5aa993b
JM
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
c906108c 21
c5aa993b
JM
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. */
c906108c 26
f88e2c52
AC
27#include "regcache.h"
28
61995b3b 29#define GDB_MULTI_ARCH 1
e6e68f1f 30
d709c020
JB
31extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
32#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
c906108c 33
c906108c
SS
34/* Register numbers of various important registers.
35 Note that some of these values are "real" register numbers,
36 and correspond to the general registers of the machine,
37 and some are "phony" register numbers which are too large
38 to be actual register numbers as far as the user is concerned
39 but do serve to get the desired values when passed to read_register. */
40
41#define R0_REGNUM 0 /* Doesn't actually exist, used as base for
42 other r registers. */
43#define FLAGS_REGNUM 0 /* Various status flags */
44#define RP_REGNUM 2 /* return pointer */
eded0a31
AC
45#define HPPA_FP_REGNUM 3 /* The ABI's frame pointer, when used */
46#define HPPA_SP_REGNUM 30 /* Stack pointer. */
c906108c
SS
47#define SAR_REGNUM 32 /* Shift Amount Register */
48#define IPSW_REGNUM 41 /* Interrupt Processor Status Word */
49#define PCOQ_HEAD_REGNUM 33 /* instruction offset queue head */
50#define PCSQ_HEAD_REGNUM 34 /* instruction space queue head */
51#define PCOQ_TAIL_REGNUM 35 /* instruction offset queue tail */
52#define PCSQ_TAIL_REGNUM 36 /* instruction space queue tail */
53#define EIEM_REGNUM 37 /* External Interrupt Enable Mask */
54#define IIR_REGNUM 38 /* Interrupt Instruction Register */
55#define IOR_REGNUM 40 /* Interrupt Offset Register */
56#define SR4_REGNUM 43 /* space register 4 */
57#define RCR_REGNUM 51 /* Recover Counter (also known as cr0) */
58#define CCR_REGNUM 54 /* Coprocessor Configuration Register */
59#define TR0_REGNUM 57 /* Temporary Registers (cr24 -> cr31) */
c5aa993b 60#define CR27_REGNUM 60 /* Base register for thread-local storage, cr27 */
eded0a31 61#define HPPA_FP0_REGNUM 64 /* First floating-point. */
c906108c
SS
62#define FP4_REGNUM 72
63
c5aa993b
JM
64#define ARG0_REGNUM 26 /* The first argument of a callee. */
65#define ARG1_REGNUM 25 /* The second argument of a callee. */
66#define ARG2_REGNUM 24 /* The third argument of a callee. */
67#define ARG3_REGNUM 23 /* The fourth argument of a callee. */
c906108c 68
c906108c
SS
69/* When fetching register values from an inferior or a core file,
70 clean them up using this macro. BUF is a char pointer to
71 the raw value of the register in the registers[] array. */
72
4ee3352d 73#define DEPRECATED_CLEAN_UP_REGISTER_VALUE(regno, buf) \
c906108c
SS
74 do { \
75 if ((regno) == PCOQ_HEAD_REGNUM || (regno) == PCOQ_TAIL_REGNUM) \
7be570e7 76 (buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
c906108c
SS
77 } while (0)
78
c906108c
SS
79/* PA specific macro to see if the current instruction is nullified. */
80#ifndef INSTRUCTION_NULLIFIED
d709c020
JB
81extern int hppa_instruction_nullified (void);
82#define INSTRUCTION_NULLIFIED hppa_instruction_nullified ()
c906108c
SS
83#endif
84
c2c6d25f
JM
85/* Here's how to step off a permanent breakpoint. */
86#define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
87extern void hppa_skip_permanent_breakpoint (void);
2df3850c
JM
88
89/* On HP-UX, certain system routines (millicode) have names beginning
90 with $ or $$, e.g. $$dyncall, which handles inter-space procedure
91 calls on PA-RISC. Tell the expression parser to check for those
92 when parsing tokens that begin with "$". */
93#define SYMBOLS_CAN_START_WITH_DOLLAR (1)