]>
Commit | Line | Data |
---|---|---|
85a453d5 | 1 | /* Target-specific definition for a Renesas Super-H. |
6aba47ca | 2 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
0fb0cc75 | 3 | 2003, 2007, 2008, 2009 Free Software Foundation, Inc. |
ab3b8126 JT |
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 | |
a9762ec7 | 9 | the Free Software Foundation; either version 3 of the License, or |
ab3b8126 JT |
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 | |
a9762ec7 | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
ab3b8126 JT |
19 | |
20 | #ifndef SH_TDEP_H | |
21 | #define SH_TDEP_H | |
22 | ||
23 | /* Contributed by Steve Chamberlain [email protected] */ | |
24 | ||
f2ea0907 | 25 | /* Registers for all SH variants. Used also by sh3-rom.c. */ |
ab3b8126 JT |
26 | enum |
27 | { | |
28 | R0_REGNUM = 0, | |
29 | STRUCT_RETURN_REGNUM = 2, | |
55ff77ac CV |
30 | ARG0_REGNUM = 4, |
31 | ARGLAST_REGNUM = 7, | |
f2ea0907 | 32 | FP_REGNUM = 14, |
c9ac0a72 | 33 | PC_REGNUM = 16, |
55ff77ac | 34 | PR_REGNUM = 17, |
ab3b8126 JT |
35 | GBR_REGNUM = 18, |
36 | VBR_REGNUM = 19, | |
37 | MACH_REGNUM = 20, | |
38 | MACL_REGNUM = 21, | |
55ff77ac | 39 | SR_REGNUM = 22, |
f2ea0907 CV |
40 | FPUL_REGNUM = 23, |
41 | /* Floating point registers */ | |
42 | FPSCR_REGNUM = 24, | |
357d3800 | 43 | FR0_REGNUM = 25, |
55ff77ac | 44 | FLOAT_ARG0_REGNUM = 29, |
f2ea0907 CV |
45 | FLOAT_ARGLAST_REGNUM = 36, |
46 | FP_LAST_REGNUM = 40, | |
47 | /* sh3,sh4 registers */ | |
48 | SSR_REGNUM = 41, | |
49 | SPC_REGNUM = 42, | |
50 | /* DSP registers */ | |
51 | DSR_REGNUM = 24, | |
52 | A0G_REGNUM = 25, | |
53 | A0_REGNUM = 26, | |
54 | A1G_REGNUM = 27, | |
55 | A1_REGNUM = 28, | |
56 | M0_REGNUM = 29, | |
57 | M1_REGNUM = 30, | |
58 | X0_REGNUM = 31, | |
59 | X1_REGNUM = 32, | |
60 | Y0_REGNUM = 33, | |
61 | Y1_REGNUM = 34, | |
62 | MOD_REGNUM = 40, | |
63 | RS_REGNUM = 43, | |
64 | RE_REGNUM = 44, | |
76cd2bd9 CV |
65 | DSP_R0_BANK_REGNUM = 51, |
66 | DSP_R7_BANK_REGNUM = 58, | |
da962468 CV |
67 | /* sh2a register */ |
68 | R0_BANK0_REGNUM = 43, | |
69 | MACHB_REGNUM = 58, | |
70 | IVNB_REGNUM = 59, | |
71 | PRB_REGNUM = 60, | |
72 | GBRB_REGNUM = 61, | |
73 | MACLB_REGNUM = 62, | |
74 | BANK_REGNUM = 63, | |
75 | IBCR_REGNUM = 64, | |
76 | IBNR_REGNUM = 65, | |
77 | TBR_REGNUM = 66, | |
78 | PSEUDO_BANK_REGNUM = 67, | |
f2ea0907 | 79 | /* Floating point pseudo registers */ |
da962468 CV |
80 | DR0_REGNUM = 68, |
81 | DR_LAST_REGNUM = 75, | |
82 | FV0_REGNUM = 76, | |
83 | FV_LAST_REGNUM = 79 | |
ab3b8126 JT |
84 | }; |
85 | ||
55ff77ac | 86 | extern gdbarch_init_ftype sh64_gdbarch_init; |
c458d6db | 87 | extern void sh64_show_regs (struct frame_info *); |
55ff77ac | 88 | |
c9ac0a72 AS |
89 | /* This structure describes a register in a core-file. */ |
90 | struct sh_corefile_regmap | |
91 | { | |
92 | int regnum; | |
93 | unsigned int offset; | |
94 | }; | |
95 | ||
96 | struct gdbarch_tdep | |
97 | { | |
98 | /* Non-NULL when debugging from a core file. Provides the offset | |
99 | where each general-purpose register is stored inside the associated | |
100 | core file section. */ | |
101 | struct sh_corefile_regmap *core_gregmap; | |
102 | /* Non-NULL when debugging from a core file and when FP registers are | |
103 | available. Provides the offset where each FP register is stored | |
104 | inside the associated core file section. */ | |
105 | struct sh_corefile_regmap *core_fpregmap; | |
106 | }; | |
107 | ||
108 | extern struct regset sh_corefile_gregset; | |
109 | ||
110 | void sh_corefile_supply_regset (const struct regset *regset, | |
111 | struct regcache *regcache, | |
112 | int regnum, const void *regs, size_t len); | |
113 | void sh_corefile_collect_regset (const struct regset *regset, | |
114 | const struct regcache *regcache, | |
115 | int regnum, void *regs, size_t len); | |
ab3b8126 | 116 | #endif /* SH_TDEP_H */ |