summaryrefslogtreecommitdiff
path: root/gdb/tilegx-tdep.h
blob: 74a414032f9ed490e9be4f5356047dad0747e486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* Target-dependent code for the Tilera TILE-Gx processor.

   Copyright (C) 2012-2018 Free Software Foundation, Inc.

   This file is part of GDB.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#ifndef TILEGX_TDEP_H
#define TILEGX_TDEP_H

/* TILE-Gx has 56 general purpose registers (R0 - R52, TP, SP, LR),
   plus 8 special general purpose registers (network and ZERO),
   plus 1 magic register (PC).

   TP (aka R53) is the thread specific data pointer.
   SP (aka R54) is the stack pointer.
   LR (aka R55) is the link register.  */

enum tilegx_regnum
  {
    TILEGX_R0_REGNUM,
    TILEGX_FIRST_EASY_REGNUM = TILEGX_R0_REGNUM,
    TILEGX_R1_REGNUM,
    TILEGX_R2_REGNUM,
    TILEGX_R3_REGNUM,
    TILEGX_R4_REGNUM,
    TILEGX_R5_REGNUM,
    TILEGX_R6_REGNUM,
    TILEGX_R7_REGNUM,
    TILEGX_R8_REGNUM,
    TILEGX_R9_REGNUM,
    TILEGX_R10_REGNUM,
    TILEGX_R11_REGNUM,
    TILEGX_R12_REGNUM,
    TILEGX_R13_REGNUM,
    TILEGX_R14_REGNUM,
    TILEGX_R15_REGNUM,
    TILEGX_R16_REGNUM,
    TILEGX_R17_REGNUM,
    TILEGX_R18_REGNUM,
    TILEGX_R19_REGNUM,
    TILEGX_R20_REGNUM,
    TILEGX_R21_REGNUM,
    TILEGX_R22_REGNUM,
    TILEGX_R23_REGNUM,
    TILEGX_R24_REGNUM,
    TILEGX_R25_REGNUM,
    TILEGX_R26_REGNUM,
    TILEGX_R27_REGNUM,
    TILEGX_R28_REGNUM,
    TILEGX_R29_REGNUM,
    TILEGX_R30_REGNUM,
    TILEGX_R31_REGNUM,
    TILEGX_R32_REGNUM,
    TILEGX_R33_REGNUM,
    TILEGX_R34_REGNUM,
    TILEGX_R35_REGNUM,
    TILEGX_R36_REGNUM,
    TILEGX_R37_REGNUM,
    TILEGX_R38_REGNUM,
    TILEGX_R39_REGNUM,
    TILEGX_R40_REGNUM,
    TILEGX_R41_REGNUM,
    TILEGX_R42_REGNUM,
    TILEGX_R43_REGNUM,
    TILEGX_R44_REGNUM,
    TILEGX_R45_REGNUM,
    TILEGX_R46_REGNUM,
    TILEGX_R47_REGNUM,
    TILEGX_R48_REGNUM,
    TILEGX_R49_REGNUM,
    TILEGX_R50_REGNUM,
    TILEGX_R51_REGNUM,
    TILEGX_R52_REGNUM,
    TILEGX_TP_REGNUM,
    TILEGX_SP_REGNUM,
    TILEGX_LR_REGNUM,

    TILEGX_SN_REGNUM,
    TILEGX_NUM_EASY_REGS = TILEGX_SN_REGNUM, /* 56 */

    TILEGX_IO0_REGNUM,
    TILEGX_IO1_REGNUM,
    TILEGX_US0_REGNUM,
    TILEGX_US1_REGNUM,
    TILEGX_US2_REGNUM,
    TILEGX_US3_REGNUM,
    TILEGX_ZERO_REGNUM,

    TILEGX_PC_REGNUM,
    TILEGX_NUM_PHYS_REGS = TILEGX_PC_REGNUM, /* 64 */
    TILEGX_FAULTNUM_REGNUM,
    TILEGX_NUM_REGS, /* 66 */
  };

enum { tilegx_reg_size = 8 };

#endif /* tilegx-tdep.h */