gdb/
[platform/upstream/binutils.git] / gdb / tic6x-tdep.h
1 /* GNU/Linux on  TI C6x target support.
2    Copyright (C) 2011
3    Free Software Foundation, Inc.
4    Contributed by Yao Qi <yao@codesourcery.com>
5
6    This file is part of GDB.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21 enum
22 {
23   TIC6X_A4_REGNUM = 4,
24   TIC6X_A5_REGNUM = 5,
25   TIC6X_FP_REGNUM = 15,  /* Frame Pointer: A15 */
26   TIC6X_B0_REGNUM = 16,
27   TIC6X_RA_REGNUM = 19,  /* Return address: B3 */
28   TIC6X_B4_REGNUM = 20,
29   TIC6X_B5_REGNUM = 21,
30   TIC6X_DP_REGNUM = 30,  /* Data Page Pointer: B14 */
31   TIC6X_SP_REGNUM = 31,  /* Stack Pointer: B15 */
32   TIC6X_CSR_REGNUM = 32,
33   TIC6X_PC_REGNUM = 33,
34   TIC6X_NUM_CORE_REGS = 33, /* The number of core registers */
35   TIC6X_RILC_REGNUM = 68,
36   TIC6X_NUM_REGS /* The number of registers */
37 };
38
39 #define TIC6X_INST_SWE 0x10000000
40
41 extern const gdb_byte tic6x_bkpt_illegal_opcode_be[];
42 extern const gdb_byte tic6x_bkpt_illegal_opcode_le[];
43
44 /* Target-dependent structure in gdbarch.  */
45 struct gdbarch_tdep
46 {
47   /* Return the expected next PC if FRAME is stopped at a syscall
48      instruction.  */
49   CORE_ADDR (*syscall_next_pc) (struct frame_info *frame);
50
51   const char *breakpoint; /* Breakpoint instruction.  */
52
53   int has_gp; /* Has general purpose registers A16 - A31 and B16 - B31.  */
54 };