diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-06-20 08:38:18 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-07-10 14:20:49 +0100 |
commit | 89abbcc26d891425678b8b463bc1fa81273fb54c (patch) | |
tree | 129fb2faf4d44ec2315992cdbb42fba107176107 | |
parent | b863685d70199489b3fe27abedfb1eb6d1452b7d (diff) | |
download | gdb-89abbcc26d891425678b8b463bc1fa81273fb54c.zip gdb-89abbcc26d891425678b8b463bc1fa81273fb54c.tar.gz gdb-89abbcc26d891425678b8b463bc1fa81273fb54c.tar.bz2 |
Arm: Create feature files for Arm target descriptions
Add Arm to the list of feature target description targets and generate the
relevant C files.
Add arm-m-profile-with-fpa.xml as the feature version of the exisiting
arm-with-m-fpa-layout.xml.
Add extra comments to the Makefile for readability.
New files are not yet used.
gdb/ChangeLog:
* features/Makefile: Use feature target descriptions for Arm.
* features/arm/arm-core.c: Generate new file.
* features/arm/arm-fpa.c: Likewise.
* features/arm/arm-m-profile-with-fpa.xml: Likewise.
* features/arm/arm-m-profile.c: Likewise.
* features/arm/arm-vfpv2.c: Likewise.
* features/arm/arm-vfpv3.c: Likewise.
* features/arm/xscale-iwmmxt.c: Likewise.
* target-descriptions.c (maint_print_c_tdesc_cmd): Add Arm.
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/features/Makefile | 30 | ||||
-rw-r--r-- | gdb/features/arm/arm-core.c | 31 | ||||
-rw-r--r-- | gdb/features/arm/arm-fpa.c | 23 | ||||
-rw-r--r-- | gdb/features/arm/arm-m-profile-with-fpa.c | 39 | ||||
-rw-r--r-- | gdb/features/arm/arm-m-profile-with-fpa.xml | 39 | ||||
-rw-r--r-- | gdb/features/arm/arm-m-profile.c | 31 | ||||
-rw-r--r-- | gdb/features/arm/arm-vfpv2.c | 30 | ||||
-rw-r--r-- | gdb/features/arm/arm-vfpv3.c | 46 | ||||
-rw-r--r-- | gdb/features/arm/xscale-iwmmxt.c | 57 | ||||
-rw-r--r-- | gdb/target-descriptions.c | 3 |
11 files changed, 326 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6686a14..0c2dca7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2019-07-10 Alan Hayward <alan.hayward@arm.com> + * features/Makefile: Use feature target descriptions for Arm. + * features/arm/arm-core.c: Generate new file. + * features/arm/arm-fpa.c: Likewise. + * features/arm/arm-m-profile-with-fpa.xml: Likewise. + * features/arm/arm-m-profile.c: Likewise. + * features/arm/arm-vfpv2.c: Likewise. + * features/arm/arm-vfpv3.c: Likewise. + * features/arm/xscale-iwmmxt.c: Likewise. + * target-descriptions.c (maint_print_c_tdesc_cmd): Add Arm. + +2019-07-10 Alan Hayward <alan.hayward@arm.com> + * arm-linux-nat.c (arm_linux_nat_target::read_description): Check ptrace earlier. diff --git a/gdb/features/Makefile b/gdb/features/Makefile index 3b57124..0c84faf 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -38,11 +38,12 @@ # # make GDB=/path/to/gdb clean-cfiles cfiles # -# To generate specific C files, you can override the XMLTOC make -# variable: +# To generate specific C files, you can override the XMLTOC and +# FEATURE_XMLFILES make variables: # -# make GDB=/path/to/gdb XMLTOC="xml files" cfiles +# make GDB=/path/to/gdb XMLTOC="xml files" FEATURE_XMLFILES="xml files" cfiles +# List of .dat files to create in ../regformats/ WHICH = arm/arm-with-iwmmxt arm/arm-with-vfpv2 arm/arm-with-vfpv3 \ arm/arm-with-neon \ mips-linux mips-dsp-linux \ @@ -103,20 +104,14 @@ XSLTPROC = xsltproc outdir = ../regformats OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH)) -# The set of xml files we'll generate .c files for GDB from. By +# For targets without feature based target descriptions, +# the set of xml files we'll generate .c files for GDB from. By # default we'll build all .c files, which requires an # --enable-targets=all GDB. You can override this by passing XMLTOC # to make on the command line. XMLTOC = \ arc-v2.xml \ arc-arcompact.xml \ - arm/arm-with-iwmmxt.xml \ - arm/arm-with-m-fpa-layout.xml \ - arm/arm-with-m-vfp-d16.xml \ - arm/arm-with-m.xml \ - arm/arm-with-neon.xml \ - arm/arm-with-vfpv2.xml \ - arm/arm-with-vfpv3.xml \ microblaze-with-stack-protect.xml \ microblaze.xml \ mips-dsp-linux.xml \ @@ -189,6 +184,7 @@ GDB = false #Targets which use feature based target descriptions. aarch64-feature = 1 +arm-feature = 1 i386-feature = 1 riscv-feature = 1 tic6x-feature = 1 @@ -208,9 +204,18 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl $(XSLTPROC) gdbserver-regs.xsl - >> $(outdir)/$*.tmp sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat +# For targets with feature based target descriptions, +# the set of xml files we'll generate .c files for GDB from. FEATURE_XMLFILES = aarch64-core.xml \ aarch64-fpu.xml \ aarch64-pauth.xml \ + arm/arm-core.xml \ + arm/arm-fpa.xml \ + arm/arm-m-profile.xml \ + arm/arm-m-profile-with-fpa.xml \ + arm/arm-vfpv2.xml \ + arm/arm-vfpv3.xml \ + arm/xscale-iwmmxt.xml \ i386/32bit-core.xml \ i386/32bit-sse.xml \ i386/32bit-linux.xml \ @@ -263,9 +268,6 @@ $(FEATURE_CFILES): %.c: %.xml.tmp echo "</target>" >> $@.tmp sh ../../move-if-change $@.tmp $@ -# Other dependencies. -$(outdir)/arm/arm-with-iwmmxt.dat: arm/arm-core.xml arm/xscale-iwmmxt.xml - # Regenerate RISC-V CSR feature lists. riscv/32bit-csr.xml riscv/64bit-csr.xml: ../../include/opcode/riscv-opc.h ./riscv/rebuild-csr-xml.sh ../../include/opcode/riscv-opc.h ./riscv diff --git a/gdb/features/arm/arm-core.c b/gdb/features/arm/arm-core.c new file mode 100644 index 0000000..e401411 --- /dev/null +++ b/gdb/features/arm/arm-core.c @@ -0,0 +1,31 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-core.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_core (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.core"); + tdesc_create_reg (feature, "r0", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r1", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r2", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r3", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r4", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r5", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r6", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r7", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r8", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r9", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r10", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r11", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "r12", regnum++, 1, NULL, 32, "uint32"); + tdesc_create_reg (feature, "sp", regnum++, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "lr", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "pc", regnum++, 1, NULL, 32, "code_ptr"); + regnum = 25; + tdesc_create_reg (feature, "cpsr", regnum++, 1, NULL, 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/arm-fpa.c b/gdb/features/arm/arm-fpa.c new file mode 100644 index 0000000..65a49f5 --- /dev/null +++ b/gdb/features/arm/arm-fpa.c @@ -0,0 +1,23 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-fpa.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_fpa (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.fpa"); + regnum = 16; + tdesc_create_reg (feature, "f0", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f1", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f2", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f3", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f4", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f5", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f6", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "f7", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "fps", regnum++, 1, NULL, 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/arm-m-profile-with-fpa.c b/gdb/features/arm/arm-m-profile-with-fpa.c new file mode 100644 index 0000000..2b7c785 --- /dev/null +++ b/gdb/features/arm/arm-m-profile-with-fpa.c @@ -0,0 +1,39 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-m-profile-with-fpa.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_m_profile_with_fpa (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile"); + tdesc_create_reg (feature, "r0", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r1", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r2", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r3", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r4", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r5", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r6", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r7", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r8", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r9", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r10", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r11", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r12", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "sp", regnum++, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "lr", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "pc", regnum++, 1, NULL, 32, "code_ptr"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "xpsr", regnum++, 1, NULL, 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/arm-m-profile-with-fpa.xml b/gdb/features/arm/arm-m-profile-with-fpa.xml new file mode 100644 index 0000000..91e183c --- /dev/null +++ b/gdb/features/arm/arm-m-profile-with-fpa.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2019 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 feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.arm.m-profile"> + <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="sp" bitsize="32" type="data_ptr"/> + <reg name="lr" bitsize="32"/> + <reg name="pc" bitsize="32" type="code_ptr"/> + + <!-- Slack for unused FPA registers (f0-f7 + fps). --> + <reg name="" bitsize="96" type="arm_fpa_ext" regnum="16"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="96" type="arm_fpa_ext"/> + <reg name="" bitsize="32"/> + + <reg name="xpsr" bitsize="32" regnum="25"/> +</feature> diff --git a/gdb/features/arm/arm-m-profile.c b/gdb/features/arm/arm-m-profile.c new file mode 100644 index 0000000..027f3c1 --- /dev/null +++ b/gdb/features/arm/arm-m-profile.c @@ -0,0 +1,31 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-m-profile.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_m_profile (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile"); + tdesc_create_reg (feature, "r0", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r1", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r2", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r3", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r4", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r5", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r6", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r7", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r8", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r9", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r10", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r11", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r12", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "sp", regnum++, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "lr", regnum++, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "pc", regnum++, 1, NULL, 32, "code_ptr"); + regnum = 25; + tdesc_create_reg (feature, "xpsr", regnum++, 1, NULL, 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/arm-vfpv2.c b/gdb/features/arm/arm-vfpv2.c new file mode 100644 index 0000000..d6f8e79 --- /dev/null +++ b/gdb/features/arm/arm-vfpv2.c @@ -0,0 +1,30 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-vfpv2.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_vfpv2 (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp"); + tdesc_create_reg (feature, "d0", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d1", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d2", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d3", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d4", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d5", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d6", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d7", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d8", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d9", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d10", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d11", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d12", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d13", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d14", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d15", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "fpscr", regnum++, 1, "float", 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/arm-vfpv3.c b/gdb/features/arm/arm-vfpv3.c new file mode 100644 index 0000000..b5ef4ba --- /dev/null +++ b/gdb/features/arm/arm-vfpv3.c @@ -0,0 +1,46 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-vfpv3.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_vfpv3 (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.vfp"); + tdesc_create_reg (feature, "d0", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d1", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d2", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d3", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d4", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d5", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d6", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d7", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d8", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d9", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d10", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d11", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d12", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d13", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d14", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d15", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d16", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d17", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d18", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d19", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d20", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d21", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d22", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d23", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d24", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d25", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d26", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d27", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d28", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d29", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d30", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "d31", regnum++, 1, NULL, 64, "ieee_double"); + tdesc_create_reg (feature, "fpscr", regnum++, 1, "float", 32, "int"); + return regnum; +} diff --git a/gdb/features/arm/xscale-iwmmxt.c b/gdb/features/arm/xscale-iwmmxt.c new file mode 100644 index 0000000..797fb91 --- /dev/null +++ b/gdb/features/arm/xscale-iwmmxt.c @@ -0,0 +1,57 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: xscale-iwmmxt.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_xscale_iwmmxt (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.xscale.iwmmxt"); + tdesc_type *element_type; + element_type = tdesc_named_type (feature, "uint8"); + tdesc_create_vector (feature, "iwmmxt_v8u8", element_type, 8); + + element_type = tdesc_named_type (feature, "uint16"); + tdesc_create_vector (feature, "iwmmxt_v4u16", element_type, 4); + + element_type = tdesc_named_type (feature, "uint32"); + tdesc_create_vector (feature, "iwmmxt_v2u32", element_type, 2); + + tdesc_type_with_fields *type_with_fields; + type_with_fields = tdesc_create_union (feature, "iwmmxt_vec64i"); + tdesc_type *field_type; + field_type = tdesc_named_type (feature, "iwmmxt_v8u8"); + tdesc_add_field (type_with_fields, "u8", field_type); + field_type = tdesc_named_type (feature, "iwmmxt_v4u16"); + tdesc_add_field (type_with_fields, "u16", field_type); + field_type = tdesc_named_type (feature, "iwmmxt_v2u32"); + tdesc_add_field (type_with_fields, "u32", field_type); + field_type = tdesc_named_type (feature, "uint64"); + tdesc_add_field (type_with_fields, "u64", field_type); + + tdesc_create_reg (feature, "wR0", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR1", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR2", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR3", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR4", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR5", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR6", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR7", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR8", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR9", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR10", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR11", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR12", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR13", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR14", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wR15", regnum++, 1, NULL, 64, "iwmmxt_vec64i"); + tdesc_create_reg (feature, "wCSSF", regnum++, 1, "vector", 32, "int"); + tdesc_create_reg (feature, "wCASF", regnum++, 1, "vector", 32, "int"); + tdesc_create_reg (feature, "wCGR0", regnum++, 1, "vector", 32, "int"); + tdesc_create_reg (feature, "wCGR1", regnum++, 1, "vector", 32, "int"); + tdesc_create_reg (feature, "wCGR2", regnum++, 1, "vector", 32, "int"); + tdesc_create_reg (feature, "wCGR3", regnum++, 1, "vector", 32, "int"); + return regnum; +} diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index f422f2c..322ed50 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -1715,7 +1715,8 @@ maint_print_c_tdesc_cmd (const char *args, int from_tty) || startswith (filename_after_features.c_str (), "i386/x32-core.xml") || startswith (filename_after_features.c_str (), "riscv/") || startswith (filename_after_features.c_str (), "tic6x-") - || startswith (filename_after_features.c_str (), "aarch64")) + || startswith (filename_after_features.c_str (), "aarch64") + || startswith (filename_after_features.c_str (), "arm/")) { print_c_feature v (filename_after_features); |