Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
I noticed that regformats/i386/i386-avx.dat did not get re-generated
when doing "make" in the features directory. I think it's a leftover
from commit
f5a29eb0a663 ("Clean up x86 non-linux GDBserver target descriptions")
I build-tested gdbserver with amd64 and i386.
gdb/ChangeLog:
* regformats/i386/i386-avx.dat: Remove.
|
|
In GDBserver, only tdesc_i386 and tdesc_amd64 are used. There is no point
of generating these *.dat files (which are used to generate *.c files during
GDBserver build.).
gdb:
2017-08-09 Yao Qi <yao.qi@linaro.org>
* features/Makefile (WHICH): Remove i386/ non-linux stuff.
* regformats/i386/amd64-avx-avx512.dat: Remove.
* regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
* regformats/i386/amd64-avx-mpx.dat:Remove.
* regformats/i386/amd64-avx.dat: Remove.
* regformats/i386/amd64-mpx.dat: Remove.
* regformats/i386/i386-avx-avx512.dat: Remove.
* regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
* regformats/i386/i386-avx-mpx.dat: Remove.
* regformats/i386/i386-mmx.dat: Remove.
* regformats/i386/i386-mpx.dat: Remove.
gdb/gdbserver:
2017-08-09 Yao Qi <yao.qi@linaro.org>
* configure.srv (srv_i386_regobj): Remove i386-avx.o,
i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
i386-avx-mpx.o and i386-mmx.o.
(srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
(srv_i386_xmlfiles): Remove i386/i386-avx.xml,
i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
(srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
i386/amd64-avx-mpx.xml.
|
|
x32 non-linux target descriptions are not used in GDB or GDBserver. This
patch removes them.
gdb:
2017-08-09 Yao Qi <yao.qi@linaro.org>
* amd64-tdep.h (tdesc_x32): Remove the declaration.
* amd64-tdep.c: Don't include features/i386/x32*.c.
(_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
functions.
* features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
and i386/x32-avx-avx512.
(XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
and i386/x32.xml.
* features/i386/x32-avx-avx512.c: Removed.
* features/i386/x32-avx-avx512.xml: Removed.
* features/i386/x32-avx.c: Removed.
* features/i386/x32-avx.xml: Removed.
* features/i386/x32.c: Removed.
* features/i386/x32.xml: Removed.
* regformats/i386/x32-avx-avx512.dat: Removed.
* regformats/i386/x32-avx.dat: Removed.
* regformats/i386/x32.dat: Removed.
gdb/gdbserver:
2017-08-09 Yao Qi <yao.qi@linaro.org>
* configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
and x32-avx-avx512.o.
(srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
i386/x32-avx-avx512.xml.
|
|
This permits these registers to be used with non-Linux targets.
gdb/ChangeLog:
* features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
(amd64-avx-mpx.dat, amd64-avx-avx512.dat)
(amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
those rules.
* features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx.xml: Add 64bit-segments.xml.
* features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
* features/i386/amd64.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx-avx512.c: Regenerated.
* features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
* features/i386/amd64-avx-mpx.c: Regenerated.
* features/i386/amd64-avx.c: Regenerated.
* features/i386/amd64-mpx.c: Regenerated.
* features/i386/amd64.c: Regenerated.
* regformats/i386/amd64-avx-avx512.dat: Regenerated.
* regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
* regformats/i386/amd64-avx-mpx.dat: Regenerated.
* regformats/i386/amd64-avx.dat: Regenerated.
* regformats/i386/amd64-mpx.dat: Regenerated.
* regformats/i386/amd64.dat: Regenerated.
|
|
The self tests which compare pre-generated target descriptions and
dynamically created target descriptions fail, and it turns out that two
pre-generated target descriptions are wrong, so regenerate them.
gdb:
2017-06-22 Yao Qi <yao.qi@linaro.org>
* regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
* regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
|
|
This patch adds support for the registers added by the
Memory Protection Keys for Userspace (PKU aka PKEYs) feature.
Native and remote debugging are covered by this patch.
The XSAVE area is extended with a new state containing
the 32-bit wide PKRU register. The new register is added to
amd64-avx-mpx_avx512-* tdesc, thus it is renamed accordingly. Also,
respective xstate mask X86_XSTATE_AVX_MPX_AVX512_MASK is renamed to
X86_XSTATE_AVX_MPX_AVX512_PKU_MASK to reflect the new feature set
it supports.
For more information, please refer to the
Intel(R) 64 and IA-32 Architectures Software Developer's
Manual - Septemper 2015
http://www.intel.com/content/dam/www/public/us/en/documents/
manuals/64-ia-32-architectures-software-developer-manual-325462.pdf
gdb/Changelog:
2015-12-08 Michael Sturm <michael.sturm@intel.com>
* NEWS: Mention addition of PKU feature.
* amd64-linux-nat.c (amd64_linux_gregset32_reg_offset): Add PKRU register.
* amd64-linux-tdep.c (features/i386/amd64-avx-mpx-avx512-linux.c): Rename
to...
(features/i386/amd64-avx-mpx-avx512-pku-linux.c): ...this.
(amd64_linux_gregset_reg_offset): Add PKRU register.
(amd64_linux_core_read_description): Rename
X86_XSTATE_AVX_MPX_AVX512_MASK,
rename tdesc_amd64_avx_mpx_avx512_pku_linux.
(_initialize_amd64_linux_tdep): Rename
initialize_tdesc_amd64_avx_mpx_avx512_linux.
* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM): Adjust regnum
calculation.
(tdesc_amd64_avx_mpx_avx512_linux): Rename to...
(tdesc_amd64_avx_mpx_avx512_pku_linux): ...this.
* amd64-tdep.c (features/i386/amd64-avx-mpx-avx512-pku.c): Rename to...
(features/i386/amd64-avx-mpx-avx512-pku.c): ...this.
(amd64_pkeys_names): New register name for raw register PKRU.
(amd64_init_abi): Add code to initialize PKRU tdep variables if feature
is present.
(amd64_target_description): Rename X86_XSTATE_AVX_MPX_AVX512_MASK,
rename tdesc_amd64_avx_mpx_avx512.
(_initialize_amd64_tdep): Rename initialize_tdesc_amd64_avx_mpx_avx512.
* amd64-tdep.h (enum amd64_regnum): Add PKRU register.
(AMD64_NUM_REGS): Adjust regnum calculation.
* i386-linux.nat.c (GETXSTATEREGS_SUPPLIES): Extend range of
registers supplied via XSTATE by PKRU register.
* common/x86-xstate.h (X86_XSTATE_PKRU): New macro.
(X86_XSTATE_AVX_MPX_AVX512_MASK): Add PKRU and renamed mask.
(X86_XSTATE_ALL_MASK): Rename X86_XSTATE_AVX_MPX_AVX512_MASK.
(X86_XSTATE_PKRU_SIZE): New macro.
(X86_XSTATE_MAX_SIZE): Adjust size.
(HAS_PKRU(XCR0)): New macro.
(X86_XSTATE_SIZE): Add checkfor PKRU.
* features/Makefile (WHICH): Rename i386/i386-avx-mpx-avx512,
i386/i386-avx-mpx-avx512-linux, i386/amd64-avx-mpx-avx512,
i386/amd64-avx-mpx-avx512-linux.
(i386/i386-avx-mpx-avx512-expedite): Rename expedite.
(i386/i386-avx-mpx-avx512-linux-expedite): Likewise.
(i386/amd64-avx-mpx-avx512-expedite): Likewise.
(i386/amd64-avx-mpx-avx512-linux-expedite): Likewise.
(XMLTOC): Rename i386/amd64-avx-mpx-avx512-linux.xml,
i386/amd64-avx-mpx-avx512.xml, i386/i386-avx-mpx-avx512-linux.xml,
i386/i386-avx-mpx-avx512.xml.
((outdir)/i386/i386-avx-mpx-avx512.dat): Rename rule, add
i386/32bit-pkeys.xml.
((outdir)/i386/i386-avx-mpx-avx512-pku-linux.dat): Likewise.
((outdir)/i386/amd64-avx-mpx-avx512.dat): Rename rule, add
i386/64bit-pkeys.xml.
((outdir)/i386/amd64-avx-mpx-avx512-linux.dat): Likewise.
* features/i386/32bit-pkeys.xml: New file.
* features/i386/64bit-pkeys.xml: Likewise.
* features/i386/amd64-avx-mpx-avx512-linux-pku.c: Regenerate from
renamed XML file.
* features/i386/amd64-avx-mpx-avx512-linux.xml: Rename to
amd64-avx-mpx-avx512-pku-linux.xml, add 64bit-pkeys.xml
* features/i386/amd64-avx-mpx-avx512.c: Regenerate from
renamed XML file.
* features/i386/amd64-avx-mpx-avx512.xml: Rename to
amd64-avx-mpx-avx512-pku.xml, add 64bit-pkeys.xml.
* features/i386/i386-avx-mpx-avx512-linux.c: Regenerate from
renamed XML file.
* features/i386/i386-avx-mpx-avx512-linux.xml: Rename to
i386-avx-mpx-avx512-pku-linux.xml, add 32bit-pkeys.xml.
* features/i386/i386-avx-mpx-avx512.c: Regenerate from
renamed XML file.
* features/i386/i386-avx-mpx-avx512.xml: Rename to
i386-avx-mpx-avx512-pku.xml, add 32bit-pkeys.xml.
* i386-linux-nat.c (GETXSTATEREGS_SUPPLIES): Change to use
I386_PKEYS_NUM_REGS.
* i386-linux-tdep.c (features/i386/i386-avx-mpx-avx512-linux.c): Rename
include.
(i386_linux_gregset_reg_offset): Add PKRU register.
(i386_linux_core_read_description): Rename xstate mask and returned
tdesc for X86_XSTATE_AVX_MPX_AVX512_PKU_MASK.
(_initialize_i386_linux_tdep): Rename
initialize_tdesc_i386_avx_mpx_avx512_linux.
* i386-linux-tdep.h (I386_LINUX_ORIG_EAX_REGNUM): Adjuste regnum
calculation.
(tdesc_i386_avx_mpx_avx512_linux): Rename prototype.
(/* Format of XSAVE...): Add pkru register.
* i386-tdep.c (i386-avx-mpx-avx512.c): Rename include.
(i386_pkeys_names): New register name for raw register PKRU.
(i386_pkru_regnum_p): Add function to look up register number of
PKRU raw register.
(i386_register_reggroup_p): Add code to exclude PKRU from general
register group.
(i386_validate_tdesc_p): Add code to handle PKRU feature, add PKRU
registers if feature is present in xcr0.
(i386_gdbarch_init): Adjust number of registers in architecture. Add code
to initialize PKRU feature variables in tdep structure.
(i386_target_description): Rename xstate mask and returned
tdesc for X86_XSTATE_AVX_MPX_AVX512_PKU_MASK.
(_initialize_i386_tdep): Rename initialize_tdesc_i386_avx_mpx_avx512.
* i386-tdep.h (struct gdbarch_tdep): Add feature variables to tdep
structure.
(enum i386_regnum): Add PKRU register.
(I386_PKEYS_NUM_REGS): New define for number of registers in PKRU feature.
(i386_pkru_regnum_p): New prototype.
* i387-tdep.c (xsave_pkeys_offset): New table for PKRU offsets in
XSAVE buffer.
(XSAVE_PKEYS_ADDR): New macro.
(i387_supply_xsave): Add code to handle PKRU register.
(i387_collect_xsave): Likewise.
* i387-tdep.h (I387_NUM_PKEYS_REGS): New define for number of registers
in PKRU feature.
(I387_PKRU_REGNUM): New macro.
(I387_PKEYSEND_REGNUM): Likewise.
* regformats/i386/amd64_avx_mpx_avx512_pku_linux.dat: Regenerate from
renamed XML file.
* regformats/i386/amd64_avx_mpx_avx512_pku.dat: Likewise.
* regformats/i386/i386/amd64-avx-mpx-avx512-pku.dat: Likewise.
* regformats/i386/i386_avx_mpx_avx512_pku_linux.dat: Likewise.
testsuite/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* gdb.arch/i386-pkru.c: New file.
* gdb.arch/i386-pkru.exp: Likewise.
gdbserver/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* Makefile.in (clean): Rename i386-avx-mpx-avx512.c,
i386-avx-mpx-avx512-linux.c, amd64-avx-mpx-avx512.c,
amd64-avx-mpx-avx512-linux.c.
(i386-avx-mpx-avx512-linux-ipa.o:): Rename rule and source file.
(amd64-avx-mpx-avx512-linux-ipa.o:): Likewise.
(i386-avx-mpx-avx512.c :): Rename rule, source files and dat files.
(i386-avx-mpx-avx512-linux.c :): Likewise.
(amd64-avx-mpx-avx512.c :): Likewise.
(amd64-avx-mpx-avx512-linux.c :): Likewise.
* configure.srv (srv_i386_regobj): Rename i386-avx-mpx-avx512.o.
(srv_i386_linux_regobj): Rename i386-avx-mpx-avx512-linux.o.
(srv_amd64_regobj): Rename amd64-avx-mpx-avx512.o.
(srv_amd64_linux_regobj): Rename amd64-avx-mpx-avx512-linux.o.
(ipa_i386_linux_regobj): Rename i386-avx-mpx-avx512-linux-ipa.o.
(ipa_amd64_linux_regobj): Rename amd64-avx-mpx-avx512-pku-linux-ipa.o.
(srv_i386_32bit_xmlfiles): Add 32bit-pkeys.xml.
(srv_i386_64bit_xmlfiles): Add 64bit-pkeys.xml.
(srv_i386_xmlfiles): Rename i386/i386-avx-mpx-avx512.xml.
(srv_amd64_xmlfiles): Rename i386/amd64-avx-mpx-avx512.xml.
(srv_i386_linux_xmlfiles): Rename i386/i386-avx-mpx-avx512-linux.xml.
(srv_amd64_linux_xmlfiles): Rename di386/amd64-avx-mpx-avx512-linux.xml.
* i387-fp.c (num_pkeys_registers): New variable.
(struct i387_xsave): Add space for pkru values.
(i387_cache_to_fsave): Add code to handle PKRU register.
(i387_xsave_to_cache): Likewise.
* linux-amd64-ipa.c (get_ipa_tdesc): Rename
tdesc_amd64_avx_mpx_avx512_linux.
(initialize_low_tracepoint): Rename
init_registers_amd64_avx_mpx_avx512_linux.
* linux-i386-ipa.c (get_ipa_desc): Rename
tdesc_i386_avx_mpx_avx512_linux.
(initialize_low_tracepoint): Rename
init_registers_i386_avx_mpx_avx512_linux.
* linux-x86-low.c (x86_64_regmap[]): Add PKRU register.
(x86_linux_read_description): Rename X86_XSTATE_AVX_MPX_AVX512_MASK,
rename tdesc_amd64_avx_mpx_avx512_linux, rename
tdesc_i386_avx_mpx_avx512_linux.
(x86_get_ipa_tdesc_idx): Rename tdesc_amd64_avx_mpx_avx512_linux,
rename tdesc_i386_avx_mpx_avx512_linux.
(initialize_low_arch): Rename init_registers_amd64_avx_mpx_avx512_linux,
rename init_registers_i386_avx_mpx_avx512_linux.
* linux-x86-tdesc.h (init_registers_amd64_avx_mpx_avx512_linux): Renamed
prototype.
(tdesc_amd64_avx_mpx_avx512_linux): Likewise.
(init_registers_i386_avx_mpx_avx512_linux): Likewise.
(tdesc_i386_avx_mpx_avx512_linux): Likewise.
doc/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* gdb.texinfo (i386 Features): Add description of PKRU register.
Change-Id: If75ce5aba7dfd33fdbe3d8b47f04ef3f550c52be
Signed-off-by: Michael Sturm <michael.sturm@intel.com>
|
|
Add a dedicated target description for the feature combination
avx-avx512 as implemented by certain IA CPU models.
The corresponding X86_XSTATE_AVX_AVX512_MASK already exists, but shared
the tdesc with X86_XSTATE_AVX_MPX_AVX512_MASK. This caused MPX registers
displayed as undefined on CPUs that only implemented
X86_XSTATE_AVX_AVX512_MASK, which is undesired. This patch solves this issue.
This patch also corrects the wrong usage of x32-avx-mpx-avx512, which is
replaced by x32-avx-avx512. The MPX feature is not implemented in x32 mode.
gdb/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* amd64-linux-tdep.c (features/i386/amd64-avx-avx512-linux.c):
New include.
(features/i386/x32-avx-mpx-avx512-linux.c): Rename to...
(features/i386/x32-avx-avx512-linux.c): ...this.
(amd64_linux_core_read_description): Add dedicated cases for
X86_XSTATE_AVX_AVX512_MASK and return appropriate tdesc.
(_initialize_amd64_linux_tdep): Add calls to
initialize_tdesc_amd64_avx_avx512_linux and
initialize_tdesc_x32_avx_avx512_linux.
* amd64-linux.tdep.h (tdesc_amd64_avx_avx512_linux): New prototype.
(tdesc_x32_avx_mpx_avx512_linux): Rename to...
(tdesc_x32_avx_avx512_linu): ...this.
* amd64-tdep.c (features/i386/amd64-avx-avx512.c): New include.
(features/i386/x32-avx-mpx-avx512.c): Rename to...
(features/i386/x32-avx-avx512.c): ...this.
(amd64_target_description): Add dedicated case for
X86_XSTATE_AVX_AVX512_MASK and return appropriate tdesc.
(_initialize_amd64_tdep): Add call to
initialize_tdesc_amd64_avx_avx512.
(initialize_tdesc_x32_avx_mpx_avx512): Rename to...
(initialize_tdesc_x32_avx_avx512): ...this.
* features/Makefile (WHICH): New tdescs i386/i386-avx-avx512,
i386/i386-avx-avx512-linux, i386/amd64-avx-avx512,
i386/amd64-avx-avx512-linux.
(i386/x32-avx-mpx-avx512): Rename to...
(i386/x32-avx-avx512): ...this.
(i386/x32-avx-mpx-avx512-linux): Rename to...
(i386/x32-avx-avx512-linux): ...this.
(i386/i386-avx-avx512-expedite, i386/i386-avx-avx512-linux-expedite,
i386/amd64-avx-avx512-expedite, i386/amd64-avx-avx512-linux-expedite):
New expedites.
(i386/x32-avx-mpx-avx512-expedite): Rename to...
(i386/x32-avx-avx512-expedite): ...this.
(i386/x32-avx-mpx-avx512-linux-expedite): Rename to...
(i386/x32-avx-avx512-linux-expedite): ...this.
(XMLTOC): New XML files i386/amd64-avx-avx512-linux.xml,
i386/amd64-avx-avx512.xml, i386/i386-avx-avx512-linux.xml,
i386/i386-avx-avx512.xml.
(i386/x32-avx-mpx-avx512-linux.xml): Rename to...
(i386/x32-avx-avx512-linux.xml): ...this.
(i386/x32-avx-mpx-avx512.xml): Rename to...
(i386/x32-avx-avx512.xml): ...this.
($(outdir)/i386/i386-avx-avx512.dat): New rule.
($(outdir)/i386/i386-avx-avx512-linux.dat): Likewise.
($(outdir)/i386/amd64-avx-avx512.dat): Likewise.
($(outdir)/i386/amd64-avx-avx512-linux.dat): Likewise.
($(outdir)/i386/x32-avx-mpx-avx512.dat): Rename to...
($(outdir)/i386/x32-avx-avx512.dat): ...this.
($(outdir)/i386/x32-avx-mpx-avx512-linux.dat): Rename to...
($(outdir)/i386/x32-avx-avx512-linux.dat): ...this.
* features/i386/amd64-avx-avx512-linux.c: New file.
* features/i386/amd64-avx-avx512-linux.xml: Likewise.
* features/i386/amd64-avx-avx512.c: Likewise.
* features/i386/amd64-avx-avx512.xml: Likewise.
* features/i386/i386-avx-avx512-linux.c: Likewise.
* features/i386/i386-avx-avx512-linux.xml: Likewise.
* features/i386/i386-avx-avx512.c: Likewise.
* features/i386/i386-avx-avx512.xml: Likewise.
* features/i386/x32-avx-mpx-avx512-linux.c: Deleted.
* features/i386/x32-avx-avx512-linux.c: New file.
* features/i386/x32-avx-mpx-avx512-linux.xml: Deleted.
* features/i386/x32-avx-avx512-linux.xml: New file.
* features/i386/x32-avx-mpx-avx512.c: Deleted.
* features/i386/x32-avx-avx512.c: New file.
* features/i386/x32-avx-mpx-avx512.xml: Deleted.
* features/i386/x32-avx-avx512.xml: New file.
* i386-linux-tdep.c (features/i386/i386-avx-avx512-linux.c): New include.
(i386_linux_core_read_description): Add dedicated case for
X86_XSTATE_AVX_AVX512_MASK and return appropriate tdesc.
(_initialize_i386_linux_tdep): Add call to
initialize_tdesc_i386_avx_avx512_linux.
* i386-linux-tdep.h (tdesc_i386_avx_avx512_linux): New prototype.
* i386-tdep.c (features/i386/i386-avx-avx512.c): New include.
(i386_validate_tdesc_p): Correct XSTATE mask used for feature_avx512.
(i386_target_description): Add dedicated case for
X86_XSTATE_AVX_AVX512_MASK and return appropriate tdesc.
(_initialize_i386_tdep): Add call to initialize_tdesc_i386_avx_avx512.
* regformats/i386/amd64-avx-avx512-linux.dat: New file
* regformats/i386/amd64-avx-avx512.dat: Likewise.
* regformats/i386/i386-avx-avx512-linux.dat: Likewise.
* regformats/i386/i386-avx-avx512.dat: Likewise.
* regformats/i386/x32-avx-mpx-avx512-linux.dat: Deleted.
* regformats/i386/x32-avx-avx512-linux.dat: New file.
* regformats/i386/x32-avx-mpx-avx512.dat: Deleted.
* regformats/i386/x32-avx-avx512.dat: New file.
* x86-linux-nat.c (x86_linux_read_description): Add dedidated case for
X86_XSTATE_AVX_AVX512_MASK and return appropriate description.
gdbserver/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* Makefile.in (clean): Add handling of new source files
i386-avx-avx512.c, i386-avx-avx512-linux.c, amd64-avx-avx512.c,
amd64-avx-avx512-linux.c.
(x32-avx-mpx-avx512.c): Rename to...
(x32-avx-avx512.c): ...this.
(x32-avx-mpx-avx512-linux.c): Rename to...
(x32-avx-avx512-linux.c): ...this.
(i386-avx-avx512-linux-ipa.o): New rule.
(amd64-avx-avx512-linux-ipa.o): Likewise.
(i386-avx-avx512.c): Likewise.
(i386-avx-avx512-linux.c): Likewise.
(amd64-avx-avx512.c): Likewise.
(amd64-avx-avx512-linux.c): Likewise.
(x32-avx-avx512.c): Rename rule, source files, dat files from
x32-avx-mpx-avx512.*) to this.
(x32-avx-avx512-linux.c): Rename rule, source files, dat files from
x32-avx-mpx-avx512-linux.*) to this.
* configure.srv (srv_i386_regobj): Add i386-avx-avx512.o.
(srv_i386_linux_regobj): Add i386-avx-avx512-linux.o.
(srv_amd64_regobj): Add amd64-avx-avx512.o, rename
x32-avx-mpx-avx512.o to x32-avx-avx512.o.
(srv_amd64_linux_regobj): Add amd64-avx-avx512-linux.o, rename
x32-avx-mpx-avx512-linux.o to x32-avx-avx512-linux.o.
(ipa_i386_linux_regobj): Add i386-avx-avx512-linux-ipa.o.
(ipa_amd64_linux_regobj): Add amd64-avx-avx512-linux-ipa.o.
(srv_i386_xmlfiles): Add i386/i386-avx-avx512.xml.
(srv_amd64_xmlfiles): Add i386/amd64-avx-avx512.xml, rename
x32-avx-mpx-avx512.xml to x32-avx-avx512.xml.
(srv_i386_linux_xmlfiles): Add i386/i386-avx-avx512-linux.xml.
(srv_amd64_linux_xmlfiles): Add i386/amd64-avx-avx512-linux.xml,
rename x32-avx-mpx-avx512-linux.xml to x32-avx-avx512-linux.xml.
* linux-amd64-ipa.c (get_ipa_tdesc): Add dedicated case for
X86_TDESC_AVX_AVX512 and return appropriate tdesc.
(initialize_low_tracepoint): Add init_registers_amd64_avx_avx512_linux.
* linux-i386-ipa.c (get_ipa_tdesc): Add dedicated case for
X86_TDESC_AVX_AVX512 and return appropriate tdesc.
(initialize_low_tracepoint): Add init_registers_i386_avx_avx512_linux.
* linux-x86-low.c (x86_linux_read_description): Add dedicated cases for
X86_XSTATE_AVX_AVX512_MASK and return appropriate tdesc.
(x86_get_ipa_tdesc_idx): Rename tdesc_x32_avx_mpx_avx512_linux to
tdesc_x32_avx_avx512_linux, add dedicated if-clause for
tdesc_amd64_avx_avx512_linux and return appropriate mask.
Add dedicated clause for tdesc_i386_avx_avx512_linux
and return appropriate mask.
(initialize_low_arch): Add init_registers_amd64_avx_avx512_linux,
rename init_registers_x32_avx_mpx_avx512_linux, add
init_registers_i386_avx_avx512_linux.
* linux-x86-tdesc.h (enum x86_linux_tdesc): Add new value for
X86_TDESC_AVX_AVX512.
(init_registers_amd64_avx_avx512_linux): New prototype.
(tdesc_amd64_avx_avx512_linux): Likewise.
(init_registers_x32_avx_mpx_avx512_linux): Rename to...
(init_registers_x32_avx_avx512_linux): ...this.
(tdesc_x32_avx_mpx_avx512_linux): Rename to...
(tdesc_x32_avx_avx512_linux): ...this.
(init_registers_i386_avx_avx512_linux): New prototype.
(tdesc_i386_avx_avx512_linux): Likewise.
Change-Id: I01359fab56c961a39568df50af39714ec7b31706
Signed-off-by: Michael Sturm <michael.sturm@intel.com>
|
|
To better reflect the actual feature set covered by the IA target
descriptions, the existing descriptions are renamed. Each feature of
the extended state is added to the name of a description or xstate mask
starting from AVX.
For example, amd64-mpx-avx512-linux becomes amd64-avx-mpx-avx512-linux,
while amd64-avx-linux remains unchanged.
Likewise, the corresponding xstate masks are changed, e.g. from
X86_XSTATE_MPX_AVX512_MASK to X86_XSTATE_AVX_MPX_AVX512_MASK.
gdb/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* amd64-linux-tdep.c (features/i386/amd64-avx512-linux.c): Rename
include to...
(features/i386/amd64-avx-mpx-avx512-linux.c): ...this.
(features/i386/x32-avx512-linux.c): Rename include to...
(features/i386/x32-avx-mpx-avx512-linux.c): ...this.
(amd64_linux_core_read_description): Rename X86_XSTATE_MPX_AVX512_MASK,
X86_XSTATE_AVX512_MASK, desc_x32_avx512_linux, tdesc_amd64_avx512_linux.
(_initialize_amd64_linux_tdep): Rename
initialize_tdesc_amd64_avx512_linux, initialize_tdesc_x32_avx512_linux.
* amd64-linux-tdep.h (tdesc_amd64_avx512_linux): Rename to...
(tdesc_amd64_avx_mpx_avx512_linux): ...this.
(tdesc_x32_avx512_linux): Rename to...
(tdesc_x32_avx_mpx_avx512_linux): ...this.
* amd64-tdep.c (features/i386/amd64-avx512.c): Rename include to...
(features/i386/amd64-avx-mpx-avx512.c): ...this.
(features/i386/x32-avx512.c): Rename include to...
(features/i386/x32-avx-mpx-avx512.c): ...this.
(amd64_target_description): Rename X86_XSTATE_MPX_AVX512_MASK,
X86_XSTATE_AVX512_MASK, tdesc_amd64_avx512.
(_initialize_amd64_tdep): Rename initialize_tdesc_amd64_avx512. Rename
initialize_tdesc_x32_avx512.
* common/x86-xstate.h (X86_XSTATE_AVX512_MASK): Rename to...
(X86_XSTATE_AVX_AVX512_MASK): ...this.
(86_XSTATE_MPX_AVX512_MASK): Rename to...
(X86_XSTATE_AVX_MPX_AVX512_MASK): ...this.
(X86_XSTATE_ALL_MASK): Rename X86_XSTATE_MPX_AVX512_MASK to
X86_XSTATE_AVX_MPX_AVX512_MASK.
* features/Makefile (WHICH): Rename i386/i386-avx512,
i386/i386-avx512-linux, i386/amd64-avx512, i386/amd64-avx512-linux,
i386/x32-avx512, i386/x32-avx512-linux.
(i386/i386-avx512-expedite, i386/i386-avx512-linux-expedite,
i386/amd64-avx512-expedite, i386/amd64-avx512-linux-expedite,
i386/x32-avx512-expedite, i386/x32-avx512-linux-expedite): Rename
expedites.
(XMLTOC): Rename i386/amd64-avx512-linux.xml, i386/amd64-avx512.xml,
i386/i386-avx512-linux.xml, i386/i386-avx512.xml,
i386/x32-avx512-linux.xml, i386/x32-avx512.xml.
($(outdir)/i386/i386-avx512.dat): Rename dat file in rule.
($(outdir)/i386/i386-avx512-linux.dat): Likewise.
($(outdir)/i386/amd64-avx512.dat): Likewise.
($(outdir)/i386/amd64-avx512-linux.dat): Likewise.
($(outdir)/i386/x32-avx512.dat): Likewise.
($(outdir)/i386/x32-avx512-linux.dat): Likewise.
* features/i386/amd64-avx512-linux.c: Regenerate from renamed XML file.
* features/i386/amd64-avx512-linux.xml: Rename XML file.
* features/i386/amd64-avx512.c: Regenerate from renamed XML file.
* features/i386/amd64-avx512.xml: Rename XML file.
* features/i386/i386-avx512-linux.c: Regenerate from renamed XML file.
* features/i386/i386-avx512-linux.xml: Rename XML file.
* features/i386/i386-avx512.c: Regenerate from renamed XML file.
* features/i386/i386-avx512.xml: Rename XML file.
* features/i386/x32-avx512-linux.c: Regenerate from renamed XML file.
* features/i386/x32-avx512-linux.xml: Rename XML file.
* features/i386/x32-avx512.c: Regenerate from renamed XML file.
* features/i386/x32-avx512.xml: Rename XML file.
* i386-linux-tdep.c (features/i386/i386-avx512-linux.c): Rename to...
(features/i386/i386-avx-mpx-avx512-linux.c): ...this.
(i386_linux_core_read_description): Rename X86_XSTATE_MPX_AVX512_MASK,
X86_XSTATE_AVX512_MASK, tdesc_i386_avx512_linux.
(_initialize_i386_linux_tdep): Rename initialize_tdesc_i386_avx512_linux.
* i386-linux-tdep.h (tdesc_i386_avx512_linux): Rename to...
(tdesc_i386_avx_mpx_avx512_linux): ...this.
* i386-tdep.c (features/i386/i386-avx512.c): Rename to...
(features/i386/i386-avx-mpx-avx512.c): ...this.
(i386_register_reggroup_p): Rename X86_XSTATE_AVX512_MASK.
(i386_validate_tdesc_p): Likewise.
(i386_target_description): Rename X86_XSTATE_MPX_AVX512_MASK,
tdesc_i386_avx512.
(_initialize_i386_tdep): Rename initialize_tdesc_i386_avx512.
* regformats/i386/amd64-avx512-linux.dat: Regenerate from renamed XML
file.
* regformats/i386/amd64-avx512.dat: Likewise.
* regformats/i386/i386-avx512-linux.dat: Likewise.
* regformats/i386/i386-avx512.dat: Likewise.
* regformats/i386/x32-avx512-linux.dat: Likewise.
* regformats/i386/x32-avx512.dat: Likewise.
* x86-Linux-nat.c (x86_linux_read_description): Rename
X86_XSTATE_MPX_AVX512_MASK, X86_XSTATE_AVX512_MASK,
tdesc_x32_avx512_linux, tdesc_amd64_avx512_linux, tdesc_i386_avx512_linux.
gdbserver/Changelog:
2016-04-18 Michael Sturm <michael.sturm@intel.com>
* Makefile.in (clean): Rename i386-avx512.c, i386-avx512-linux.c,
amd64-avx512.c, amd64-avx512-linux.c, x32-avx512.c, x32-avx512-linux.c.
(i386-avx512-linux-ipa.o): Rename rule and source files.
(amd64-avx512-linux-ipa.o): Likewise.
(i386-avx512.c): Rename rule, source fils and dat files.
(i386-avx512-linux.c): Likewise.
(amd64-avx512.c): Likewise.
(amd64-avx512-linux.c): Likewise.
(x32-avx512.c): Likewise.
(x32-avx512-linux.c): Likewise.
* configfure.srv (srv_i386_regobj): Rename i386-avx512.o.
(i386_linux_regobj): Rename i386-avx512-linux.o.
(srv_amd64_regobj): Rename amd64-avx512.o, x32-avx512.o.
(srv_amd64_linux_regobj): Rename amd64-avx512-linux.o,
x32-avx512-linux.o.
(ipa_i386_linux_regobj): Rename i386-avx512-linux-ipa.o.
(ipa_amd64_linux_regobj): Rename amd64-avx512-linux-ipa.o.
(srv_i386_xmlfiles): Rename i386/i386-avx512.xml.
(srv_amd64_xmlfiles): Rename i386/amd64-avx512.xml, i386/x32-avx512.xml.
(srv_i386_linux_xmlfiles): Rename i386/i386-avx512-linux.xml.
(srv_amd64_linux_xmlfiles): Rename i386/amd64-avx512-linux.xml,
i386/x32-avx512-linux.xml).
* linux-amd64-ipa.c (get_ipa_tdesc): Rename X86_TDESC_AVX512 and returned
tdesc for that case.
(initialize_low_tracepoint): Rename init_registers_amd64_avx512_linux.
* linux-i386-ipa.c (get_ipa_tdesc): Rename X86_TDESC_AVX512 and tdesc
returned for that case.
(initialize_low_tracepoint): Rename init_registers_i386_avx512_linux.
* linux-x86-low.c (x86_linux_read_description): Rename
X86_XSTATE_AVX512_MASK and tdesc returned for that case.
(x86_get_ipa_tdesc_idx): Rename tdesc_amd64_avx512_linux,
tdesc_x32_avx512_linux and mask returned for these descriptions.
Rename tdesc_i386_avx512_linux and mask returned for that description.
(initialize_low_arch): Rename init_registers_amd64_avx512_linux,
init_registers_x32_avx512_linux, init_registers_i386_avx512_linux.
* linux-x86-tdesc.h (enum x86_linux_tdesc): Rename X86_TDESC_AVX512.
(init_registers_amd64_avx512_linux): Rename to...
(init_registers_amd64_avx_mpx_avx512_linux): ...this.
(tdesc_amd64_avx512_linux): Rename to...
(tdesc_amd64_avx_mpx_avx512_linux): ...this.
(init_registers_x32_avx512_linux): Rename to...
(init_registers_x32_avx_mpx_avx512_linux): ...this.
(tdesc_x32_avx512_linux): Rename to...
(tdesc_x32_avx_mpx_avx512_linux): ...this.
(init_registers_i386_avx512_linux): Rename to...
(init_registers_i386_avx_mpx_avx512_linux): ...this.
(tdesc_i386_avx512_linux): Rename to...
(tdesc_i386_avx_mpx_avx512_linux): ...this.
Change-Id: Idb83be3b3b72d5487542d4b568193df2777a3d9d
Signed-off-by: Michael Sturm <michael.sturm@intel.com>
|
|
This patch allows examination of the registers FS_BASE and GS_BASE
for Linux Systems running on 64bit. Tests for simple read and write
of the new registers is also added with this patch.
2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
Richard Henderson <rth@redhat.com>
gdb/ChangeLog:
* amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
(amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
GS_BASE for older kernels.
(amd64_linux_store_inferior_registers): Add case to store FS_BASE
GS_BASE for older kernels.
* amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
and GS_BASE to the offset table.
(amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
system register group.
* amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
for older kernels.
* amd64-tdep.c (amd64_init_abi): Add segment registers for the
amd64 ABI.
* amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
AMD64_GSBASE_REGNUM.
(AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
* features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
(amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
(x32-avx-linux.dat, x32-avx512-linux.dat): Add
i386/64bit-segments.xml in those rules.
* features/i386/64bit-segments.xml: New file.
* features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
* features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
* features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
* features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
* features/i386/amd64-linux.xml: Add 64bit-segments.xml.
* features/i386/amd64-avx-linux.c: Regenerated.
* features/i386/amd64-avx-mpx-linux.c: Regenerated.
* features/i386/amd64-avx-mpx.c: Regenerated.
* features/i386/amd64-avx512-linux.c: Regenerated.
* features/i386/amd64-linux.c: Regenerated.
* features/i386/amd64-mpx-linux.c: Regenerated.
* features/i386/i386-avx-mpx-linux.c: Regenerated.
* features/i386/i386-avx-mpx.c: Regenerated.
* features/i386/x32-avx-linux.c: Regenerated.
* features/i386/x32-avx512-linux.c: Regenerated.
* regformats/i386/amd64-avx-linux.dat: Regenerated.
* regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
* regformats/i386/amd64-avx512-linux.dat: Regenerated.
* regformats/i386/amd64-linux.dat: Regenerated.
* regformats/i386/amd64-mpx-linux.dat: Regenerated.
* regformats/i386/x32-avx-linux.dat: Regenerated.
* regformats/i386/x32-avx512-linux.dat: Regenerated.
* regformats/i386/x32-linux.dat: Regenerated.
gdb/doc/ChangeLog:
* gdb.texinfo (i386 Features): Add system segment registers
as feature.
gdb/gdbserver/ChangeLog:
* linux-x86-low.c (x86_64_regmap): Add fs_base and gs_base
to the register table.
(x86_fill_gregset): Add support for old kernels for the
fs_base and gs_base system registers.
(x86_store_gregset): Likewise.
* configure.srv (srv_i386_64bit_xmlfiles): Add 64bit-segments.xml.
gdb/testsuite/ChangeLog:
* gdb.arch/amd64-gs_base.c: New file.
* gdb.arch/amd64-gs_base.exp: New file.
Change-Id: I2e0eeb93058a2320d4d3b045082643cfe4aff963
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
|
|
In the previous patch a new set of target descriptions
(i386|amd64)-avx-mpx were added being same as the (i386|amd64)-mpx.
This patch removes AVX feature from (i386|amd64)-mpx target
description set.
This way the (i386|amd64)avx_mpx(_linux|) set has AVX and MPX features
and (i386|amd64)mpx(_linux|) only MPX.
2016-04-14 Walfred Tedeschi <walfred.tedeschi@intel.com>
* features/i386/amd64-mpx-linux.xml: Remove AVX feature.
* features/i386/amd64-mpx.xml: Remove AVX feature.
* features/i386/i386-mpx-linux.xml: Remove AVX feature.
* features/i386/i386-mpx.xml: Remove AVX feature.
* features/i386/amd64-mpx-linux.c: Regenerate.
* features/i386/amd64-mpx.c: Regenerate.
* features/i386/i386-mpx-linux.c: Regenerate.
* features/i386/i386-mpx.c: Regenerate.
* regformats/i386/amd64-mpx-linux.dat: Regenerate.
* regformats/i386/amd64-mpx.dat: Regenerate.
* regformats/i386/i386-mpx-linux.dat: Regenerate.
* regformats/i386/i386-mpx.dat: Regenerate.
|
|
The current MPX target descriptions assume that MPX is always combined
with AVX, however that's not correct. We can have machines with MPX
and without AVX; or machines with AVX and without MPX.
This patch adds new target descriptions for machines that support
both MPX and AVX, as duplicates of the existing MPX descriptions.
The following commit will remove AVX from the MPX-only descriptions.
2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
gdb/ChangeLog:
* amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
New include.
(amd64_linux_core_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
(_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
* amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
* amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
(amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
(_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
* common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
(X86_XSTATE_AVX_MPX_MASK): New case.
* features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
(i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
(i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
(i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
New expedites.
* i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
include.
(i386_linux_core_read_description): Add case
X86_XSTATE_AVX_MPX_MASK.
(_initialize_i386_linux_tdep): Call
initialize_tdesc_i386_avx_mpx_linux.
* i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
* i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
(i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
* x86-linux-nat.c (x86_linux_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
* features/i386/amd64-avx-mpx-linux.xml: New file.
* features/i386/i386-avx-mpx-linux.xml: New file.
* features/i386/i386-avx-mpx.xml: New file.
* features/i386/amd64-avx-mpx.xml: New file.
* features/i386/amd64-avx-mpx-linux.c: Generated.
* features/i386/amd64-avx-mpx.c: Generated.
* features/i386/i386-avx-mpx-linux.c: Generated.
* features/i386/i386-avx-mpx.c: Generated.
* regformats/i386/amd64-avx-mpx-linux.dat: Generated.
* regformats/i386/amd64-avx-mpx.dat: Generated.
* regformats/i386/i386-avx-mpx-linux.dat: Generated.
* regformats/i386/i386-avx-mpx.dat: Generated.
gdb/gdbserver/ChangeLog:
* Makefile.in (clean): Add removal for i386-avx-mpx.c,
i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
(i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
(amd64-avx-mpx-linux.c): New rules.
(amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
* configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
(srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
(srv_amd64_regobj): Add amd64-avx-mpx.o.
(srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
(srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
(srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
(srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
(srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
(ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
(ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
* linux-x86-low.c (x86_linux_read_description): Add case for
X86_XSTATE_AVX_MPX_MASK.
(x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
(initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
init_registers_i386_avx_mpx_linux.
* linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
(initialize_low_tracepoint): Call
init_registers_i386_avx_mpx_linux.
* linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
(initialize_low_tracepoint): Call
init_registers_amd64_avx_mpx_linux.
* linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
(init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
(init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
declarations.
|
|
We have read-only markers in most generated sources already, so that
Emacs/Vi users won't edit them accidentally, but were missing them on
the generated gdb/regformats/ .dat files.
gdb/
2014-10-01 Pedro Alves <palves@redhat.com>
* features/Makefile ($(outdir)/%.dat): Output "THIS FILE IS
GENERATED" along with emacs/vi read-only markers.
* regformats/aarch64.dat: Regenerate.
* regformats/arm-with-iwmmxt.dat: Regenerate.
* regformats/arm-with-neon.dat: Regenerate.
* regformats/arm-with-vfpv2.dat: Regenerate.
* regformats/arm-with-vfpv3.dat: Regenerate.
* regformats/i386/amd64-avx-linux.dat: Regenerate.
* regformats/i386/amd64-avx.dat: Regenerate.
* regformats/i386/amd64-avx512-linux.dat: Regenerate.
* regformats/i386/amd64-avx512.dat: Regenerate.
* regformats/i386/amd64-linux.dat: Regenerate.
* regformats/i386/amd64-mpx-linux.dat: Regenerate.
* regformats/i386/amd64-mpx.dat: Regenerate.
* regformats/i386/amd64.dat: Regenerate.
* regformats/i386/i386-avx-linux.dat: Regenerate.
* regformats/i386/i386-avx.dat: Regenerate.
* regformats/i386/i386-avx512-linux.dat: Regenerate.
* regformats/i386/i386-avx512.dat: Regenerate.
* regformats/i386/i386-linux.dat: Regenerate.
* regformats/i386/i386-mmx-linux.dat: Regenerate.
* regformats/i386/i386-mmx.dat: Regenerate.
* regformats/i386/i386-mpx-linux.dat: Regenerate.
* regformats/i386/i386-mpx.dat: Regenerate.
* regformats/i386/i386.dat: Regenerate.
* regformats/i386/x32-avx-linux.dat: Regenerate.
* regformats/i386/x32-avx.dat: Regenerate.
* regformats/i386/x32-avx512-linux.dat: Regenerate.
* regformats/i386/x32-avx512.dat: Regenerate.
* regformats/i386/x32-linux.dat: Regenerate.
* regformats/i386/x32.dat: Regenerate.
* regformats/microblaze-with-stack-protect.dat: Regenerate.
* regformats/mips-dsp-linux.dat: Regenerate.
* regformats/mips-linux.dat: Regenerate.
* regformats/mips64-dsp-linux.dat: Regenerate.
* regformats/mips64-linux.dat: Regenerate.
* regformats/nios2-linux.dat: Regenerate.
* regformats/rs6000/powerpc-32.dat: Regenerate.
* regformats/rs6000/powerpc-32l.dat: Regenerate.
* regformats/rs6000/powerpc-64l.dat: Regenerate.
* regformats/rs6000/powerpc-altivec32l.dat: Regenerate.
* regformats/rs6000/powerpc-altivec64l.dat: Regenerate.
* regformats/rs6000/powerpc-cell32l.dat: Regenerate.
* regformats/rs6000/powerpc-cell64l.dat: Regenerate.
* regformats/rs6000/powerpc-e500l.dat: Regenerate.
* regformats/rs6000/powerpc-vsx32l.dat: Regenerate.
* regformats/rs6000/powerpc-vsx64l.dat: Regenerate.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux32v1.dat: Regenerate.
* regformats/s390-linux32v2.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390-linux64v1.dat: Regenerate.
* regformats/s390-linux64v2.dat: Regenerate.
* regformats/s390-te-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390x-linux64v1.dat: Regenerate.
* regformats/s390x-linux64v2.dat: Regenerate.
* regformats/s390x-te-linux64.dat: Regenerate.
* regformats/tic6x-c62x-linux.dat: Regenerate.
* regformats/tic6x-c62x.dat: Regenerate.
* regformats/tic6x-c64x-linux.dat: Regenerate.
* regformats/tic6x-c64x.dat: Regenerate.
* regformats/tic6x-c64xp-linux.dat: Regenerate.
* regformats/tic6x-c64xp.dat: Regenerate.
|
|
This patch adds support for the Intel(R) Advanced Vector
Extensions 512 (Intel(R) AVX-512) registers. Native and remote
debugging are covered by this patch.
Intel(R) AVX-512 is an extension to AVX to support 512-bit wide
SIMD registers in 64-bit mode (XMM0-XMM31, YMM0-YMM31, ZMM0-ZMM31).
The number of available registers in 32-bit mode is still 8
(XMM0-7, YMM0-7, ZMM0-7). The lower 256-bits of the ZMM registers
are aliased to the respective 256-bit YMM registers. The lower
128-bits are aliased to the respective 128-bit XMM registers.
There are also 8 new, dedicated mask registers (K0-K7) in both 32-bit
mode and 64-bit mode.
For more information please see
Intel(R) Developer Zone: Intel(R) AVX
http://software.intel.com/en-us/intel-isa-extensions#pid-16007-1495
Intel(R) Architecture Instruction Set Extensions Programming Reference:
http://software.intel.com/en-us/file/319433-017pdf
2014-04-24 Michael Sturm <michael.sturm@mintel.com>
Walfred Tedeschi <walfred.tedeschi@intel.com>
* amd64-linux-nat.c (amd64_linux_gregset32_reg_offset): Add
AVX512 registers.
(amd64_linux_read_description): Add code to handle AVX512 xstate
mask and return respective tdesc.
* amd64-linux-tdep.c: Include features/i386/amd64-avx512-linux.c
and features/i386/x32-avx512-linux.c.
(amd64_linux_gregset_reg_offset): Add AVX512 registers.
(amd64_linux_core_read_description): Add code to handle AVX512
xstate mask and return respective tdesc.
(_initialize_amd64_linux_tdep): Initialize AVX512 tdesc.
* amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM): Adjust regnum
calculation.
(AMD64_LINUX_NUM_REGS): Adjust to new number of registers.
(tdesc_amd64_avx512_linux): New prototype.
(tdesc_x32_avx512_linux): Likewise.
* amd64-tdep.c: Include features/i386/amd64-avx512.c and
features/i386/x32-avx512.c.
(amd64_ymm_avx512_names): New register names for pseudo
registers YMM16-31.
(amd64_ymmh_avx512_names): New register names for raw registers
YMMH16-31.
(amd64_k_names): New register names for K registers.
(amd64_zmmh_names): New register names for ZMM raw registers.
(amd64_zmm_names): New registers names for ZMM pseudo registers.
(amd64_xmm_avx512_names): New register names for XMM16-31
registers.
(amd64_pseudo_register_name): Add code to return AVX512 pseudo
registers.
(amd64_init_abi): Add code to intitialize AVX512 tdep variables
if feature is present.
(_initialize_amd64_tdep): Call AVX512 tdesc initializers.
* amd64-tdep.h (enum amd64_regnum): Add AVX512 registers.
(AMD64_NUM_REGS): Adjust to new number of registers.
* i386-linux-nat.c (GETXSTATEREGS_SUPPLIES): Extend range of
registers supplied via XSTATE by AVX512 registers.
(i386_linux_read_description): Add case for AVX512.
* i386-linux-tdep.c: Include i386-avx512-linux.c.
(i386_linux_gregset_reg_offset): Add AVX512 registers.
(i386_linux_core_read_description): Add case for AVX512.
(i386_linux_init_abi): Install supported register note section
for AVX512.
(_initialize_i386_linux_tdep): Add call to tdesc init function for
AVX512.
* i386-linux-tdep.h (I386_LINUX_NUM_REGS): Set number of
registers to be number of zmm7h + 1.
(tdesc_i386_avx512_linux): Add tdesc for AVX512 registers.
* i386-tdep.c: Include features/i386/i386-avx512.c.
(i386_zmm_names): Add ZMM pseudo register names array.
(i386_zmmh_names): Add ZMM raw register names array.
(i386_k_names): Add K raw register names array.
(num_lower_zmm_regs): Add constant for the number of lower ZMM
registers. AVX512 has 16 more ZMM registers than there are YMM
registers.
(i386_zmmh_regnum_p): Add function to look up register number of
ZMM raw registers.
(i386_zmm_regnum_p): Likewise for ZMM pseudo registers.
(i386_k_regnum_p): Likewise for K raw registers.
(i386_ymmh_avx512_regnum_p): Likewise for additional YMM raw
registers added by AVX512.
(i386_ymm_avx512_regnum_p): Likewise for additional YMM pseudo
registers added by AVX512.
(i386_xmm_avx512_regnum_p): Likewise for additional XMM registers
added by AVX512.
(i386_register_name): Add code to hide YMMH16-31 and ZMMH0-31.
(i386_pseudo_register_name): Add ZMM pseudo registers.
(i386_zmm_type): Construct and return vector registers type for ZMM
registers.
(i386_pseudo_register_type): Return appropriate type for YMM16-31,
ZMM0-31 pseudo registers and K registers.
(i386_pseudo_register_read_into_value): Add code to read K, ZMM
and YMM16-31 registers from register cache.
(i386_pseudo_register_write): Add code to write K, ZMM and
YMM16-31 registers.
(i386_register_reggroup_p): Add code to include/exclude AVX512
registers in/from respective register groups.
(i386_validate_tdesc_p): Handle AVX512 feature, add AVX512
registers if feature is present in xcr0.
(i386_gdbarch_init): Add code to initialize AVX512 feature
variables in tdep structure, wire in pseudo registers and call
initialize_tdesc_i386_avx512.
* i386-tdep.h (struct gdbarch_tdep): Add AVX512 related
variables.
(i386_regnum): Add AVX512 registers.
(I386_SSE_NUM_REGS): New define for number of SSE registers.
(I386_AVX_NUM_REGS): Likewise for AVX registers.
(I386_AVX512_NUM_REGS): Likewise for AVX512 registers.
(I386_MAX_REGISTER_SIZE): Change to 64 bytes, ZMM registers are
512 bits wide.
(i386_xmm_avx512_regnum_p): New prototype for register look up.
(i386_ymm_avx512_regnum_p): Likewise.
(i386_k_regnum_p): Likewise.
(i386_zmm_regnum_p): Likewise.
(i386_zmmh_regnum_p): Likewise.
* i387-tdep.c : Update year in copyright notice.
(xsave_ymm_avx512_offset): New table for YMM16-31 offsets in
XSAVE buffer.
(XSAVE_YMM_AVX512_ADDR): New macro.
(xsave_xmm_avx512_offset): New table for XMM16-31 offsets in
XSAVE buffer.
(XSAVE_XMM_AVX512_ADDR): New macro.
(xsave_avx512_k_offset): New table for K register offsets in
XSAVE buffer.
(XSAVE_AVX512_K_ADDR): New macro.
(xsave_avx512_zmm_h_offset): New table for ZMM register offsets
in XSAVE buffer.
(XSAVE_AVX512_ZMM_H_ADDR): New macro.
(i387_supply_xsave): Add code to supply AVX512 registers to XSAVE
buffer.
(i387_collect_xsave): Add code to collect AVX512 registers from
XSAVE buffer.
* i387-tdep.h (I387_NUM_XMM_AVX512_REGS): New define for number
of XMM16-31 registers.
(I387_NUM_K_REGS): New define for number of K registers.
(I387_K0_REGNUM): New define for K0 register number.
(I387_NUM_ZMMH_REGS): New define for number of ZMMH registers.
(I387_ZMM0H_REGNUM): New define for ZMM0H register number.
(I387_NUM_YMM_AVX512_REGS): New define for number of YMM16-31
registers.
(I387_YMM16H_REGNUM): New define for YMM16H register number.
(I387_XMM16_REGNUM): New define for XMM16 register number.
(I387_YMM0_REGNUM): New define for YMM0 register number.
(I387_KEND_REGNUM): New define for last K register number.
(I387_ZMMENDH_REGNUM): New define for last ZMMH register number.
(I387_YMMH_AVX512_END_REGNUM): New define for YMM31 register
number.
(I387_XMM_AVX512_END_REGNUM): New define for XMM31 register
number.
* common/i386-xstate.h: Add AVX 3.1 feature bits, mask and XSTATE
size.
* features/Makefile: Add AVX512 related files.
* features/i386/32bit-avx512.xml: New file.
* features/i386/64bit-avx512.xml: Likewise.
* features/i386/amd64-avx512-linux.c: Likewise.
* features/i386/amd64-avx512-linux.xml: Likewise.
* features/i386/amd64-avx512.c: Likewise.
* features/i386/amd64-avx512.xml: Likewise.
* features/i386/i386-avx512-linux.c: Likewise.
* features/i386/i386-avx512-linux.xml: Likewise.
* features/i386/i386-avx512.c: Likewise.
* features/i386/i386-avx512.xml: Likewise.
* features/i386/x32-avx512-linux.c: Likewise.
* features/i386/x32-avx512-linux.xml: Likewise.
* features/i386/x32-avx512.c: Likewise.
* features/i386/x32-avx512.xml: Likewise.
* regformats/i386/amd64-avx512-linux.dat: New file.
* regformats/i386/amd64-avx512.dat: Likewise.
* regformats/i386/i386-avx512-linux.dat: Likewise.
* regformats/i386/i386-avx512.dat: Likewise.
* regformats/i386/x32-avx512-linux.dat: Likewise.
* regformats/i386/x32-avx512.dat: Likewise.
* NEWS: Add note about new support for AVX512.
testsuite/
* Makefile.in (EXECUTABLES): Added i386-avx512.
* gdb.arch/i386-avx512.c: New file.
* gdb.arch/i386-avx512.exp: Likewise.
gdbserver/
* Makefile.in: Added rules to handle new files
i386-avx512.c i386-avx512-linux.c amd64-avx512.c
amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
* configure.srv (srv_i386_regobj): Add i386-avx512.o.
(srv_i386_linux_regobj): Add i386-avx512-linux.o.
(srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
(srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
x32-avx512-linux.o.
(srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
(srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
(srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
i386/x32-avx512.xml.
(srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
(srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
i386/x32-avx512-linux.xml.
* i387-fp.c (num_avx512_k_registers): New constant for number
of K registers.
(num_avx512_zmmh_low_registers): New constant for number of
lower ZMM registers (0-15).
(num_avx512_zmmh_high_registers): New constant for number of
higher ZMM registers (16-31).
(num_avx512_ymmh_registers): New contant for number of higher
YMM registers (ymm16-31 added by avx521 on x86_64).
(num_avx512_xmm_registers): New constant for number of higher
XMM registers (xmm16-31 added by AVX512 on x86_64).
(struct i387_xsave): Add space for AVX512 registers.
(i387_cache_to_xsave): Change raw buffer size to 64 characters.
Add code to handle AVX512 registers.
(i387_xsave_to_cache): Add code to handle AVX512 registers.
* linux-x86-low.c (init_registers_amd64_avx512_linux): New
prototypei from generated file.
(tdesc_amd64_avx512_linux): Likewise.
(init_registers_x32_avx512_linux): Likewise.
(tdesc_x32_avx512_linux): Likewise.
(init_registers_i386_avx512_linux): Likewise.
(tdesc_i386_avx512_linux): Likewise.
(x86_64_regmap): Add AVX512 registers.
(x86_linux_read_description): Add code to handle AVX512 XSTATE
mask.
(initialize_low_arch): Add code to initialize AVX512 registers.
doc/
* gdb.texinfo (i386 Features): Add description of AVX512
registers.
Change-Id: Ifc4c08c76b85dbec18d02efdbe6182e851584438
Signed-off-by: Michael Sturm <michael.sturm@intel.com>
|
|
2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
* features/i386/Makefile: Adapts for using MPX registers.
* features/i386/32bit-mpx.xml: New file.
* features/i386/64bit-mpx.xml: Likewise.
* features/i386/amd64-mpx-linux.c: Likewise.
* features/i386/amd64-mpx-linux.xml: Likewise.
* features/i386/amd64-mpx.c: Likewise.
* features/i386/amd64-mpx.xml: Likewise.
* features/i386/i386-mpx-linux.c: Likewise.
* features/i386/i386-mpx-linux.xml: Likewise.
* features/i386/i386-mpx.c: Likewise.
* features/i386/i386-mpx.xml: Likewise.
* regformats/i386/amd64-mpx-linux.dat: New file.
* regformats/i386/amd64-mpx.dat: Likewise.
* regformats/i386/i386-mpx-linux.dat: Likewise.
* regformats/i386/i386-mpx.dat: Likewise.
|
|
* features/Makefile (WHICH): Add i386/x32, i386/x32-linux,
i386/x32-avx and i386/x32-avx-linux.
(i386/x32-expedite): New.
(i386/x32-linux-expedite): Likewise.
(i386/x32-avx-expedite): Likewise.
(i386/x32-avx-linux-expedite): Likewise.
($(outdir)/i386/x32.dat): Likewise.
($(outdir)/i386/x32-linux.dat): Likewise.
($(outdir)/i386/x32-avx.dat): Likewise.
($(outdir)/i386/x32-avx-linux.dat): Likewise.
* features/i386/x32-avx-linux.xml: New file.
* features/i386/x32-avx.xml: Likewise.
* features/i386/x32-core.xml: Likewise.
* features/i386/x32-linux.xml: Likewise.
* features/i386/x32.xml: Likewise.
* features/i386/x32-avx-linux.c: New. Generated.
* features/i386/x32-avx.c: Likewise.
* features/i386/x32-linux.c: Likewise.
* features/i386/x32.c: Likewise.
* regformats/i386/x32-avx-linux.dat: Likewise.
* regformats/i386/x32-avx.dat: Likewise.
* regformats/i386/x32-linux.dat: Likewise.
* regformats/i386/x32.dat: Likewise.
|
|
gdb/
2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
* i386-linux-nat.c (have_ptrace_getfpxregs): Initialize to -1
if HAVE_PTRACE_GETFPXREGS is defined.
(i386_linux_read_description): Set have_ptrace_getfpxregs and
have_ptrace_getregset to 0 if ptrace PTRACE_GETFPXREGS failed.
* i386-linux-tdep.c: Include "features/i386/i386-mmx-linux.c"
(i386_linux_core_read_description): Return tdesc_i386_mmx_linux
if .reg-xfp section doesn't exist.
(_initialize_i386_linux_tdep): Call initialize_tdesc_i386_mmx_linux.
* i386-linux-tdep.h (tdesc_i386_mmx_linux): New.
* i386-tdep.c: Include "features/i386/i386-mmx.c".
(i386_go32_init_abi): Set tdesc to tdesc_i386_mmx.
(i386_validate_tdesc_p): Make org.gnu.gdb.i386.sse optional. Set
xcr0 to I386_XSTATE_X87_MASK if SSE isn't available.
(i386_gdbarch_init): Update comments.
(_initialize_i386_tdep): Call initialize_tdesc_i386_mmx.
* common/i386-xstate.h (I386_XSTATE_X87_MASK): New.
* config/djgpp/fnchange.lst: Add i386 MMX XML files.
* features/Makefile (i386/i386-mmx-expedite): New.
(i386/i386-mmx-linux-expedite): Likewise.
($(outdir)/i386/i386-mmx.dat): Likewise.
($(outdir)/i386/i386-mmx-linux.dat): Likewise.
* features/i386/i386-mmx-linux.c: New.
* features/i386/i386-mmx-linux.xml: Likewise.
* features/i386/i386-mmx.c: Likewise.
* features/i386/i386-mmx.xml: Likewise.
* regformats/i386/i386-mmx-linux.dat: Likewise.
* regformats/i386/i386-mmx.dat: Likewise.
* features/Makefile (WHICH): Add i386/i386-mmx and
i386/i386-mmx-linux.
gdb/doc/
2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
* gdb.texinfo (i386 Features): Make org.gnu.gdb.i386.avx
optional. Make org.gnu.gdb.i386.avx requires
org.gnu.gdb.i386.avx.
gdb/gdbserver/
2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
(i386-mmx.o): New.
(i386-mmx.c): Likewise.
(i386-mmx-linux.o): Likewise.
(i386-mmx-linux.c): Likewise.
* configure.srv (srv_i386_regobj): Add i386-mmx.o.
(srv_i386_linux_regobj): Add i386-mmx-linux.o.
(srv_i386_xmlfiles): Add i386/i386-mmx.xml.
(srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
* linux-x86-low.c (init_registers_i386_mmx_linux): New.
(x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
|
|
2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
* config/djgpp/fnchange.lst: Add x86 AVX XML files.
* features/Makefile (WHICH): Add i386/i386-avx,
i386/i386-avx-linux, i386/x86-64-avx and i386/x86-64-avx-linux.
(i386/i386-avx-expedite): New.
(i386/i386-avx-linux-expedite): Likewise.
(i386/x86-64-avx-expedite):Likewise.
(i386/x86-64-avx-linux-expedite): Likewise.
($(outdir)/i386/i386-avx.dat): New dependency.
($(outdir)/i386/i386-avx-linux.dat): Likewise.
($(outdir)/i386/x86-avx-64.dat): Likewise.
($(outdir)/i386/x86-64-avx-linux.dat): Likewise.
* features/i386/32bit-avx.xml: New.
* features/i386/64bit-avx.xml: Likewise.
* features/i386/i386-avx-linux.c: Likewise.
* features/i386/i386-avx-linux.xml: Likewise.
* features/i386/i386-avx.c: Likewise.
* features/i386/i386-avx.xml: Likewise.
* features/i386/x86-64-avx-linux.c: Likewise.
* features/i386/x86-64-avx-linux.xml: Likewise.
* features/i386/x86-64-avx.c: Likewise.
* features/i386/x86-64-avx.xml: Likewise.
* regformats/i386/i386-avx-linux.dat: Likewise.
* regformats/i386/i386-avx.dat: Likewise.
* regformats/i386/x86-64-avx-linux.dat: Likewise.
* regformats/i386/x86-64-avx.dat: Likewise.
|
|
gdb/
2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
* amd64-linux-nat.c (AMD64_LINUX_USER64_CS): New.
(amd64_linux_read_description): Likewise.
(_initialize_amd64_linux_nat): Set to_read_description to
amd64_linux_read_description.
* amd64-linux-tdep.c: Include "features/i386/amd64-linux.c".
(amd64_linux_register_name): Removed.
(amd64_linux_register_type): Likewise.
(amd64_linux_core_read_description): New.
(amd64_linux_init_abi): Set target description to
tdesc_amd64_linux if needed. Support orig_rax in target
description. Don't call set_gdbarch_register_name nor
set_gdbarch_register_type. Call
set_gdbarch_core_read_description.
(_initialize_amd64_linux_tdep): Call
initialize_tdesc_amd64_linux.
* amd64-linux-tdep.h (tdesc_amd64_linux): New.
* amd64-tdep.c: Include "features/i386/amd64.c".
(amd64_register_names): Removed.
(amd64_register_name): Likewise.
(amd64_register_type): Likewise.
(amd64_init_abi): Set num_core_regs and register_names. Set
target description to tdesc_amd64 if needed. Don't call
set_gdbarch_register_name nor set_gdbarch_register_type.
(_initialize_amd64_tdep): New.
* i386-linux-nat.c (i386_linux_read_description): New.
(_initialize_i386_linux_nat): Set to_read_description to
i386_linux_read_description.
* i386-linux-tdep.c: Include "features/i386/i386-linux.c".
(i386_linux_register_name): Removed.
(i386_linux_core_read_description): New.
(i386_linux_read_description): Likewise.
(i386_linux_init_abi): Don't call set_gdbarch_register_name.
Set target description to tdesc_i386_linux if needed. Support
orig_eax. Set register_reggroup_p. Call
set_gdbarch_core_read_description.
(_initialize_i386_linux_tdep): Call initialize_tdesc_i386_linux.
* i386-linux-tdep.h (tdesc_i386_linux): New.
* i386-nto-tdep.c (i386nto_regset_id): Replace I386_NUM_FREGS
with I387_NUM_REGS.
* i386-tdep.c: Include "features/i386/i386.c".
(i386_register_names): Make it const.
(i386_mmx_names): Likewise.
(i386_num_register_names): Removed.
(i386_register_name): Likewise.
(i386_eflags_type): Likewise.
(i386_mxcsr_type): Likewise.
(i386_sse_type): Likewise.
(i386_register_type): Likewise.
(i387_ext_type): Call tdesc_find_type instead of arch_float_type.
(i386_pseudo_register_name): New.
(i386_pseudo_register_type): Likewise.
(i386_mmx_type): Make it static.
(i386_gdbarch_init): Check arch. Replace I386_NUM_FREGS with
I387_NUM_REGS. Set num_core_regs and register_names. Don't
call set_gdbarch_register_name nor set_gdbarch_register_type.
Set register_reggroup_p. Set target description to tdesc_i386
if needed. Call set_tdesc_pseudo_register_type,
set_tdesc_pseudo_register_name and tdesc_use_registers.
(_initialize_i386_tdep): Call initialize_tdesc_i386.
initialize_tdesc_x86_64.
* i386-tdep.h (gdbarch_tdep): Remove i386_eflags_type,
i386_mxcsr_type and i386_sse_type. Add num_core_regs,
register_names, tdesc and register_reggroup_p.
(I386_NUM_FREGS): Removed.
(i386_eflags_type): Likewise.
(i386_mxcsr_type): Likewise.
(i386_mmx_type): Likewise.
(i386_sse_type): Likewise.
(i386_register_name): Likewise.
(i386_regnum): Add I386_MXCSR_REGNUM.
(I386_SSE_NUM_REGS): Defined with I386_MXCSR_REGNUM.
* i387-tdep.h (I387_NUM_REGS): New.
* regformats/i386/i386-linux.dat: Generated.
* regformats/i386/i386.dat: Likewise.
* regformats/i386/amd64-linux.dat: Likewise.
* regformats/i386/amd64.dat: Likewise.
* regformats/reg-i386-linux.dat: Removed.
* regformats/reg-i386.dat: Likewise.
* regformats/reg-x86-64-linux.dat: Likewise.
* regformats/reg-x86-64.dat: Likewise.
gdb/gdbserver/
2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
i386-linux.c and amd64-linux.c.
(reg-i386.o): Removed.
(reg-i386.c): Likewise.
(reg-i386-linux.o): Likewise.
(reg-i386-linux.c): Likewise.
(reg-x86-64.o): Likewise.
(reg-x86-64.c): Likewise.
(reg-x86-64-linux.o): Likewise.
(reg-x86-64-linux.c): Likewise.
(i386.o): New.
(i386.c): Likewise.
(i386-linux.o): Likewise.
(i386-linux.c): Likewise.
(amd64.o): Likewise.
(amd64.c): Likewise.
(amd64-linux.o): Likewise.
(amd64-linux.c): Likewise.
* configure.srv (srv_i386_regobj): New.
(srv_i386_linux_regobj): Likewise.
(srv_amd64_regobj): Likewise.
(srv_amd64_linux_regobj): Likewise.
(srv_i386_32bit_xmlfiles): Likewise.
(srv_i386_64bit_xmlfiles): Likewise.
(srv_i386_xmlfiles): Likewise.
(srv_amd64_xmlfiles): Likewise.
(srv_i386_linux_xmlfiles): Likewise.
(srv_amd64_linux_xmlfiles): Likewise.
(i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
srv_xmlfiles to $srv_i386_xmlfiles.
(i[34567]86-*-mingw32ce*): Likewise.
(i[34567]86-*-mingw*): Likewise.
(i[34567]86-*-nto*): Likewise.
(i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
and $srv_amd64_linux_regobj. Set srv_xmlfiles to
$srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
(x86_64-*-linux*): Likewise.
* linux-x86-low.c (init_registers_x86_64_linux): Removed.
(init_registers_amd64_linux): New.
(x86_arch_setup): Replace init_registers_x86_64_linux with
init_registers_amd64_linux.
gdb/testsuite/
2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
* gdb.xml/tdesc-regs.exp (architecture): New. Set it for x86.
(load_description): Set architecture if defined.
|