]>
Commit | Line | Data |
---|---|---|
7e295833 KB |
1 | /* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger. |
2 | Copyright 2004 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | /* Enumerate the possible ABIs for FR-V. */ | |
22 | enum frv_abi | |
23 | { | |
24 | FRV_ABI_EABI, | |
25 | FRV_ABI_FDPIC | |
26 | }; | |
27 | ||
34ce532e KB |
28 | /* Register numbers. The order in which these appear define the |
29 | remote protocol, so take care in changing them. */ | |
30 | enum { | |
31 | /* Register numbers 0 -- 63 are always reserved for general-purpose | |
32 | registers. The chip at hand may have less. */ | |
33 | first_gpr_regnum = 0, | |
34 | sp_regnum = 1, | |
35 | fp_regnum = 2, | |
36 | struct_return_regnum = 3, | |
37 | last_gpr_regnum = 63, | |
38 | ||
39 | /* Register numbers 64 -- 127 are always reserved for floating-point | |
40 | registers. The chip at hand may have less. */ | |
41 | first_fpr_regnum = 64, | |
42 | last_fpr_regnum = 127, | |
43 | ||
44 | /* The PC register. */ | |
45 | pc_regnum = 128, | |
46 | ||
47 | /* Register numbers 129 on up are always reserved for special-purpose | |
48 | registers. */ | |
49 | first_spr_regnum = 129, | |
50 | psr_regnum = 129, | |
51 | ccr_regnum = 130, | |
52 | cccr_regnum = 131, | |
53 | fdpic_loadmap_exec_regnum = 132, | |
54 | fdpic_loadmap_interp_regnum = 133, | |
55 | tbr_regnum = 135, | |
56 | brr_regnum = 136, | |
57 | dbar0_regnum = 137, | |
58 | dbar1_regnum = 138, | |
59 | dbar2_regnum = 139, | |
60 | dbar3_regnum = 140, | |
b2d6d697 KB |
61 | scr0_regnum = 141, |
62 | scr1_regnum = 142, | |
63 | scr2_regnum = 143, | |
64 | scr3_regnum = 144, | |
34ce532e KB |
65 | lr_regnum = 145, |
66 | lcr_regnum = 146, | |
67 | iacc0h_regnum = 147, | |
68 | iacc0l_regnum = 148, | |
69 | last_spr_regnum = 148, | |
70 | ||
71 | /* The total number of registers we know exist. */ | |
72 | frv_num_regs = last_spr_regnum + 1, | |
73 | ||
74 | /* Pseudo registers */ | |
75 | first_pseudo_regnum = frv_num_regs, | |
76 | ||
77 | /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */ | |
78 | iacc0_regnum = first_pseudo_regnum + 0, | |
79 | ||
80 | last_pseudo_regnum = iacc0_regnum, | |
81 | frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1, | |
82 | }; | |
83 | ||
7e295833 KB |
84 | /* Return the FR-V ABI associated with GDBARCH. */ |
85 | enum frv_abi frv_abi (struct gdbarch *gdbarch); | |
86 | ||
5ecb7103 KB |
87 | /* Associate a sigcontext address fetcher with GDBARCH. */ |
88 | void frv_set_sigcontext_reg_addr (struct gdbarch *gdbarch, | |
89 | CORE_ADDR (*sigcontext_reg_addr) | |
90 | (struct frame_info *, int, CORE_ADDR *)); | |
91 | ||
7e295833 KB |
92 | /* Fetch the interpreter and executable loadmap addresses (for shared |
93 | library support) for the FDPIC ABI. Return 0 if successful, -1 if | |
94 | not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */ | |
95 | int frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch, | |
96 | CORE_ADDR *interp_addr, CORE_ADDR *exec_addr); | |
c4d10515 KB |
97 | |
98 | /* Given a function entry point, find and return the GOT address for the | |
99 | containing load module. */ | |
100 | CORE_ADDR frv_fdpic_find_global_pointer (CORE_ADDR addr); | |
101 | ||
102 | /* Given a function entry point, find and return the canonical descriptor | |
103 | for that function, if one exists. If no canonical descriptor could | |
104 | be found, return 0. */ | |
105 | CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point); |