S/390: Move start of 64 bit binaries from 2GB to 256MB.
[binutils-gdb.git] / gdb / arc-tdep.h
blob1b2694b69b7a2248a0554b1b725261c541ddd778
1 /* Target dependent code for ARC arhitecture, for GDB.
3 Copyright 2005-2016 Free Software Foundation, Inc.
4 Contributed by Synopsys Inc.
6 This file is part of GDB.
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.
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.
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/>. */
21 #ifndef ARC_TDEP_H
22 #define ARC_TDEP_H
24 /* Need disassemble_info. */
25 #include "dis-asm.h"
27 enum arc_regnum
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,
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,
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
76 #define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args)
78 extern int arc_debug;
80 /* Utility functions used by other ARC-specific modules. */
82 static inline int
83 arc_mach_is_arc600 (struct gdbarch *gdbarch)
85 return (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc600
86 || gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601);
89 static inline int
90 arc_mach_is_arc700 (struct gdbarch *gdbarch)
92 return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc700;
95 static inline int
96 arc_mach_is_arcv2 (struct gdbarch *gdbarch)
98 return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arcv2;
101 #endif /* ARC_TDEP_H */