]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/frv-tdep.h
run copyright.sh for 2011.
[thirdparty/binutils-gdb.git] / gdb / frv-tdep.h
CommitLineData
7e295833 1/* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
7b6bb8da
JB
2 Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011
3 Free Software Foundation, Inc.
7e295833
KB
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
7e295833
KB
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/>. */
7e295833
KB
19
20/* Enumerate the possible ABIs for FR-V. */
21enum frv_abi
22 {
23 FRV_ABI_EABI,
24 FRV_ABI_FDPIC
25 };
26
34ce532e
KB
27/* Register numbers. The order in which these appear define the
28 remote protocol, so take care in changing them. */
29enum {
30 /* Register numbers 0 -- 63 are always reserved for general-purpose
31 registers. The chip at hand may have less. */
32 first_gpr_regnum = 0,
33 sp_regnum = 1,
34 fp_regnum = 2,
35 struct_return_regnum = 3,
36 last_gpr_regnum = 63,
37
38 /* Register numbers 64 -- 127 are always reserved for floating-point
39 registers. The chip at hand may have less. */
40 first_fpr_regnum = 64,
41 last_fpr_regnum = 127,
42
43 /* The PC register. */
44 pc_regnum = 128,
45
46 /* Register numbers 129 on up are always reserved for special-purpose
47 registers. */
48 first_spr_regnum = 129,
49 psr_regnum = 129,
50 ccr_regnum = 130,
51 cccr_regnum = 131,
52 fdpic_loadmap_exec_regnum = 132,
53 fdpic_loadmap_interp_regnum = 133,
54 tbr_regnum = 135,
55 brr_regnum = 136,
56 dbar0_regnum = 137,
57 dbar1_regnum = 138,
58 dbar2_regnum = 139,
59 dbar3_regnum = 140,
b2d6d697
KB
60 scr0_regnum = 141,
61 scr1_regnum = 142,
62 scr2_regnum = 143,
63 scr3_regnum = 144,
34ce532e
KB
64 lr_regnum = 145,
65 lcr_regnum = 146,
66 iacc0h_regnum = 147,
67 iacc0l_regnum = 148,
8b67aa36
KB
68 fsr0_regnum = 149,
69 acc0_regnum = 150,
70 acc7_regnum = 157,
71 accg0123_regnum = 158,
72 accg4567_regnum = 159,
73 msr0_regnum = 160,
74 msr1_regnum = 161,
75 gner0_regnum = 162,
76 gner1_regnum = 163,
77 fner0_regnum = 164,
78 fner1_regnum = 165,
79 last_spr_regnum = 165,
34ce532e
KB
80
81 /* The total number of registers we know exist. */
82 frv_num_regs = last_spr_regnum + 1,
83
84 /* Pseudo registers */
85 first_pseudo_regnum = frv_num_regs,
86
87 /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */
88 iacc0_regnum = first_pseudo_regnum + 0,
8b67aa36
KB
89 accg0_regnum = first_pseudo_regnum + 1,
90 accg7_regnum = accg0_regnum + 7,
34ce532e 91
8b67aa36 92 last_pseudo_regnum = accg7_regnum,
34ce532e
KB
93 frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1,
94};
95
7e295833
KB
96/* Return the FR-V ABI associated with GDBARCH. */
97enum frv_abi frv_abi (struct gdbarch *gdbarch);
98
99/* Fetch the interpreter and executable loadmap addresses (for shared
100 library support) for the FDPIC ABI. Return 0 if successful, -1 if
101 not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
102int frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch,
103 CORE_ADDR *interp_addr, CORE_ADDR *exec_addr);
c4d10515
KB
104
105/* Given a function entry point, find and return the GOT address for the
106 containing load module. */
107CORE_ADDR frv_fdpic_find_global_pointer (CORE_ADDR addr);
108
109/* Given a function entry point, find and return the canonical descriptor
110 for that function, if one exists. If no canonical descriptor could
111 be found, return 0. */
112CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point);
186993b4
KB
113
114
115/* Given an objfile, return the address of its link map. This value is
116 needed for TLS support. */
117CORE_ADDR frv_fetch_objfile_link_map (struct objfile *objfile);
917630e4
UW
118
119struct target_so_ops;
120extern struct target_so_ops frv_so_ops;
121