]>
Commit | Line | Data |
---|---|---|
8b39fe56 MK |
1 | /* Target-dependent code for UltraSPARC. |
2 | ||
386c036b | 3 | Copyright 2003, 2004 Free Software Foundation, Inc. |
8b39fe56 MK |
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 2 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, write to the Free Software | |
19 | Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | #ifndef SPARC64_TDEP_H | |
386c036b | 23 | #define SPARC64_TDEP_H 1 |
8b39fe56 | 24 | |
386c036b | 25 | #include "sparc-tdep.h" |
8b39fe56 | 26 | |
386c036b MK |
27 | /* The stack pointer is offset from the stack frame by a BIAS of 2047 |
28 | (0x7ff) for 64-bit code. BIAS is likely to be defined on SPARC | |
29 | hosts, so undefine it first. */ | |
30 | #undef BIAS | |
31 | #define BIAS 2047 | |
32 | ||
33 | /* Register offsets for the general-purpose register set. */ | |
34 | ||
35 | /* UltraSPARC doesn't have %psr. */ | |
36 | #define r_tstate_offset r_psr_offset | |
37 | ||
38 | /* UltraSPARC doesn't have %wim either. */ | |
39 | #define r_fprs_offset r_wim_offset | |
40 | ||
41 | /* Register numbers of various important registers. */ | |
8b39fe56 MK |
42 | |
43 | enum sparc64_regnum | |
44 | { | |
386c036b MK |
45 | SPARC64_F32_REGNUM /* %f32 */ |
46 | = SPARC_F0_REGNUM + 32, | |
47 | SPARC64_F62_REGNUM /* %f62 */ | |
48 | = SPARC64_F32_REGNUM + 15, | |
8b39fe56 MK |
49 | SPARC64_PC_REGNUM, /* %pc */ |
50 | SPARC64_NPC_REGNUM, /* %npc */ | |
51 | SPARC64_STATE_REGNUM, | |
52 | SPARC64_FSR_REGNUM, /* %fsr */ | |
53 | SPARC64_FPRS_REGNUM, /* %fprs */ | |
54 | SPARC64_Y_REGNUM, /* %y */ | |
386c036b | 55 | |
8b39fe56 MK |
56 | /* Pseudo registers. */ |
57 | SPARC64_CWP_REGNUM, /* %cwp */ | |
58 | SPARC64_PSTATE_REGNUM, /* %pstate */ | |
59 | SPARC64_ASI_REGNUM, /* %asi */ | |
60 | SPARC64_CCR_REGNUM, /* %ccr */ | |
61 | SPARC64_D0_REGNUM, /* %d0 */ | |
386c036b MK |
62 | SPARC64_D10_REGNUM /* %d10 */ |
63 | = SPARC64_D0_REGNUM + 5, | |
64 | SPARC64_D30_REGNUM /* %d30 */ | |
65 | = SPARC64_D0_REGNUM + 15, | |
66 | SPARC64_D32_REGNUM /* %d32 */ | |
67 | = SPARC64_D0_REGNUM + 16, | |
68 | SPARC64_D62_REGNUM /* %d62 */ | |
69 | = SPARC64_D0_REGNUM + 31, | |
8b39fe56 | 70 | SPARC64_Q0_REGNUM, /* %q0 */ |
386c036b MK |
71 | SPARC64_Q8_REGNUM /* %q8 */ |
72 | = SPARC64_Q0_REGNUM + 2, | |
73 | SPARC64_Q28_REGNUM /* %q28 */ | |
74 | = SPARC64_Q0_REGNUM + 7, | |
75 | SPARC64_Q32_REGNUM /* %q32 */ | |
76 | = SPARC64_Q0_REGNUM + 8, | |
77 | SPARC64_Q60_REGNUM /* %q60 */ | |
78 | = SPARC64_Q0_REGNUM + 15 | |
8b39fe56 MK |
79 | }; |
80 | ||
386c036b MK |
81 | extern void sparc64_init_abi (struct gdbarch_info info, |
82 | struct gdbarch *gdbarch); | |
83 | ||
84 | extern void sparc64_supply_gregset (const struct sparc_gregset *gregset, | |
85 | struct regcache *regcache, | |
86 | int regnum, const void *gregs); | |
87 | extern void sparc64_collect_gregset (const struct sparc_gregset *gregset, | |
88 | const struct regcache *regcache, | |
89 | int regnum, void *gregs); | |
90 | extern void sparc64_supply_fpregset (struct regcache *regcache, | |
91 | int regnum, const void *fpregs); | |
92 | extern void sparc64_collect_fpregset (const struct regcache *regcache, | |
93 | int regnum, void *fpregs); | |
94 | ||
95 | /* Functions and variables exported from sparc64-sol2-tdep.c. */ | |
96 | ||
97 | /* Register offsets for Solaris 2. */ | |
98 | extern const struct sparc_gregset sparc64_sol2_gregset; | |
99 | ||
100 | extern void sparc64_sol2_init_abi (struct gdbarch_info info, | |
101 | struct gdbarch *gdbarch); | |
102 | ||
103 | /* Variables exported from sparc64fbsd-tdep.c. */ | |
104 | ||
105 | /* Register offsets for FreeBSD/sparc64. */ | |
106 | extern const struct sparc_gregset sparc64fbsd_gregset; | |
8b39fe56 | 107 | |
386c036b | 108 | /* Variables exported from sparc64nbsd-tdep.c. */ |
8b39fe56 | 109 | |
386c036b MK |
110 | /* Register offsets for NetBSD/sparc64. */ |
111 | extern const struct sparc_gregset sparc64nbsd_gregset; | |
8b39fe56 MK |
112 | |
113 | #endif /* sparc64-tdep.h */ |