GDB (xrefs)

/tmp/gdb-8.1/gdb/sparc64-tdep.h
Go to the documentation of this file.
1 /* Target-dependent code for UltraSPARC.
2
3 Copyright (C) 2003-2018 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef SPARC64_TDEP_H
21 #define SPARC64_TDEP_H 1
22
23 struct frame_info;
24 struct gdbarch;
25 struct regcache;
26 struct sparc_gregmap;
27 struct trad_frame_saved_reg;
28
29 #include "sparc-tdep.h"
30
31 /* The stack pointer is offset from the stack frame by a BIAS of 2047
32 (0x7ff) for 64-bit code. BIAS is likely to be defined on SPARC
33 hosts, so undefine it first. */
34 #undef BIAS
35 #define BIAS 2047
36
37 /* Register offsets for the general-purpose register set. */
38
39 /* UltraSPARC doesn't have %psr. */
40 #define r_tstate_offset r_psr_offset
41
42 /* UltraSPARC doesn't have %wim either. */
43 #define r_fprs_offset r_wim_offset
44
45 /* Register numbers of various important registers. */
46
47 enum sparc64_regnum
48 {
49 SPARC64_F32_REGNUM /* %f32 */
50 = SPARC_F0_REGNUM + 32,
51 SPARC64_F62_REGNUM /* %f62 */
52 = SPARC64_F32_REGNUM + 15,
53 SPARC64_PC_REGNUM, /* %pc */
54 SPARC64_NPC_REGNUM, /* %npc */
55 SPARC64_STATE_REGNUM,
56 SPARC64_FSR_REGNUM, /* %fsr */
57 SPARC64_FPRS_REGNUM, /* %fprs */
58 SPARC64_Y_REGNUM, /* %y */
59 };
60
61 /* Pseudo registers. */
62 enum sparc64_pseudo_regnum
63 {
64 SPARC64_CWP_REGNUM = 0, /* %cwp */
65 SPARC64_PSTATE_REGNUM, /* %pstate */
66 SPARC64_ASI_REGNUM, /* %asi */
67 SPARC64_CCR_REGNUM, /* %ccr */
68 SPARC64_D0_REGNUM, /* %d0 */
69 SPARC64_D10_REGNUM /* %d10 */
70 = SPARC64_D0_REGNUM + 5,
71 SPARC64_D30_REGNUM /* %d30 */
72 = SPARC64_D0_REGNUM + 15,
73 SPARC64_D32_REGNUM /* %d32 */
74 = SPARC64_D0_REGNUM + 16,
75 SPARC64_D62_REGNUM /* %d62 */
76 = SPARC64_D0_REGNUM + 31,
77 SPARC64_Q0_REGNUM, /* %q0 */
78 SPARC64_Q8_REGNUM /* %q8 */
79 = SPARC64_Q0_REGNUM + 2,
80 SPARC64_Q28_REGNUM /* %q28 */
81 = SPARC64_Q0_REGNUM + 7,
82 SPARC64_Q32_REGNUM /* %q32 */
83 = SPARC64_Q0_REGNUM + 8,
84 SPARC64_Q60_REGNUM /* %q60 */
85 = SPARC64_Q0_REGNUM + 15
86 };
87
88 /* Processor state bits. */
89 #define SPARC64_PSTATE_AG 0x001
90 #define SPARC64_PSTATE_IE 0x002
91 #define SPARC64_PSTATE_PRIV 0x004
92 #define SPARC64_PSTATE_AM 0x008
93 #define SPARC64_PSTATE_PEF 0x010
94 #define SPARC64_PSTATE_RED 0x020
95 #define SPARC64_PSTATE_TLE 0x100
96 #define SPARC64_PSTATE_CLE 0x200
97 #define SPARC64_PSTATE_PID0 0x400
98 #define SPARC64_PSTATE_PID1 0x800
99
100 extern void sparc64_init_abi (struct gdbarch_info info,
101 struct gdbarch *gdbarch);
102
103 extern void sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
104 struct regcache *regcache,
105 int regnum, const void *gregs);
106 extern void sparc64_collect_gregset (const struct sparc_gregmap *gregmap,
107 const struct regcache *regcache,
108 int regnum, void *gregs);
109 extern void sparc64_supply_fpregset (const struct sparc_fpregmap *fpregmap,
110 struct regcache *regcache,
111 int regnum, const void *fpregs);
112 extern void sparc64_collect_fpregset (const struct sparc_fpregmap *fpregmap,
113 const struct regcache *regcache,
114 int regnum, void *fpregs);
115
116 /* Functions and variables exported from sparc64-sol2-tdep.c. */
117
118 /* Register offsets for Solaris 2. */
119 extern const struct sparc_gregmap sparc64_sol2_gregmap;
120 extern const struct sparc_fpregmap sparc64_sol2_fpregmap;
121
122 extern void sparc64_sol2_init_abi (struct gdbarch_info info,
123 struct gdbarch *gdbarch);
124
125 /* Variables exported from sparc64-fbsd-tdep.c. */
126
127 /* Register offsets for FreeBSD/sparc64. */
128 extern const struct sparc_gregmap sparc64fbsd_gregmap;
129
130 /* Functions and variables exported from sparc64-nbsd-tdep.c. */
131
132 /* Register offsets for NetBSD/sparc64. */
133 extern const struct sparc_gregmap sparc64nbsd_gregmap;
134
135 extern struct trad_frame_saved_reg *
136 sparc64nbsd_sigcontext_saved_regs (CORE_ADDR sigcontext_addr,
137 struct frame_info *next_frame);
138
139 extern const struct sparc_fpregmap sparc64_bsd_fpregmap;
140
141 extern void sparc64_forget_process (pid_t pid);
142
143 #endif /* sparc64-tdep.h */
gdbarch
Definition: gdbarch.c:127
SPARC64_Q8_REGNUM
Definition: sparc64-tdep.h:78
sparc64_collect_fpregset
void sparc64_collect_fpregset(const struct sparc_fpregmap *fpregmap, const struct regcache *regcache, int regnum, void *fpregs)
Definition: sparc64-tdep.c:2143
sparc64_pseudo_regnum
sparc64_pseudo_regnum
Definition: sparc64-tdep.h:62
SPARC64_Q0_REGNUM
Definition: sparc64-tdep.h:77
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
sparc64_regnum
sparc64_regnum
Definition: sparc64-tdep.h:47
pid
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
Definition: gnu-nat.c:1824
SPARC64_D62_REGNUM
Definition: sparc64-tdep.h:75
sparc64_init_abi
void sparc64_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: sparc64-tdep.c:1804
sparc64_supply_fpregset
void sparc64_supply_fpregset(const struct sparc_fpregmap *fpregmap, struct regcache *regcache, int regnum, const void *fpregs)
Definition: sparc64-tdep.c:2105
SPARC64_Q60_REGNUM
Definition: sparc64-tdep.h:84
frame_info
Definition: frame.c:85
sparc64_supply_gregset
void sparc64_supply_gregset(const struct sparc_gregmap *gregmap, struct regcache *regcache, int regnum, const void *gregs)
Definition: sparc64-tdep.c:1878
sparc_gregmap
Definition: sparc-tdep.h:37
SPARC64_D10_REGNUM
Definition: sparc64-tdep.h:69
SPARC64_D0_REGNUM
Definition: sparc64-tdep.h:68
SPARC_F0_REGNUM
Definition: sparc-tdep.h:133
sparc64_sol2_init_abi
void sparc64_sol2_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: sparc64-sol2-tdep.c:205
SPARC64_Q28_REGNUM
Definition: sparc64-tdep.h:80
sparc64nbsd_sigcontext_saved_regs
struct trad_frame_saved_reg * sparc64nbsd_sigcontext_saved_regs(CORE_ADDR sigcontext_addr, struct frame_info *next_frame)
Definition: sparc64-nbsd-tdep.c:88
sparc64nbsd_gregmap
const struct sparc_gregmap sparc64nbsd_gregmap
Definition: sparc64-nbsd-tdep.c:37
SPARC64_PC_REGNUM
Definition: sparc64-tdep.h:53
SPARC64_NPC_REGNUM
Definition: sparc64-tdep.h:54
sparc_fpregmap
Definition: sparc-tdep.h:50
sparc64_bsd_fpregmap
const struct sparc_fpregmap sparc64_bsd_fpregmap
Definition: sparc64-tdep.c:2180
SPARC64_Q32_REGNUM
Definition: sparc64-tdep.h:82
SPARC64_STATE_REGNUM
Definition: sparc64-tdep.h:55
SPARC64_D30_REGNUM
Definition: sparc64-tdep.h:71
SPARC64_ASI_REGNUM
Definition: sparc64-tdep.h:66
regnum
int regnum
Definition: aarch64-tdep.c:77
SPARC64_FSR_REGNUM
Definition: sparc64-tdep.h:56
sparc64_collect_gregset
void sparc64_collect_gregset(const struct sparc_gregmap *gregmap, const struct regcache *regcache, int regnum, void *gregs)
Definition: sparc64-tdep.c:1995
sparc-tdep.h
SPARC64_F62_REGNUM
Definition: sparc64-tdep.h:51
sparc64_sol2_fpregmap
const struct sparc_fpregmap sparc64_sol2_fpregmap
Definition: sparc64-sol2-tdep.c:48
SPARC64_Y_REGNUM
Definition: sparc64-tdep.h:58
SPARC64_F32_REGNUM
Definition: sparc64-tdep.h:49
sparc64_sol2_gregmap
const struct sparc_gregmap sparc64_sol2_gregmap
Definition: sparc64-sol2-tdep.c:35
regcache
Definition: regcache.h:232
gdbarch_info
Definition: gdbarch.h:1626
sparc64_forget_process
void sparc64_forget_process(pid_t pid)
Definition: sparc64-tdep.c:167
SPARC64_FPRS_REGNUM
Definition: sparc64-tdep.h:57
SPARC64_D32_REGNUM
Definition: sparc64-tdep.h:73
SPARC64_CWP_REGNUM
Definition: sparc64-tdep.h:64
trad_frame_saved_reg
Definition: trad-frame.h:81
sparc64fbsd_gregmap
const struct sparc_gregmap sparc64fbsd_gregmap
Definition: sparc64-fbsd-tdep.c:35
SPARC64_PSTATE_REGNUM
Definition: sparc64-tdep.h:65
SPARC64_CCR_REGNUM
Definition: sparc64-tdep.h:67