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/>. */
24 /* Need disassemble_info. */
31 ARC_FIRST_CORE_REGNUM
= ARC_R0_REGNUM
,
39 /* Global data pointer. */
45 /* Return address from interrupt. */
48 /* Return address from function. */
50 /* Zero-delay loop counter. */
51 ARC_LP_COUNT_REGNUM
= 60,
52 /* Program counter, aligned to 4-bytes, read-only. */
54 ARC_LAST_CORE_REGNUM
= ARC_PCL_REGNUM
,
56 /* Actual program counter. */
58 ARC_FIRST_AUX_REGNUM
= ARC_PC_REGNUM
,
59 /* Status register. */
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)
80 /* Utility functions used by other ARC-specific modules. */
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
);
90 arc_mach_is_arc700 (struct gdbarch
*gdbarch
)
92 return gdbarch_bfd_arch_info (gdbarch
)->mach
== bfd_mach_arc_arc700
;
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 */