]>
Commit | Line | Data |
---|---|---|
27fd2f50 Q |
1 | /* Target-dependent code for the S+core architecture, for GDB, |
2 | the GNU Debugger. | |
3 | ||
28e7fd62 | 4 | Copyright (C) 2006-2013 Free Software Foundation, Inc. |
27fd2f50 Q |
5 | |
6 | Contributed by Qinwei ([email protected]) | |
7 | Contributed by Ching-Peng Lin ([email protected]) | |
8 | ||
9 | This file is part of GDB. | |
10 | ||
11 | This program is free software; you can redistribute it and/or modify | |
12 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 13 | the Free Software Foundation; either version 3 of the License, or |
27fd2f50 Q |
14 | (at your option) any later version. |
15 | ||
16 | This program is distributed in the hope that it will be useful, | |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | GNU General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 22 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
27fd2f50 Q |
23 | |
24 | #ifndef SCORE_TDEP_H | |
25 | #define SCORE_TDEP_H | |
26 | #include "math.h" | |
27 | ||
28 | enum gdb_regnum | |
29 | { | |
30 | SCORE_SP_REGNUM = 0, | |
31 | SCORE_FP_REGNUM = 2, | |
32 | SCORE_RA_REGNUM = 3, | |
33 | SCORE_A0_REGNUM = 4, | |
34 | SCORE_AL_REGNUM = 7, | |
35 | SCORE_PC_REGNUM = 49, | |
36 | }; | |
37 | ||
38 | #define SCORE_A0_REGNUM 4 | |
39 | #define SCORE_A1_REGNUM 5 | |
40 | #define SCORE_REGSIZE 4 | |
5f814c3b DL |
41 | #define SCORE7_NUM_REGS 56 |
42 | #define SCORE3_NUM_REGS 50 | |
27fd2f50 Q |
43 | #define SCORE_BEGIN_ARG_REGNUM 4 |
44 | #define SCORE_LAST_ARG_REGNUM 7 | |
45 | ||
46 | #define SCORE_INSTLEN 4 | |
47 | #define SCORE16_INSTLEN 2 | |
48 | ||
c378eb4e | 49 | /* Forward declarations. */ |
5f814c3b DL |
50 | struct regset; |
51 | ||
52 | /* Target-dependent structure in gdbarch */ | |
53 | struct gdbarch_tdep | |
54 | { | |
c378eb4e | 55 | /* Cached core file helpers. */ |
5f814c3b DL |
56 | struct regset *gregset; |
57 | }; | |
58 | ||
59 | /* Linux Core file support (dirty hack) | |
60 | ||
c378eb4e | 61 | S+core Linux register set definition, copy from S+core Linux. */ |
5f814c3b | 62 | struct pt_regs { |
c378eb4e MS |
63 | /* Pad bytes for argument save space on the stack. */ |
64 | unsigned long pad0[6]; /* may be 4, MIPS accept 6var, SCore | |
65 | accepts 4 Var--yuchen */ | |
5f814c3b | 66 | |
c378eb4e | 67 | /* Saved main processor registers. */ |
5f814c3b DL |
68 | unsigned long orig_r4; |
69 | unsigned long regs[32]; | |
70 | ||
c378eb4e | 71 | /* Other saved registers. */ |
5f814c3b DL |
72 | unsigned long cel; |
73 | unsigned long ceh; | |
74 | ||
75 | unsigned long sr0; /*cnt*/ | |
76 | unsigned long sr1; /*lcr*/ | |
77 | unsigned long sr2; /*scr*/ | |
78 | ||
79 | /* saved cp0 registers */ | |
80 | unsigned long cp0_epc; | |
81 | unsigned long cp0_ema; | |
82 | unsigned long cp0_psr; | |
83 | unsigned long cp0_ecr; | |
84 | unsigned long cp0_condition; | |
85 | }; | |
86 | ||
87 | typedef struct pt_regs elf_gregset_t; | |
88 | ||
27fd2f50 | 89 | #endif /* SCORE_TDEP_H */ |