From: Alan Hayward Date: Wed, 18 Apr 2018 19:06:14 +0000 (+0100) Subject: Add feature reference in .dat files X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad7fc756d12a841d4b8dd707568426d875e26755;p=binutils-gdb.git Add feature reference in .dat files For all targets which use the newer style target descriptions, add a "feature" marker in the dat files. Update regdat.sh to parse feature, but do not use it (yet). gdb/ * features/Makefile: Add feature marker to targets with new style target descriptions. * regformats/aarch64.dat: Regenerate. * regformats/i386/amd64-avx-avx512-linux.dat: Likewise. * regformats/i386/amd64-avx-linux.dat: Likewise. * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise. * regformats/i386/amd64-avx-mpx-linux.dat: Likewise. * regformats/i386/amd64-linux.dat: Likewise. * regformats/i386/amd64-mpx-linux.dat: Likewise. * regformats/i386/amd64.dat: Likewise. * regformats/i386/i386-avx-avx512-linux.dat: Likewise. * regformats/i386/i386-avx-linux.dat: Likewise. * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise. * regformats/i386/i386-avx-mpx-linux.dat: Likewise. * regformats/i386/i386-linux.dat: Likewise. * regformats/i386/i386-mmx-linux.dat: Likewise. * regformats/i386/i386-mpx-linux.dat: Likewise. * regformats/i386/i386.dat: Likewise. * regformats/i386/x32-avx-avx512-linux.dat: Likewise. * regformats/i386/x32-avx-linux.dat: Likewise. * regformats/i386/x32-linux.dat: Likewise. * regformats/tic6x-c62x-linux.dat: Likewise. * regformats/tic6x-c64x-linux.dat: Likewise. * regformats/tic6x-c64xp-linux.dat: Likewise. * regformats/regdat.sh: Parse feature marker. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 624de26390a..23a5b0d4dbe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,31 @@ +2018-04-18 Alan Hayward + + * features/Makefile: Add feature marker to targets with new style + target descriptions. + * regformats/aarch64.dat: Regenerate. + * regformats/i386/amd64-avx-avx512-linux.dat: Likewise. + * regformats/i386/amd64-avx-linux.dat: Likewise. + * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise. + * regformats/i386/amd64-avx-mpx-linux.dat: Likewise. + * regformats/i386/amd64-linux.dat: Likewise. + * regformats/i386/amd64-mpx-linux.dat: Likewise. + * regformats/i386/amd64.dat: Likewise. + * regformats/i386/i386-avx-avx512-linux.dat: Likewise. + * regformats/i386/i386-avx-linux.dat: Likewise. + * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise. + * regformats/i386/i386-avx-mpx-linux.dat: Likewise. + * regformats/i386/i386-linux.dat: Likewise. + * regformats/i386/i386-mmx-linux.dat: Likewise. + * regformats/i386/i386-mpx-linux.dat: Likewise. + * regformats/i386/i386.dat: Likewise. + * regformats/i386/x32-avx-avx512-linux.dat: Likewise. + * regformats/i386/x32-avx-linux.dat: Likewise. + * regformats/i386/x32-linux.dat: Likewise. + * regformats/tic6x-c62x-linux.dat: Likewise. + * regformats/tic6x-c64x-linux.dat: Likewise. + * regformats/tic6x-c64xp-linux.dat: Likewise. + * regformats/regdat.sh: Parse feature marker. + 2018-04-18 Alan Hayward * common/tdesc.h (tdesc_architecture_name): Add new declaration. diff --git a/gdb/features/Makefile b/gdb/features/Makefile index 82609f5862f..168c46e0038 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -193,12 +193,18 @@ XMLTOC = \ TDESC_CFILES = $(patsubst %.xml,%.c,$(XMLTOC)) GDB = false +#Targets which use feature based target descriptions. +aarch64-feature = 1 +i386-feature = 1 +tic6x-feature = 1 + all: $(OUTPUTS) $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl echo "# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:" > $(outdir)/$*.tmp echo "# Generated from: $<" >> $(outdir)/$*.tmp echo "name:`echo $(notdir $*) | sed 's/-/_/g'`" >> $(outdir)/$*.tmp + $(if $($(firstword $(subst /, ,$(subst -, ,$*)))-feature), echo "feature:1") >> $(outdir)/$*.tmp echo "xmltarget:$(> $(outdir)/$*.tmp echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \ >> $(outdir)/$*.tmp diff --git a/gdb/regformats/aarch64.dat b/gdb/regformats/aarch64.dat index d4cea04358e..75ba89a92e6 100644 --- a/gdb/regformats/aarch64.dat +++ b/gdb/regformats/aarch64.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: aarch64.xml name:aarch64 +feature:1 xmltarget:aarch64.xml expedite:x29,sp,pc 64:x0 diff --git a/gdb/regformats/i386/amd64-avx-avx512-linux.dat b/gdb/regformats/i386/amd64-avx-avx512-linux.dat index 0743693886b..6cb97964b30 100644 --- a/gdb/regformats/i386/amd64-avx-avx512-linux.dat +++ b/gdb/regformats/i386/amd64-avx-avx512-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-avx-avx512-linux.xml name:amd64_avx_avx512_linux +feature:1 xmltarget:amd64-avx-avx512-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64-avx-linux.dat b/gdb/regformats/i386/amd64-avx-linux.dat index 7780b3b6a21..54dad1d0a75 100644 --- a/gdb/regformats/i386/amd64-avx-linux.dat +++ b/gdb/regformats/i386/amd64-avx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-avx-linux.xml name:amd64_avx_linux +feature:1 xmltarget:amd64-avx-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat index 9cd0fae8202..8f326389f1c 100644 --- a/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat +++ b/gdb/regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-avx-mpx-avx512-pku-linux.xml name:amd64_avx_mpx_avx512_pku_linux +feature:1 xmltarget:amd64-avx-mpx-avx512-pku-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64-avx-mpx-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-linux.dat index 7c2f928070f..92ffa0694fe 100644 --- a/gdb/regformats/i386/amd64-avx-mpx-linux.dat +++ b/gdb/regformats/i386/amd64-avx-mpx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-avx-mpx-linux.xml name:amd64_avx_mpx_linux +feature:1 xmltarget:amd64-avx-mpx-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64-linux.dat b/gdb/regformats/i386/amd64-linux.dat index cd16a154428..81e6aef361a 100644 --- a/gdb/regformats/i386/amd64-linux.dat +++ b/gdb/regformats/i386/amd64-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-linux.xml name:amd64_linux +feature:1 xmltarget:amd64-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64-mpx-linux.dat b/gdb/regformats/i386/amd64-mpx-linux.dat index 10487f69870..c90b1b5b8ac 100644 --- a/gdb/regformats/i386/amd64-mpx-linux.dat +++ b/gdb/regformats/i386/amd64-mpx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64-mpx-linux.xml name:amd64_mpx_linux +feature:1 xmltarget:amd64-mpx-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/amd64.dat b/gdb/regformats/i386/amd64.dat index 66f26ad0947..fde8c1dbe2d 100644 --- a/gdb/regformats/i386/amd64.dat +++ b/gdb/regformats/i386/amd64.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/amd64.xml name:amd64 +feature:1 xmltarget:amd64.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/i386-avx-avx512-linux.dat b/gdb/regformats/i386/i386-avx-avx512-linux.dat index 44771339972..57530978df6 100644 --- a/gdb/regformats/i386/i386-avx-avx512-linux.dat +++ b/gdb/regformats/i386/i386-avx-avx512-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-avx-avx512-linux.xml name:i386_avx_avx512_linux +feature:1 xmltarget:i386-avx-avx512-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-avx-linux.dat b/gdb/regformats/i386/i386-avx-linux.dat index 1c3fcfd7633..6a813027667 100644 --- a/gdb/regformats/i386/i386-avx-linux.dat +++ b/gdb/regformats/i386/i386-avx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-avx-linux.xml name:i386_avx_linux +feature:1 xmltarget:i386-avx-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat b/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat index 515ee10525b..ef6216be92f 100644 --- a/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat +++ b/gdb/regformats/i386/i386-avx-mpx-avx512-pku-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-avx-mpx-avx512-pku-linux.xml name:i386_avx_mpx_avx512_pku_linux +feature:1 xmltarget:i386-avx-mpx-avx512-pku-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-avx-mpx-linux.dat b/gdb/regformats/i386/i386-avx-mpx-linux.dat index 831c476fef4..f15bd1a89d6 100644 --- a/gdb/regformats/i386/i386-avx-mpx-linux.dat +++ b/gdb/regformats/i386/i386-avx-mpx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-avx-mpx-linux.xml name:i386_avx_mpx_linux +feature:1 xmltarget:i386-avx-mpx-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-linux.dat b/gdb/regformats/i386/i386-linux.dat index 0e414e64902..5203cd4ef0c 100644 --- a/gdb/regformats/i386/i386-linux.dat +++ b/gdb/regformats/i386/i386-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-linux.xml name:i386_linux +feature:1 xmltarget:i386-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-mmx-linux.dat b/gdb/regformats/i386/i386-mmx-linux.dat index aa2a564ac74..736874273e8 100644 --- a/gdb/regformats/i386/i386-mmx-linux.dat +++ b/gdb/regformats/i386/i386-mmx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-mmx-linux.xml name:i386_mmx_linux +feature:1 xmltarget:i386-mmx-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386-mpx-linux.dat b/gdb/regformats/i386/i386-mpx-linux.dat index 1dcdce98cf5..856ef4b1c9f 100644 --- a/gdb/regformats/i386/i386-mpx-linux.dat +++ b/gdb/regformats/i386/i386-mpx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386-mpx-linux.xml name:i386_mpx_linux +feature:1 xmltarget:i386-mpx-linux.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/i386.dat b/gdb/regformats/i386/i386.dat index 13abb485e49..e707ed27902 100644 --- a/gdb/regformats/i386/i386.dat +++ b/gdb/regformats/i386/i386.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/i386.xml name:i386 +feature:1 xmltarget:i386.xml expedite:ebp,esp,eip 32:eax diff --git a/gdb/regformats/i386/x32-avx-avx512-linux.dat b/gdb/regformats/i386/x32-avx-avx512-linux.dat index 00786172fb9..a9bd1d4bb35 100644 --- a/gdb/regformats/i386/x32-avx-avx512-linux.dat +++ b/gdb/regformats/i386/x32-avx-avx512-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/x32-avx-avx512-linux.xml name:x32_avx_avx512_linux +feature:1 xmltarget:x32-avx-avx512-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/x32-avx-linux.dat b/gdb/regformats/i386/x32-avx-linux.dat index eb0e395366e..9c43fa48f51 100644 --- a/gdb/regformats/i386/x32-avx-linux.dat +++ b/gdb/regformats/i386/x32-avx-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/x32-avx-linux.xml name:x32_avx_linux +feature:1 xmltarget:x32-avx-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/i386/x32-linux.dat b/gdb/regformats/i386/x32-linux.dat index eee378fd846..fda1a89de06 100644 --- a/gdb/regformats/i386/x32-linux.dat +++ b/gdb/regformats/i386/x32-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: i386/x32-linux.xml name:x32_linux +feature:1 xmltarget:x32-linux.xml expedite:rbp,rsp,rip 64:rax diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh index 8c6e1915963..18108d77ebb 100755 --- a/gdb/regformats/regdat.sh +++ b/gdb/regformats/regdat.sh @@ -118,6 +118,7 @@ xmltarget=x xmlarch=x xmlosabi=x expedite=x +feature=x exec < $1 while do_read do @@ -145,6 +146,9 @@ do elif test "${type}" = "expedite"; then expedite="${entry}" continue + elif test "${type}" = "feature"; then + feature="${entry}" + continue elif test "${name}" = x; then echo "$0: $1 does not specify \`\`name''." 1>&2 exit 1 diff --git a/gdb/regformats/tic6x-c62x-linux.dat b/gdb/regformats/tic6x-c62x-linux.dat index 82f2a0a0bf0..98ca39e1103 100644 --- a/gdb/regformats/tic6x-c62x-linux.dat +++ b/gdb/regformats/tic6x-c62x-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: tic6x-c62x-linux.xml name:tic6x_c62x_linux +feature:1 xmltarget:tic6x-c62x-linux.xml expedite:A15,PC 32:A0 diff --git a/gdb/regformats/tic6x-c64x-linux.dat b/gdb/regformats/tic6x-c64x-linux.dat index 542826ad1d3..91e84baebc1 100644 --- a/gdb/regformats/tic6x-c64x-linux.dat +++ b/gdb/regformats/tic6x-c64x-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: tic6x-c64x-linux.xml name:tic6x_c64x_linux +feature:1 xmltarget:tic6x-c64x-linux.xml expedite:A15,PC 32:A0 diff --git a/gdb/regformats/tic6x-c64xp-linux.dat b/gdb/regformats/tic6x-c64xp-linux.dat index 229b3c26c25..a3fa3b7cd40 100644 --- a/gdb/regformats/tic6x-c64xp-linux.dat +++ b/gdb/regformats/tic6x-c64xp-linux.dat @@ -1,6 +1,7 @@ # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: # Generated from: tic6x-c64xp-linux.xml name:tic6x_c64xp_linux +feature:1 xmltarget:tic6x-c64xp-linux.xml expedite:A15,PC 32:A0