Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / arc-tdep.h
CommitLineData
ad0a504f
AK
1/* Target dependent code for ARC arhitecture, for GDB.
2
3 Copyright 2005-2016 Free Software Foundation, Inc.
4 Contributed by Synopsys Inc.
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#ifndef ARC_TDEP_H
22#define ARC_TDEP_H
23
24/* Need disassemble_info. */
25#include "dis-asm.h"
26
27enum arc_regnum
28 {
29 /* Core registers. */
30 ARC_R0_REGNUM = 0,
31 ARC_FIRST_CORE_REGNUM = ARC_R0_REGNUM,
32 ARC_R1_REGNUM = 1,
33 ARC_R4_REGNUM = 4,
34 ARC_R7_REGNUM = 7,
35 ARC_R9_REGNUM = 9,
36 ARC_R13_REGNUM = 13,
37 ARC_R16_REGNUM = 16,
38 ARC_R25_REGNUM = 25,
39 /* Global data pointer. */
40 ARC_GP_REGNUM,
41 /* Frame pointer. */
42 ARC_FP_REGNUM,
43 /* Stack pointer. */
44 ARC_SP_REGNUM,
45 /* Return address from interrupt. */
46 ARC_ILINK_REGNUM,
47 ARC_R30_REGNUM,
48 /* Return address from function. */
49 ARC_BLINK_REGNUM,
50 /* Zero-delay loop counter. */
51 ARC_LP_COUNT_REGNUM = 60,
52 /* Program counter, aligned to 4-bytes, read-only. */
53 ARC_PCL_REGNUM,
54 ARC_LAST_CORE_REGNUM = ARC_PCL_REGNUM,
55 /* AUX registers. */
56 /* Actual program counter. */
57 ARC_PC_REGNUM,
58 ARC_FIRST_AUX_REGNUM = ARC_PC_REGNUM,
59 /* Status register. */
60 ARC_STATUS32_REGNUM,
61 ARC_LAST_REGNUM = ARC_STATUS32_REGNUM,
62 ARC_LAST_AUX_REGNUM = ARC_STATUS32_REGNUM,
63
64 /* Additional ABI constants. */
65 ARC_FIRST_ARG_REGNUM = ARC_R0_REGNUM,
66 ARC_LAST_ARG_REGNUM = ARC_R7_REGNUM,
67 ARC_FIRST_CALLEE_SAVED_REGNUM = ARC_R13_REGNUM,
68 ARC_LAST_CALLEE_SAVED_REGNUM = ARC_R25_REGNUM,
69 };
70
71/* Number of bytes in ARC register. All ARC registers are considered 32-bit.
72 Those registers, which are actually shorter has zero-on-read for extra bits.
73 Longer registers are represented as pairs of 32-bit registers. */
74#define ARC_REGISTER_SIZE 4
75
76#define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args)
77
78extern int arc_debug;
79
b845c31e
AK
80/* Target-dependent information. */
81
82struct gdbarch_tdep
83{
aaf43c48
AK
84 /* Offset to PC value in jump buffer. If this is negative, longjmp
85 support will be disabled. */
86 int jb_pc;
b845c31e
AK
87};
88
ad0a504f
AK
89/* Utility functions used by other ARC-specific modules. */
90
91static inline int
92arc_mach_is_arc600 (struct gdbarch *gdbarch)
93{
94 return (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc600
95 || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601);
96}
97
98static inline int
99arc_mach_is_arc700 (struct gdbarch *gdbarch)
100{
101 return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc700;
102}
103
104static inline int
105arc_mach_is_arcv2 (struct gdbarch *gdbarch)
106{
107 return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arcv2;
108}
109
110#endif /* ARC_TDEP_H */
This page took 0.028743 seconds and 4 git commands to generate.