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