* Makefile.in (sh_tdep_h): Define and use.
[deliverable/binutils-gdb.git] / gdb / sh-tdep.h
CommitLineData
ab3b8126
JT
1/* Target-specific definition for a Hitachi Super-H.
2 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
3 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 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 SH_TDEP_H
23#define SH_TDEP_H
24
25/* Contributed by Steve Chamberlain sac@cygnus.com */
26
27/* Information that is dependent on the processor variant. */
28
29/* ABI variants that we know about. If you add to this enum, please
30 update the table of names in sh-tdep.c. */
31enum sh_osabi
32{
33 SH_OSABI_UNKNOWN = 0,
34 SH_OSABI_LINUX,
35 SH_OSABI_NETBSD_ELF,
36
37 SH_OSABI_INVALID /* Keep this last. */
38};
39
40enum sh_abi
41 {
42 SH_ABI_UNKNOWN,
43 SH_ABI_32,
44 SH_ABI_64
45 };
46
47struct gdbarch_tdep
48 {
49 int PR_REGNUM;
50 int FPUL_REGNUM; /* sh3e, sh4 */
51 int FPSCR_REGNUM; /* sh3e, sh4 */
52 int SR_REGNUM; /* sh-dsp, sh3, sh3-dsp, sh3e, sh4 */
53 int DSR_REGNUM; /* sh-dsp, sh3-dsp */
54 int FP_LAST_REGNUM; /* sh3e, sh4 */
55 int A0G_REGNUM; /* sh-dsp, sh3-dsp */
56 int A0_REGNUM; /* sh-dsp, sh3-dsp */
57 int A1G_REGNUM; /* sh-dsp, sh3-dsp */
58 int A1_REGNUM; /* sh-dsp, sh3-dsp */
59 int M0_REGNUM; /* sh-dsp, sh3-dsp */
60 int M1_REGNUM; /* sh-dsp, sh3-dsp */
61 int X0_REGNUM; /* sh-dsp, sh3-dsp */
62 int X1_REGNUM; /* sh-dsp, sh3-dsp */
63 int Y0_REGNUM; /* sh-dsp, sh3-dsp */
64 int Y1_REGNUM; /* sh-dsp, sh3-dsp */
65 int MOD_REGNUM; /* sh-dsp, sh3-dsp */
66 int SSR_REGNUM; /* sh3, sh3-dsp, sh3e, sh4 */
67 int SPC_REGNUM; /* sh3, sh3-dsp, sh3e, sh4 */
68 int RS_REGNUM; /* sh-dsp, sh3-dsp */
69 int RE_REGNUM; /* sh-dsp, sh3-dsp */
70 int DR0_REGNUM; /* sh4 */
71 int DR_LAST_REGNUM; /* sh4 */
72 int FV0_REGNUM; /* sh4 */
73 int FV_LAST_REGNUM; /* sh4 */
74 /* FPP stands for Floating Point Pair, to avoid confusion with
75 GDB's FP0_REGNUM, which is the number of the first Floating
76 point register. Unfortunately on the sh5, the floating point
77 registers are called FR, and the floating point pairs are called FP. */
78 int TR7_REGNUM; /* sh5-media*/
79 int FPP0_REGNUM; /* sh5-media*/
80 int FPP_LAST_REGNUM; /* sh5-media*/
81 int R0_C_REGNUM; /* sh5-compact*/
82 int R_LAST_C_REGNUM; /* sh5-compact*/
83 int PC_C_REGNUM; /* sh5-compact*/
84 int GBR_C_REGNUM; /* sh5-compact*/
85 int MACH_C_REGNUM; /* sh5-compact*/
86 int MACL_C_REGNUM; /* sh5-compact*/
87 int PR_C_REGNUM; /* sh5-compact*/
88 int T_C_REGNUM; /* sh5-compact*/
89 int FPSCR_C_REGNUM; /* sh5-compact*/
90 int FPUL_C_REGNUM; /* sh5-compact*/
91 int FP0_C_REGNUM; /* sh5-compact*/
92 int FP_LAST_C_REGNUM; /* sh5-compact*/
93 int DR0_C_REGNUM; /* sh5-compact*/
94 int DR_LAST_C_REGNUM; /* sh5-compact*/
95 int FV0_C_REGNUM; /* sh5-compact*/
96 int FV_LAST_C_REGNUM; /* sh5-compact*/
97 int ARG0_REGNUM;
98 int ARGLAST_REGNUM;
99 int FLOAT_ARGLAST_REGNUM;
100 int RETURN_REGNUM;
101 enum sh_osabi sh_osabi; /* OS/ABI of the inferior */
102 const char *osabi_name; /* Name of the above */
103 enum sh_abi sh_abi;
104 };
105
106/* Registers common to all the SH variants. */
107enum
108 {
109 R0_REGNUM = 0,
110 STRUCT_RETURN_REGNUM = 2,
111 ARG0_REGNUM = 4, /* Used in h8300-tdep.c */
112 ARGLAST_REGNUM = 7, /* Used in h8300-tdep.c */
113 PR_REGNUM = 17, /* used in sh3-rom.c */
114 GBR_REGNUM = 18,
115 VBR_REGNUM = 19,
116 MACH_REGNUM = 20,
117 MACL_REGNUM = 21,
118 SR_REGNUM = 22
119 };
120
121#endif /* SH_TDEP_H */
This page took 0.036826 seconds and 4 git commands to generate.