arc: New Synopsys ARC port
ARC is a family of licensable processors developed by Synopsys. This is an initial patch that doesn't yet support some of the features, that are already available in Synopsys' fork of GDB, namely: * longjmp support * signal frame handling * prologue analysis * Linux targets support * native Linux support ARC cores are configurable and extensible, which means from debugger perspective that some registers and debug capabilities are optional, therefore it is up to the GDB stub to determine exact list of register available on target and supply it to GDB via XML target descriptions. List of registers that is known to GDB and is required is intentionally kept small to simplify requirements to GDB stub and implementation of a GDB client. gdb/ChangeLog: * Makefile.in (ALL_TARGET_OBS): Add arc-tdep.o. (HFILES_NO_SRCDIR): Add arc-tdep.h. (ALLDEPFILES): Add arc-tdep.c. * NEWS: Mention new ARC port. * configure.tgt: Add ARC. * arc-tdep.c: New file. * arc-tdep.h: New file. * features/Makefile (XMLTOC): Add arc-v2.xml and arc-arcompact.xml. * features/arc-v2.xml: New file. * features/arc-v2.c: New file (generated). * features/arc-arcompact.xml: New file. * features/arc-arcompact.c: New file (generated). gdb/doc/ChangeLog: * gdb.texinfo (Embedded Processors): Document ARC. (Synopsys ARC): New section. (Standard Target Features): Document ARC features. (ARC Features): New section. gdb/testsuite/ChangeLog: * gdb.xml/tdesc-regs.exp: set core-regs for arc*-*-elf32.
This commit is contained in:
parent
8aabe2e254
commit
ad0a504f7e
@ -1,3 +1,18 @@
|
||||
2016-09-21 Anton Kolesov <anton.kolesov@synopsys.com>
|
||||
|
||||
* Makefile.in (ALL_TARGET_OBS): Add arc-tdep.o.
|
||||
(HFILES_NO_SRCDIR): Add arc-tdep.h.
|
||||
(ALLDEPFILES): Add arc-tdep.c.
|
||||
* NEWS: Mention new ARC port.
|
||||
* configure.tgt: Add ARC.
|
||||
* arc-tdep.c: New file.
|
||||
* arc-tdep.h: New file.
|
||||
* features/Makefile (XMLTOC): Add arc-v2.xml and arc-arcompact.xml.
|
||||
* features/arc-v2.xml: New file.
|
||||
* features/arc-v2.c: New file (generated).
|
||||
* features/arc-arcompact.xml: New file.
|
||||
* features/arc-arcompact.c: New file (generated).
|
||||
|
||||
2016-09-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* rs6000-tdep.c (ppc_process_record_op63): Fix return of instruction
|
||||
|
@ -652,6 +652,7 @@ ALL_64_TARGET_OBS = \
|
||||
|
||||
# All other target-dependent objects files (used with --enable-targets=all).
|
||||
ALL_TARGET_OBS = \
|
||||
arc-tdep.o \
|
||||
armbsd-tdep.o arm.o arm-linux.o arm-linux-tdep.o \
|
||||
arm-get-next-pcs.o arm-symbian-tdep.o \
|
||||
armnbsd-tdep.o armobsd-tdep.o \
|
||||
@ -906,7 +907,7 @@ LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
|
||||
HFILES_NO_SRCDIR = \
|
||||
common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
|
||||
common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
|
||||
proc-utils.h aarch64-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
|
||||
proc-utils.h aarch64-tdep.h arc-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
|
||||
ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
|
||||
exec.h m32r-tdep.h osabi.h gdbcore.h x86bsd-nat.h \
|
||||
i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
|
||||
@ -1664,6 +1665,7 @@ ALLDEPFILES = \
|
||||
alpha-tdep.c alpha-mdebug-tdep.c \
|
||||
alpha-linux-tdep.c \
|
||||
alphabsd-tdep.c alphafbsd-tdep.c alphanbsd-tdep.c alphaobsd-tdep.c \
|
||||
arc-tdep.c \
|
||||
amd64-nat.c amd64-tdep.c \
|
||||
amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
|
||||
amd64nbsd-nat.c amd64nbsd-tdep.c \
|
||||
|
4
gdb/NEWS
4
gdb/NEWS
@ -15,6 +15,10 @@
|
||||
running on MS-Windows use to assign names to threads in the
|
||||
debugger.
|
||||
|
||||
* New targets
|
||||
|
||||
Synopsys ARC arc*-*-elf32
|
||||
|
||||
*** Changes in GDB 7.12
|
||||
|
||||
* GDB and GDBserver now build with a C++ compiler by default.
|
||||
|
1281
gdb/arc-tdep.c
Normal file
1281
gdb/arc-tdep.c
Normal file
File diff suppressed because it is too large
Load Diff
101
gdb/arc-tdep.h
Normal file
101
gdb/arc-tdep.h
Normal file
@ -0,0 +1,101 @@
|
||||
/* Target dependent code for ARC arhitecture, for GDB.
|
||||
|
||||
Copyright 2005-2016 Free Software Foundation, Inc.
|
||||
Contributed by Synopsys 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 ARC_TDEP_H
|
||||
#define ARC_TDEP_H
|
||||
|
||||
/* Need disassemble_info. */
|
||||
#include "dis-asm.h"
|
||||
|
||||
enum arc_regnum
|
||||
{
|
||||
/* Core registers. */
|
||||
ARC_R0_REGNUM = 0,
|
||||
ARC_FIRST_CORE_REGNUM = ARC_R0_REGNUM,
|
||||
ARC_R1_REGNUM = 1,
|
||||
ARC_R4_REGNUM = 4,
|
||||
ARC_R7_REGNUM = 7,
|
||||
ARC_R9_REGNUM = 9,
|
||||
ARC_R13_REGNUM = 13,
|
||||
ARC_R16_REGNUM = 16,
|
||||
ARC_R25_REGNUM = 25,
|
||||
/* Global data pointer. */
|
||||
ARC_GP_REGNUM,
|
||||
/* Frame pointer. */
|
||||
ARC_FP_REGNUM,
|
||||
/* Stack pointer. */
|
||||
ARC_SP_REGNUM,
|
||||
/* Return address from interrupt. */
|
||||
ARC_ILINK_REGNUM,
|
||||
ARC_R30_REGNUM,
|
||||
/* Return address from function. */
|
||||
ARC_BLINK_REGNUM,
|
||||
/* Zero-delay loop counter. */
|
||||
ARC_LP_COUNT_REGNUM = 60,
|
||||
/* Program counter, aligned to 4-bytes, read-only. */
|
||||
ARC_PCL_REGNUM,
|
||||
ARC_LAST_CORE_REGNUM = ARC_PCL_REGNUM,
|
||||
/* AUX registers. */
|
||||
/* Actual program counter. */
|
||||
ARC_PC_REGNUM,
|
||||
ARC_FIRST_AUX_REGNUM = ARC_PC_REGNUM,
|
||||
/* Status register. */
|
||||
ARC_STATUS32_REGNUM,
|
||||
ARC_LAST_REGNUM = ARC_STATUS32_REGNUM,
|
||||
ARC_LAST_AUX_REGNUM = ARC_STATUS32_REGNUM,
|
||||
|
||||
/* Additional ABI constants. */
|
||||
ARC_FIRST_ARG_REGNUM = ARC_R0_REGNUM,
|
||||
ARC_LAST_ARG_REGNUM = ARC_R7_REGNUM,
|
||||
ARC_FIRST_CALLEE_SAVED_REGNUM = ARC_R13_REGNUM,
|
||||
ARC_LAST_CALLEE_SAVED_REGNUM = ARC_R25_REGNUM,
|
||||
};
|
||||
|
||||
/* Number of bytes in ARC register. All ARC registers are considered 32-bit.
|
||||
Those registers, which are actually shorter has zero-on-read for extra bits.
|
||||
Longer registers are represented as pairs of 32-bit registers. */
|
||||
#define ARC_REGISTER_SIZE 4
|
||||
|
||||
#define arc_print(fmt, args...) fprintf_unfiltered (gdb_stdlog, fmt, ##args)
|
||||
|
||||
extern int arc_debug;
|
||||
|
||||
/* Utility functions used by other ARC-specific modules. */
|
||||
|
||||
static inline int
|
||||
arc_mach_is_arc600 (struct gdbarch *gdbarch)
|
||||
{
|
||||
return (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc600
|
||||
|| gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc601);
|
||||
}
|
||||
|
||||
static inline int
|
||||
arc_mach_is_arc700 (struct gdbarch *gdbarch)
|
||||
{
|
||||
return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arc700;
|
||||
}
|
||||
|
||||
static inline int
|
||||
arc_mach_is_arcv2 (struct gdbarch *gdbarch)
|
||||
{
|
||||
return gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_arc_arcv2;
|
||||
}
|
||||
|
||||
#endif /* ARC_TDEP_H */
|
@ -83,6 +83,11 @@ am33_2.0*-*-linux*)
|
||||
solib-svr4.o"
|
||||
;;
|
||||
|
||||
arc*-*-*)
|
||||
# Target: baremetal ARC elf32 target
|
||||
gdb_target_obs="arc-tdep.o"
|
||||
;;
|
||||
|
||||
arm*-wince-pe | arm*-*-mingw32ce*)
|
||||
# Target: ARM based machine running Windows CE (win32)
|
||||
gdb_target_obs="arm.o arm-get-next-pcs.o arm-tdep.o \
|
||||
|
@ -1,3 +1,10 @@
|
||||
2016-09-21 Anton Kolesov <anton.kolesov@synopsys.com>
|
||||
|
||||
* gdb.texinfo (Embedded Processors): Document ARC.
|
||||
(Synopsys ARC): New section.
|
||||
(Standard Target Features): Document ARC features.
|
||||
(ARC Features): New section.
|
||||
|
||||
2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* .gitignore: New file.
|
||||
|
@ -22017,6 +22017,7 @@ acceptable commands.
|
||||
|
||||
|
||||
@menu
|
||||
* ARC:: Synopsys ARC
|
||||
* ARM:: ARM
|
||||
* M68K:: Motorola M68K
|
||||
* MicroBlaze:: Xilinx MicroBlaze
|
||||
@ -22027,6 +22028,30 @@ acceptable commands.
|
||||
* Super-H:: Renesas Super-H
|
||||
@end menu
|
||||
|
||||
@node ARC
|
||||
@subsection Synopsys ARC
|
||||
@cindex Synopsys ARC
|
||||
@cindex ARC specific commands
|
||||
@cindex ARC600
|
||||
@cindex ARC700
|
||||
@cindex ARC EM
|
||||
@cindex ARC HS
|
||||
|
||||
@value{GDBN} provides the following ARC-specific commands:
|
||||
|
||||
@table @code
|
||||
@item set debug arc
|
||||
@kindex set debug arc
|
||||
Control the level of ARC specific debug messages. Use 0 for no messages (the
|
||||
default) and 1 for debug messages. At present higher values offer no further
|
||||
messages.
|
||||
|
||||
@item show debug arc
|
||||
@kindex show debug arc
|
||||
Show the level of ARC specific debugging in operation.
|
||||
|
||||
@end table
|
||||
|
||||
@node ARM
|
||||
@subsection ARM
|
||||
|
||||
@ -40907,6 +40932,7 @@ registers using the capitalization used in the description.
|
||||
|
||||
@menu
|
||||
* AArch64 Features::
|
||||
* ARC Features::
|
||||
* ARM Features::
|
||||
* i386 Features::
|
||||
* MicroBlaze Features::
|
||||
@ -40932,6 +40958,45 @@ The @samp{org.gnu.gdb.aarch64.fpu} feature is optional. If present,
|
||||
it should contain registers @samp{v0} through @samp{v31}, @samp{fpsr},
|
||||
and @samp{fpcr}.
|
||||
|
||||
@node ARC Features
|
||||
@subsection ARC Features
|
||||
@cindex target descriptions, ARC Features
|
||||
|
||||
ARC processors are highly configurable, so even core registers and their number
|
||||
are not completely predetermined. In addition flags and PC registers which are
|
||||
important to @value{GDBN} are not ``core'' registers in ARC. It is required
|
||||
that one of the core registers features is present.
|
||||
@samp{org.gnu.gdb.arc.aux-minimal} feature is mandatory.
|
||||
|
||||
The @samp{org.gnu.gdb.arc.core.v2} feature is required for ARC EM and ARC HS
|
||||
targets with a normal register file. It should contain registers @samp{r0}
|
||||
through @samp{r25}, @samp{gp}, @samp{fp}, @samp{sp}, @samp{r30}, @samp{blink},
|
||||
@samp{lp_count} and @samp{pcl}. This feature may contain register @samp{ilink}
|
||||
and any of extension core registers @samp{r32} through @samp{r59/acch}.
|
||||
@samp{ilink} and extension core registers are not available to read/write, when
|
||||
debugging GNU/Linux applications, thus @samp{ilink} is made optional.
|
||||
|
||||
The @samp{org.gnu.gdb.arc.core-reduced.v2} feature is required for ARC EM and
|
||||
ARC HS targets with a reduced register file. It should contain registers
|
||||
@samp{r0} through @samp{r3}, @samp{r10} through @samp{r15}, @samp{gp},
|
||||
@samp{fp}, @samp{sp}, @samp{r30}, @samp{blink}, @samp{lp_count} and @samp{pcl}.
|
||||
This feature may contain register @samp{ilink} and any of extension core
|
||||
registers @samp{r32} through @samp{r59/acch}.
|
||||
|
||||
The @samp{org.gnu.gdb.arc.core.arcompact} feature is required for ARCompact
|
||||
targets with a normal register file. It should contain registers @samp{r0}
|
||||
through @samp{r25}, @samp{gp}, @samp{fp}, @samp{sp}, @samp{r30}, @samp{blink},
|
||||
@samp{lp_count} and @samp{pcl}. This feature may contain registers
|
||||
@samp{ilink1}, @samp{ilink2} and any of extension core registers @samp{r32}
|
||||
through @samp{r59/acch}. @samp{ilink1} and @samp{ilink2} and extension core
|
||||
registers are not available when debugging GNU/Linux applications. The only
|
||||
difference with @samp{org.gnu.gdb.arc.core.v2} feature is in the names of
|
||||
@samp{ilink1} and @samp{ilink2} registers and that @samp{r30} is mandatory in
|
||||
ARC v2, but @samp{ilink2} is optional on ARCompact.
|
||||
|
||||
The @samp{org.gnu.gdb.arc.aux-minimal} feature is required for all ARC
|
||||
targets. It should contain registers @samp{pc} and @samp{status32}.
|
||||
|
||||
@node ARM Features
|
||||
@subsection ARM Features
|
||||
@cindex target descriptions, ARM features
|
||||
|
@ -148,6 +148,8 @@ OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH))
|
||||
# to make on the command line.
|
||||
XMLTOC = \
|
||||
aarch64.xml \
|
||||
arc-v2.xml \
|
||||
arc-arcompact.xml \
|
||||
arm-with-iwmmxt.xml \
|
||||
arm-with-m-fpa-layout.xml \
|
||||
arm-with-m-vfp-d16.xml \
|
||||
|
75
gdb/features/arc-arcompact.c
Normal file
75
gdb/features/arc-arcompact.c
Normal file
@ -0,0 +1,75 @@
|
||||
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
|
||||
Original: arc-arcompact.xml */
|
||||
|
||||
#include "defs.h"
|
||||
#include "osabi.h"
|
||||
#include "target-descriptions.h"
|
||||
|
||||
struct target_desc *tdesc_arc_arcompact;
|
||||
static void
|
||||
initialize_tdesc_arc_arcompact (void)
|
||||
{
|
||||
struct target_desc *result = allocate_target_description ();
|
||||
struct tdesc_feature *feature;
|
||||
struct tdesc_type *field_type;
|
||||
struct tdesc_type *type;
|
||||
|
||||
set_tdesc_architecture (result, bfd_scan_arch ("ARC700"));
|
||||
|
||||
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.core.arcompact");
|
||||
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "fp", 27, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "sp", 28, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "ilink1", 29, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "ilink2", 30, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
|
||||
tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
|
||||
|
||||
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
|
||||
type = tdesc_create_flags (feature, "status32_type", 4);
|
||||
tdesc_add_bitfield (type, "H", 0, 0);
|
||||
tdesc_add_bitfield (type, "E", 1, 2);
|
||||
tdesc_add_bitfield (type, "A", 3, 4);
|
||||
tdesc_add_bitfield (type, "AE", 5, 5);
|
||||
tdesc_add_bitfield (type, "DE", 6, 6);
|
||||
tdesc_add_bitfield (type, "U", 7, 7);
|
||||
tdesc_add_bitfield (type, "V", 8, 8);
|
||||
tdesc_add_bitfield (type, "C", 9, 9);
|
||||
tdesc_add_bitfield (type, "N", 10, 10);
|
||||
tdesc_add_bitfield (type, "Z", 11, 11);
|
||||
tdesc_add_bitfield (type, "L", 12, 12);
|
||||
tdesc_add_bitfield (type, "R", 13, 13);
|
||||
tdesc_add_bitfield (type, "SE", 14, 14);
|
||||
|
||||
tdesc_create_reg (feature, "pc", 34, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "status32", 35, 1, NULL, 32, "status32_type");
|
||||
|
||||
tdesc_arc_arcompact = result;
|
||||
}
|
85
gdb/features/arc-arcompact.xml
Normal file
85
gdb/features/arc-arcompact.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Copyright (C) 2015-2016 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. -->
|
||||
|
||||
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
||||
<target>
|
||||
<architecture>arc:ARC700</architecture>
|
||||
<!-- No OSABI for bare metal. -->
|
||||
<!-- No compatibility for ARC. -->
|
||||
|
||||
<feature name="org.gnu.gdb.arc.core.arcompact">
|
||||
<reg name="r0" bitsize="32"/>
|
||||
<reg name="r1" bitsize="32"/>
|
||||
<reg name="r2" bitsize="32"/>
|
||||
<reg name="r3" bitsize="32"/>
|
||||
<reg name="r4" bitsize="32"/>
|
||||
<reg name="r5" bitsize="32"/>
|
||||
<reg name="r6" bitsize="32"/>
|
||||
<reg name="r7" bitsize="32"/>
|
||||
<reg name="r8" bitsize="32"/>
|
||||
<reg name="r9" bitsize="32"/>
|
||||
<reg name="r10" bitsize="32"/>
|
||||
<reg name="r11" bitsize="32"/>
|
||||
<reg name="r12" bitsize="32"/>
|
||||
<reg name="r13" bitsize="32"/>
|
||||
<reg name="r14" bitsize="32"/>
|
||||
<reg name="r15" bitsize="32"/>
|
||||
<reg name="r16" bitsize="32"/>
|
||||
<reg name="r17" bitsize="32"/>
|
||||
<reg name="r18" bitsize="32"/>
|
||||
<reg name="r19" bitsize="32"/>
|
||||
<reg name="r20" bitsize="32"/>
|
||||
<reg name="r21" bitsize="32"/>
|
||||
<reg name="r22" bitsize="32"/>
|
||||
<reg name="r23" bitsize="32"/>
|
||||
<reg name="r24" bitsize="32"/>
|
||||
<reg name="r25" bitsize="32"/>
|
||||
|
||||
<!-- ARC core data pointer registers. -->
|
||||
<reg name="gp" bitsize="32" type="data_ptr"/>
|
||||
<reg name="fp" bitsize="32" type="data_ptr"/>
|
||||
<reg name="sp" bitsize="32" type="data_ptr"/>
|
||||
|
||||
<!-- Code pointers. -->
|
||||
<reg name="ilink1" bitsize="32" type="code_ptr"/>
|
||||
<reg name="ilink2" bitsize="32" type="code_ptr"/>
|
||||
<reg name="blink" bitsize="32" type="code_ptr"/>
|
||||
|
||||
<!-- Here goes extension core registers: r32 - r59 -->
|
||||
|
||||
<!-- Loop counter. -->
|
||||
<reg name="lp_count" bitsize="32" type="uint32"/>
|
||||
|
||||
<!-- r61 is a reserved register address. -->
|
||||
|
||||
<!-- r62 is a long immediate value, not a real register. -->
|
||||
|
||||
<!-- 4-byte aligned read-only program counter. -->
|
||||
<reg name="pcl" bitsize="32" type="code_ptr" group=""/>
|
||||
</feature>
|
||||
|
||||
<feature name="org.gnu.gdb.arc.aux-minimal">
|
||||
<flags id="status32_type" size="4">
|
||||
<field name="H" start="0" end="0"/>
|
||||
<field name="E" start="1" end="2"/>
|
||||
<field name="A" start="3" end="4"/>
|
||||
<field name="AE" start="5" end="5"/>
|
||||
<field name="DE" start="6" end="6"/>
|
||||
<field name="U" start="7" end="7"/>
|
||||
<field name="V" start="8" end="8"/>
|
||||
<field name="C" start="9" end="9"/>
|
||||
<field name="N" start="10" end="10"/>
|
||||
<field name="Z" start="11" end="11"/>
|
||||
<field name="L" start="12" end="12"/>
|
||||
<field name="R" start="13" end="13"/>
|
||||
<field name="SE" start="14" end="14"/>
|
||||
</flags>
|
||||
|
||||
<reg name="pc" bitsize="32" type="code_ptr"/>
|
||||
<reg name="status32" bitsize="32" type="status32_type"/>
|
||||
</feature>
|
||||
</target>
|
79
gdb/features/arc-v2.c
Normal file
79
gdb/features/arc-v2.c
Normal file
@ -0,0 +1,79 @@
|
||||
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
|
||||
Original: arc-v2.xml */
|
||||
|
||||
#include "defs.h"
|
||||
#include "osabi.h"
|
||||
#include "target-descriptions.h"
|
||||
|
||||
struct target_desc *tdesc_arc_v2;
|
||||
static void
|
||||
initialize_tdesc_arc_v2 (void)
|
||||
{
|
||||
struct target_desc *result = allocate_target_description ();
|
||||
struct tdesc_feature *feature;
|
||||
struct tdesc_type *field_type;
|
||||
struct tdesc_type *type;
|
||||
|
||||
set_tdesc_architecture (result, bfd_scan_arch ("ARCv2"));
|
||||
|
||||
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.core.v2");
|
||||
tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int");
|
||||
tdesc_create_reg (feature, "gp", 26, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "fp", 27, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "sp", 28, 1, NULL, 32, "data_ptr");
|
||||
tdesc_create_reg (feature, "ilink", 29, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "r30", 30, 1, "", 32, "int");
|
||||
tdesc_create_reg (feature, "blink", 31, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "lp_count", 32, 1, NULL, 32, "uint32");
|
||||
tdesc_create_reg (feature, "pcl", 33, 1, "", 32, "code_ptr");
|
||||
|
||||
feature = tdesc_create_feature (result, "org.gnu.gdb.arc.aux-minimal");
|
||||
type = tdesc_create_flags (feature, "status32_type", 4);
|
||||
tdesc_add_bitfield (type, "H", 0, 0);
|
||||
tdesc_add_bitfield (type, "E", 1, 4);
|
||||
tdesc_add_bitfield (type, "AE", 5, 5);
|
||||
tdesc_add_bitfield (type, "DE", 6, 6);
|
||||
tdesc_add_bitfield (type, "U", 7, 7);
|
||||
tdesc_add_bitfield (type, "V", 8, 8);
|
||||
tdesc_add_bitfield (type, "C", 9, 9);
|
||||
tdesc_add_bitfield (type, "N", 10, 10);
|
||||
tdesc_add_bitfield (type, "Z", 11, 11);
|
||||
tdesc_add_bitfield (type, "L", 12, 12);
|
||||
tdesc_add_bitfield (type, "DZ", 13, 13);
|
||||
tdesc_add_bitfield (type, "SC", 14, 14);
|
||||
tdesc_add_bitfield (type, "ES", 15, 15);
|
||||
tdesc_add_bitfield (type, "RB", 16, 18);
|
||||
tdesc_add_bitfield (type, "AD", 19, 19);
|
||||
tdesc_add_bitfield (type, "US", 20, 20);
|
||||
tdesc_add_bitfield (type, "IE", 31, 31);
|
||||
|
||||
tdesc_create_reg (feature, "pc", 34, 1, NULL, 32, "code_ptr");
|
||||
tdesc_create_reg (feature, "status32", 35, 1, NULL, 32, "status32_type");
|
||||
|
||||
tdesc_arc_v2 = result;
|
||||
}
|
92
gdb/features/arc-v2.xml
Normal file
92
gdb/features/arc-v2.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- Copyright (C) 2015-2016 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. -->
|
||||
|
||||
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
||||
<target>
|
||||
<architecture>arc:ARCv2</architecture>
|
||||
<!-- No OSABI for bare metal. -->
|
||||
<!-- No compatibility for ARC. -->
|
||||
|
||||
<feature name="org.gnu.gdb.arc.core.v2">
|
||||
<reg name="r0" bitsize="32"/>
|
||||
<reg name="r1" bitsize="32"/>
|
||||
<reg name="r2" bitsize="32"/>
|
||||
<reg name="r3" bitsize="32"/>
|
||||
<reg name="r4" bitsize="32"/>
|
||||
<reg name="r5" bitsize="32"/>
|
||||
<reg name="r6" bitsize="32"/>
|
||||
<reg name="r7" bitsize="32"/>
|
||||
<reg name="r8" bitsize="32"/>
|
||||
<reg name="r9" bitsize="32"/>
|
||||
<reg name="r10" bitsize="32"/>
|
||||
<reg name="r11" bitsize="32"/>
|
||||
<reg name="r12" bitsize="32"/>
|
||||
<reg name="r13" bitsize="32"/>
|
||||
<reg name="r14" bitsize="32"/>
|
||||
<reg name="r15" bitsize="32"/>
|
||||
<reg name="r16" bitsize="32"/>
|
||||
<reg name="r17" bitsize="32"/>
|
||||
<reg name="r18" bitsize="32"/>
|
||||
<reg name="r19" bitsize="32"/>
|
||||
<reg name="r20" bitsize="32"/>
|
||||
<reg name="r21" bitsize="32"/>
|
||||
<reg name="r22" bitsize="32"/>
|
||||
<reg name="r23" bitsize="32"/>
|
||||
<reg name="r24" bitsize="32"/>
|
||||
<reg name="r25" bitsize="32"/>
|
||||
|
||||
<!-- ARC core data pointer registers. -->
|
||||
<reg name="gp" bitsize="32" type="data_ptr"/>
|
||||
<reg name="fp" bitsize="32" type="data_ptr"/>
|
||||
<reg name="sp" bitsize="32" type="data_ptr"/>
|
||||
|
||||
<!-- Code pointers. R30 is general purpose, but it used to be ILINK2 in
|
||||
ARCompact, thus its odd position in between of special purpose registers.
|
||||
GCC does't use this register, so it isn't a member of a general group. -->
|
||||
<reg name="ilink" bitsize="32" type="code_ptr"/>
|
||||
<reg name="r30" bitsize="32" group=""/>
|
||||
<reg name="blink" bitsize="32" type="code_ptr"/>
|
||||
|
||||
<!-- Here goes extension core registers: r32 - r57. -->
|
||||
<!-- Here goes ACCL/ACCH registers, r58, r59. -->
|
||||
|
||||
<!-- Loop counter. -->
|
||||
<reg name="lp_count" bitsize="32" type="uint32"/>
|
||||
|
||||
<!-- r61 is a reserved register address. -->
|
||||
|
||||
<!-- r62 is a long immediate value, not a real register. -->
|
||||
|
||||
<!-- 4-byte aligned read-only program counter. -->
|
||||
<reg name="pcl" bitsize="32" type="code_ptr" group=""/>
|
||||
</feature>
|
||||
|
||||
<feature name="org.gnu.gdb.arc.aux-minimal">
|
||||
<flags id="status32_type" size="4">
|
||||
<field name="H" start="0" end="0"/>
|
||||
<field name="E" start="1" end="4"/>
|
||||
<field name="AE" start="5" end="5"/>
|
||||
<field name="DE" start="6" end="6"/>
|
||||
<field name="U" start="7" end="7"/>
|
||||
<field name="V" start="8" end="8"/>
|
||||
<field name="C" start="9" end="9"/>
|
||||
<field name="N" start="10" end="10"/>
|
||||
<field name="Z" start="11" end="11"/>
|
||||
<field name="L" start="12" end="12"/>
|
||||
<field name="DZ" start="13" end="13"/>
|
||||
<field name="SC" start="14" end="14"/>
|
||||
<field name="ES" start="15" end="15"/>
|
||||
<field name="RB" start="16" end="18"/>
|
||||
<field name="AD" start="19" end="19"/>
|
||||
<field name="US" start="20" end="20"/>
|
||||
<field name="IE" start="31" end="31"/>
|
||||
</flags>
|
||||
|
||||
<reg name="pc" bitsize="32" type="code_ptr"/>
|
||||
<reg name="status32" bitsize="32" type="status32_type"/>
|
||||
</feature>
|
||||
</target>
|
@ -1,3 +1,7 @@
|
||||
2016-09-21 Anton Kolesov <anton.kolesov@synopsys.com>
|
||||
|
||||
* gdb.xml/tdesc-regs.exp: set core-regs for arc*-*-elf32.
|
||||
|
||||
2016-09-21 Tom Tromey <tom@tromey.com>
|
||||
|
||||
PR gdb/20604:
|
||||
|
@ -30,6 +30,10 @@ switch -glob -- [istarget] {
|
||||
"aarch64*-*-*" {
|
||||
set core-regs {aarch64-core.xml}
|
||||
}
|
||||
"arc*-*-*" {
|
||||
set architecture "arc:ARCv2"
|
||||
set core-regs {arc-v2.xml}
|
||||
}
|
||||
"arm*-*-*" {
|
||||
set core-regs {arm-core.xml}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user