mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
Support i386 without SSE.
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.
This commit is contained in:
@ -1,3 +1,43 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2010-04-08 Doug Evans <dje@google.com>
|
2010-04-08 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* source.c (openp): Skip $cdir in PATH.
|
* source.c (openp): Skip $cdir in PATH.
|
||||||
@ -5,11 +45,10 @@
|
|||||||
2010-04-08 Phil Muldoon <pmuldoon@redhat.com>
|
2010-04-08 Phil Muldoon <pmuldoon@redhat.com>
|
||||||
|
|
||||||
PR python/11417
|
PR python/11417
|
||||||
|
|
||||||
* python/py-lazy-string.c (stpy_convert_to_value): Check for
|
* python/py-lazy-string.c (stpy_convert_to_value): Check for
|
||||||
a NULL address.
|
a NULL address.
|
||||||
(gdbpy_create_lazy_string_object): Allow strings with a NULL
|
(gdbpy_create_lazy_string_object): Allow strings with a NULL
|
||||||
address and a zero length.
|
address and a zero length.
|
||||||
|
|
||||||
2010-04-08 Hui Zhu <teawater@gmail.com>
|
2010-04-08 Hui Zhu <teawater@gmail.com>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#define I386_XSTATE_AVX (1ULL << 2)
|
#define I386_XSTATE_AVX (1ULL << 2)
|
||||||
|
|
||||||
/* Supported mask and size of the extended state. */
|
/* Supported mask and size of the extended state. */
|
||||||
|
#define I386_XSTATE_X87_MASK I386_XSTATE_X87
|
||||||
#define I386_XSTATE_SSE_MASK (I386_XSTATE_X87 | I386_XSTATE_SSE)
|
#define I386_XSTATE_SSE_MASK (I386_XSTATE_X87 | I386_XSTATE_SSE)
|
||||||
#define I386_XSTATE_AVX_MASK (I386_XSTATE_SSE_MASK | I386_XSTATE_AVX)
|
#define I386_XSTATE_AVX_MASK (I386_XSTATE_SSE_MASK | I386_XSTATE_AVX)
|
||||||
|
|
||||||
|
@ -236,6 +236,10 @@
|
|||||||
@V@/gdb/features/i386/i386-avx.c @V@/gdb/features/i386/i32-a.c
|
@V@/gdb/features/i386/i386-avx.c @V@/gdb/features/i386/i32-a.c
|
||||||
@V@/gdb/features/i386/i386-avx-linux.xml @V@/gdb/features/i386/i32-al.xml
|
@V@/gdb/features/i386/i386-avx-linux.xml @V@/gdb/features/i386/i32-al.xml
|
||||||
@V@/gdb/features/i386/i386-avx.xml @V@/gdb/features/i386/i32-a.xml
|
@V@/gdb/features/i386/i386-avx.xml @V@/gdb/features/i386/i32-a.xml
|
||||||
|
@V@/gdb/features/i386/i386-mmx-linux.c @V@/features/i386/i32-ml.c
|
||||||
|
@V@/gdb/features/i386/i386-mmx.c @V@/gdb/features/i386/i32-m.c
|
||||||
|
@V@/gdb/features/i386/i386-mmx-linux.xml @V@/gdb/features/i386/i32-ml.xml
|
||||||
|
@V@/gdb/features/i386/i386-mmx.xml @V@/gdb/features/i386/i32-m.xml
|
||||||
@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
|
@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
|
||||||
@V@/gdb/gdbserver/linux-cris-low.c @V@/gdb/gdbserver/lx-cris.c
|
@V@/gdb/gdbserver/linux-cris-low.c @V@/gdb/gdbserver/lx-cris.c
|
||||||
@V@/gdb/gdbserver/linux-crisv32-low.c @V@/gdb/gdbserver/lx-cris32.c
|
@V@/gdb/gdbserver/linux-crisv32-low.c @V@/gdb/gdbserver/lx-cris32.c
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2010-04-08 Doug Evans <dje@google.com>
|
2010-04-08 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* gdb.texinfo (Command Files): Document that gdb skips $cdir in
|
* gdb.texinfo (Command Files): Document that gdb skips $cdir in
|
||||||
|
@ -33850,7 +33850,7 @@ targets. It should describe the following registers:
|
|||||||
|
|
||||||
The register sets may be different, depending on the target.
|
The register sets may be different, depending on the target.
|
||||||
|
|
||||||
The @samp{org.gnu.gdb.i386.sse} feature is required. It should
|
The @samp{org.gnu.gdb.i386.sse} feature is optional. It should
|
||||||
describe registers:
|
describe registers:
|
||||||
|
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
@ -33862,7 +33862,8 @@ describe registers:
|
|||||||
@samp{mxcsr}
|
@samp{mxcsr}
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
The @samp{org.gnu.gdb.i386.avx} feature is optional. It should
|
The @samp{org.gnu.gdb.i386.avx} feature is optional and requires the
|
||||||
|
@samp{org.gnu.gdb.i386.sse} feature. It should
|
||||||
describe the upper 128 bits of @sc{ymm} registers:
|
describe the upper 128 bits of @sc{ymm} registers:
|
||||||
|
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
|
WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
|
||||||
i386/i386 i386/i386-linux \
|
i386/i386 i386/i386-linux \
|
||||||
|
i386/i386-mmx i386/i386-mmx-linux \
|
||||||
i386/amd64 i386/amd64-linux \
|
i386/amd64 i386/amd64-linux \
|
||||||
i386/i386-avx i386/i386-avx-linux \
|
i386/i386-avx i386/i386-avx-linux \
|
||||||
i386/amd64-avx i386/amd64-avx-linux \
|
i386/amd64-avx i386/amd64-avx-linux \
|
||||||
@ -49,6 +50,8 @@ i386/amd64-expedite = rbp,rsp,rip
|
|||||||
i386/amd64-linux-expedite = rbp,rsp,rip
|
i386/amd64-linux-expedite = rbp,rsp,rip
|
||||||
i386/i386-avx-expedite = ebp,esp,eip
|
i386/i386-avx-expedite = ebp,esp,eip
|
||||||
i386/i386-avx-linux-expedite = ebp,esp,eip
|
i386/i386-avx-linux-expedite = ebp,esp,eip
|
||||||
|
i386/i386-mmx-expedite = ebp,esp,eip
|
||||||
|
i386/i386-mmx-linux-expedite = ebp,esp,eip
|
||||||
i386/amd64-avx-expedite = rbp,rsp,rip
|
i386/amd64-avx-expedite = rbp,rsp,rip
|
||||||
i386/amd64-avx-linux-expedite = rbp,rsp,rip
|
i386/amd64-avx-linux-expedite = rbp,rsp,rip
|
||||||
mips-expedite = r29,pc
|
mips-expedite = r29,pc
|
||||||
@ -99,6 +102,8 @@ $(outdir)/i386/amd64-linux.dat: i386/64bit-core.xml i386/64bit-sse.xml \
|
|||||||
$(outdir)/i386/i386-avx.dat: i386/32bit-core.xml i386/32bit-avx.xml
|
$(outdir)/i386/i386-avx.dat: i386/32bit-core.xml i386/32bit-avx.xml
|
||||||
$(outdir)/i386/i386-avx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
|
$(outdir)/i386/i386-avx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
|
||||||
i386/32bit-linux.xml
|
i386/32bit-linux.xml
|
||||||
|
$(outdir)/i386/i386-mmx.dat: i386/32bit-core.xml
|
||||||
|
$(outdir)/i386/i386-mmx-linux.dat: i386/32bit-core.xml i386/32bit-linux.xml
|
||||||
$(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
|
$(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
|
||||||
$(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
|
$(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
|
||||||
i386/64bit-linux.xml
|
i386/64bit-linux.xml
|
||||||
|
76
gdb/features/i386/i386-mmx-linux.c
Normal file
76
gdb/features/i386/i386-mmx-linux.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/* THIS FILE IS GENERATED. Original: i386-mmx-linux.xml */
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
#include "osabi.h"
|
||||||
|
#include "target-descriptions.h"
|
||||||
|
|
||||||
|
struct target_desc *tdesc_i386_mmx_linux;
|
||||||
|
static void
|
||||||
|
initialize_tdesc_i386_mmx_linux (void)
|
||||||
|
{
|
||||||
|
struct target_desc *result = allocate_target_description ();
|
||||||
|
struct tdesc_feature *feature;
|
||||||
|
struct tdesc_type *field_type, *type;
|
||||||
|
|
||||||
|
set_tdesc_architecture (result, bfd_scan_arch ("i386"));
|
||||||
|
|
||||||
|
set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
|
||||||
|
|
||||||
|
feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
|
||||||
|
field_type = tdesc_create_flags (feature, "i386_eflags", 4);
|
||||||
|
tdesc_add_flag (field_type, 0, "CF");
|
||||||
|
tdesc_add_flag (field_type, 1, "");
|
||||||
|
tdesc_add_flag (field_type, 2, "PF");
|
||||||
|
tdesc_add_flag (field_type, 4, "AF");
|
||||||
|
tdesc_add_flag (field_type, 6, "ZF");
|
||||||
|
tdesc_add_flag (field_type, 7, "SF");
|
||||||
|
tdesc_add_flag (field_type, 8, "TF");
|
||||||
|
tdesc_add_flag (field_type, 9, "IF");
|
||||||
|
tdesc_add_flag (field_type, 10, "DF");
|
||||||
|
tdesc_add_flag (field_type, 11, "OF");
|
||||||
|
tdesc_add_flag (field_type, 14, "NT");
|
||||||
|
tdesc_add_flag (field_type, 16, "RF");
|
||||||
|
tdesc_add_flag (field_type, 17, "VM");
|
||||||
|
tdesc_add_flag (field_type, 18, "AC");
|
||||||
|
tdesc_add_flag (field_type, 19, "VIF");
|
||||||
|
tdesc_add_flag (field_type, 20, "VIP");
|
||||||
|
tdesc_add_flag (field_type, 21, "ID");
|
||||||
|
|
||||||
|
tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
|
||||||
|
tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
|
||||||
|
tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
|
||||||
|
|
||||||
|
feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
|
||||||
|
tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
|
||||||
|
|
||||||
|
tdesc_i386_mmx_linux = result;
|
||||||
|
}
|
16
gdb/features/i386/i386-mmx-linux.xml
Normal file
16
gdb/features/i386/i386-mmx-linux.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- Copyright (C) 2010 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. -->
|
||||||
|
|
||||||
|
<!-- I386 with MMX - Includes Linux-only special "register". -->
|
||||||
|
|
||||||
|
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
||||||
|
<target>
|
||||||
|
<architecture>i386</architecture>
|
||||||
|
<osabi>GNU/Linux</osabi>
|
||||||
|
<xi:include href="32bit-core.xml"/>
|
||||||
|
<xi:include href="32bit-linux.xml"/>
|
||||||
|
</target>
|
71
gdb/features/i386/i386-mmx.c
Normal file
71
gdb/features/i386/i386-mmx.c
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/* THIS FILE IS GENERATED. Original: i386-mmx.xml */
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
#include "osabi.h"
|
||||||
|
#include "target-descriptions.h"
|
||||||
|
|
||||||
|
struct target_desc *tdesc_i386_mmx;
|
||||||
|
static void
|
||||||
|
initialize_tdesc_i386_mmx (void)
|
||||||
|
{
|
||||||
|
struct target_desc *result = allocate_target_description ();
|
||||||
|
struct tdesc_feature *feature;
|
||||||
|
struct tdesc_type *field_type, *type;
|
||||||
|
|
||||||
|
set_tdesc_architecture (result, bfd_scan_arch ("i386"));
|
||||||
|
|
||||||
|
feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
|
||||||
|
field_type = tdesc_create_flags (feature, "i386_eflags", 4);
|
||||||
|
tdesc_add_flag (field_type, 0, "CF");
|
||||||
|
tdesc_add_flag (field_type, 1, "");
|
||||||
|
tdesc_add_flag (field_type, 2, "PF");
|
||||||
|
tdesc_add_flag (field_type, 4, "AF");
|
||||||
|
tdesc_add_flag (field_type, 6, "ZF");
|
||||||
|
tdesc_add_flag (field_type, 7, "SF");
|
||||||
|
tdesc_add_flag (field_type, 8, "TF");
|
||||||
|
tdesc_add_flag (field_type, 9, "IF");
|
||||||
|
tdesc_add_flag (field_type, 10, "DF");
|
||||||
|
tdesc_add_flag (field_type, 11, "OF");
|
||||||
|
tdesc_add_flag (field_type, 14, "NT");
|
||||||
|
tdesc_add_flag (field_type, 16, "RF");
|
||||||
|
tdesc_add_flag (field_type, 17, "VM");
|
||||||
|
tdesc_add_flag (field_type, 18, "AC");
|
||||||
|
tdesc_add_flag (field_type, 19, "VIF");
|
||||||
|
tdesc_add_flag (field_type, 20, "VIP");
|
||||||
|
tdesc_add_flag (field_type, 21, "ID");
|
||||||
|
|
||||||
|
tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
|
||||||
|
tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
|
||||||
|
tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
|
||||||
|
tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
|
||||||
|
tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
|
||||||
|
tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
|
||||||
|
tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
|
||||||
|
|
||||||
|
tdesc_i386_mmx = result;
|
||||||
|
}
|
14
gdb/features/i386/i386-mmx.xml
Normal file
14
gdb/features/i386/i386-mmx.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- Copyright (C) 2010 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. -->
|
||||||
|
|
||||||
|
<!-- I386 with MMX -->
|
||||||
|
|
||||||
|
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
||||||
|
<target>
|
||||||
|
<architecture>i386</architecture>
|
||||||
|
<xi:include href="32bit-core.xml"/>
|
||||||
|
</target>
|
@ -1,3 +1,20 @@
|
|||||||
|
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>
|
2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* Makefile.in (clean): Updated.
|
* Makefile.in (clean): Updated.
|
||||||
|
@ -219,6 +219,7 @@ clean:
|
|||||||
rm -f xml-builtin.c stamp-xml
|
rm -f xml-builtin.c stamp-xml
|
||||||
rm -f i386-avx.c i386-avx-linux.c
|
rm -f i386-avx.c i386-avx-linux.c
|
||||||
rm -f amd64-avx.c amd64-avx-linux.c
|
rm -f amd64-avx.c amd64-avx-linux.c
|
||||||
|
rm -f i386-mmx.c i386-mmx-linux.c
|
||||||
|
|
||||||
maintainer-clean realclean distclean: clean
|
maintainer-clean realclean distclean: clean
|
||||||
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
|
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
|
||||||
@ -359,6 +360,12 @@ i386-avx.c : $(srcdir)/../regformats/i386/i386-avx.dat $(regdat_sh)
|
|||||||
i386-avx-linux.o : i386-avx-linux.c $(regdef_h)
|
i386-avx-linux.o : i386-avx-linux.c $(regdef_h)
|
||||||
i386-avx-linux.c : $(srcdir)/../regformats/i386/i386-avx-linux.dat $(regdat_sh)
|
i386-avx-linux.c : $(srcdir)/../regformats/i386/i386-avx-linux.dat $(regdat_sh)
|
||||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-linux.dat i386-avx-linux.c
|
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-linux.dat i386-avx-linux.c
|
||||||
|
i386-mmx.o : i386-mmx.c $(regdef_h)
|
||||||
|
i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
|
||||||
|
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
|
||||||
|
i386-mmx-linux.o : i386-mmx-linux.c $(regdef_h)
|
||||||
|
i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
|
||||||
|
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx-linux.dat i386-mmx-linux.c
|
||||||
reg-ia64.o : reg-ia64.c $(regdef_h)
|
reg-ia64.o : reg-ia64.c $(regdef_h)
|
||||||
reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
|
reg-ia64.c : $(srcdir)/../regformats/reg-ia64.dat $(regdat_sh)
|
||||||
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
|
$(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-ia64.dat reg-ia64.c
|
||||||
|
@ -22,16 +22,16 @@
|
|||||||
# Default hostio_last_error implementation
|
# Default hostio_last_error implementation
|
||||||
srv_hostio_err_objs="hostio-errno.o"
|
srv_hostio_err_objs="hostio-errno.o"
|
||||||
|
|
||||||
srv_i386_regobj="i386.o i386-avx.o"
|
srv_i386_regobj="i386.o i386-avx.o i386-mmx.o"
|
||||||
srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o"
|
srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-mmx-linux.o"
|
||||||
srv_amd64_regobj="amd64.o x86-64-avx.o"
|
srv_amd64_regobj="amd64.o x86-64-avx.o"
|
||||||
srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o"
|
srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o"
|
||||||
|
|
||||||
srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml"
|
srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml"
|
||||||
srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml"
|
srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml"
|
||||||
srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml $srv_i386_32bit_xmlfiles"
|
srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
|
||||||
srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml $srv_i386_64bit_xmlfiles"
|
srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml $srv_i386_64bit_xmlfiles"
|
||||||
srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/32bit-linux.xml $srv_i386_32bit_xmlfiles"
|
srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml $srv_i386_32bit_xmlfiles"
|
||||||
srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml $srv_i386_64bit_xmlfiles"
|
srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/64bit-linux.xml $srv_i386_64bit_xmlfiles"
|
||||||
|
|
||||||
# Input is taken from the "${target}" variable.
|
# Input is taken from the "${target}" variable.
|
||||||
|
@ -37,6 +37,8 @@ void init_registers_amd64_linux (void);
|
|||||||
void init_registers_i386_avx_linux (void);
|
void init_registers_i386_avx_linux (void);
|
||||||
/* Defined in auto-generated file amd64-avx-linux.c. */
|
/* Defined in auto-generated file amd64-avx-linux.c. */
|
||||||
void init_registers_amd64_avx_linux (void);
|
void init_registers_amd64_avx_linux (void);
|
||||||
|
/* Defined in auto-generated file i386-mmx-linux.c. */
|
||||||
|
void init_registers_i386_mmx_linux (void);
|
||||||
|
|
||||||
/* Backward compatibility for gdb without XML support. */
|
/* Backward compatibility for gdb without XML support. */
|
||||||
|
|
||||||
@ -828,19 +830,56 @@ static int use_xml;
|
|||||||
static void
|
static void
|
||||||
x86_linux_update_xmltarget (void)
|
x86_linux_update_xmltarget (void)
|
||||||
{
|
{
|
||||||
|
int pid;
|
||||||
|
struct regset_info *regset;
|
||||||
static unsigned long long xcr0;
|
static unsigned long long xcr0;
|
||||||
static int have_ptrace_getregset = -1;
|
static int have_ptrace_getregset = -1;
|
||||||
|
#ifdef HAVE_PTRACE_GETFPXREGS
|
||||||
|
static int have_ptrace_getfpxregs = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!current_inferior)
|
if (!current_inferior)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pid = pid_of (get_thread_lwp (current_inferior));
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
if (num_xmm_registers == 8)
|
if (num_xmm_registers == 8)
|
||||||
init_registers_i386_linux ();
|
init_registers_i386_linux ();
|
||||||
else
|
else
|
||||||
init_registers_amd64_linux ();
|
init_registers_amd64_linux ();
|
||||||
#else
|
#else
|
||||||
init_registers_i386_linux ();
|
{
|
||||||
|
# ifdef HAVE_PTRACE_GETFPXREGS
|
||||||
|
if (have_ptrace_getfpxregs == -1)
|
||||||
|
{
|
||||||
|
elf_fpxregset_t fpxregs;
|
||||||
|
|
||||||
|
if (ptrace (PTRACE_GETFPXREGS, pid, 0, (int) &fpxregs) < 0)
|
||||||
|
{
|
||||||
|
have_ptrace_getfpxregs = 0;
|
||||||
|
x86_xcr0 = I386_XSTATE_X87_MASK;
|
||||||
|
|
||||||
|
/* Disable PTRACE_GETFPXREGS. */
|
||||||
|
for (regset = target_regsets;
|
||||||
|
regset->fill_function != NULL; regset++)
|
||||||
|
if (regset->get_request == PTRACE_GETFPXREGS)
|
||||||
|
{
|
||||||
|
regset->size = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
have_ptrace_getfpxregs = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!have_ptrace_getfpxregs)
|
||||||
|
{
|
||||||
|
init_registers_i386_mmx_linux ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
init_registers_i386_linux ();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!use_xml)
|
if (!use_xml)
|
||||||
@ -863,10 +902,8 @@ x86_linux_update_xmltarget (void)
|
|||||||
/* Check if XSAVE extended state is supported. */
|
/* Check if XSAVE extended state is supported. */
|
||||||
if (have_ptrace_getregset == -1)
|
if (have_ptrace_getregset == -1)
|
||||||
{
|
{
|
||||||
int pid = pid_of (get_thread_lwp (current_inferior));
|
|
||||||
unsigned long long xstateregs[I386_XSTATE_SSE_SIZE / sizeof (long long)];
|
unsigned long long xstateregs[I386_XSTATE_SSE_SIZE / sizeof (long long)];
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
struct regset_info *regset;
|
|
||||||
|
|
||||||
iov.iov_base = xstateregs;
|
iov.iov_base = xstateregs;
|
||||||
iov.iov_len = sizeof (xstateregs);
|
iov.iov_len = sizeof (xstateregs);
|
||||||
|
@ -150,7 +150,7 @@ int have_ptrace_getregs =
|
|||||||
for this to be a simple variable. */
|
for this to be a simple variable. */
|
||||||
int have_ptrace_getfpxregs =
|
int have_ptrace_getfpxregs =
|
||||||
#ifdef HAVE_PTRACE_GETFPXREGS
|
#ifdef HAVE_PTRACE_GETFPXREGS
|
||||||
1
|
-1
|
||||||
#else
|
#else
|
||||||
0
|
0
|
||||||
#endif
|
#endif
|
||||||
@ -946,19 +946,33 @@ i386_linux_child_post_startup_inferior (ptid_t ptid)
|
|||||||
static const struct target_desc *
|
static const struct target_desc *
|
||||||
i386_linux_read_description (struct target_ops *ops)
|
i386_linux_read_description (struct target_ops *ops)
|
||||||
{
|
{
|
||||||
|
int tid;
|
||||||
static uint64_t xcr0;
|
static uint64_t xcr0;
|
||||||
|
|
||||||
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
|
tid = TIDGET (inferior_ptid);
|
||||||
|
if (tid == 0)
|
||||||
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
#ifdef HAVE_PTRACE_GETFPXREGS
|
||||||
|
if (have_ptrace_getfpxregs == -1)
|
||||||
|
{
|
||||||
|
elf_fpxregset_t fpxregs;
|
||||||
|
|
||||||
|
if (ptrace (PTRACE_GETFPXREGS, tid, 0, (int) &fpxregs) < 0)
|
||||||
|
{
|
||||||
|
have_ptrace_getfpxregs = 0;
|
||||||
|
have_ptrace_getregset = 0;
|
||||||
|
return tdesc_i386_mmx_linux;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (have_ptrace_getregset == -1)
|
if (have_ptrace_getregset == -1)
|
||||||
{
|
{
|
||||||
int tid;
|
|
||||||
uint64_t xstateregs[(I386_XSTATE_SSE_SIZE / sizeof (uint64_t))];
|
uint64_t xstateregs[(I386_XSTATE_SSE_SIZE / sizeof (uint64_t))];
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
|
|
||||||
/* GNU/Linux LWP ID's are process ID's. */
|
|
||||||
tid = TIDGET (inferior_ptid);
|
|
||||||
if (tid == 0)
|
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
|
||||||
|
|
||||||
iov.iov_base = xstateregs;
|
iov.iov_base = xstateregs;
|
||||||
iov.iov_len = sizeof (xstateregs);
|
iov.iov_len = sizeof (xstateregs);
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "features/i386/i386-linux.c"
|
#include "features/i386/i386-linux.c"
|
||||||
|
#include "features/i386/i386-mmx-linux.c"
|
||||||
#include "features/i386/i386-avx-linux.c"
|
#include "features/i386/i386-avx-linux.c"
|
||||||
|
|
||||||
/* Supported register note sections. */
|
/* Supported register note sections. */
|
||||||
@ -616,6 +617,10 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
|
|||||||
if (section == NULL)
|
if (section == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
section = bfd_get_section_by_name (abfd, ".reg-xfp");
|
||||||
|
if (section == NULL)
|
||||||
|
return tdesc_i386_mmx_linux;
|
||||||
|
|
||||||
/* Linux/i386. */
|
/* Linux/i386. */
|
||||||
xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
|
xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
|
||||||
if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
|
if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
|
||||||
@ -890,5 +895,6 @@ _initialize_i386_linux_tdep (void)
|
|||||||
|
|
||||||
/* Initialize the Linux target description */
|
/* Initialize the Linux target description */
|
||||||
initialize_tdesc_i386_linux ();
|
initialize_tdesc_i386_linux ();
|
||||||
|
initialize_tdesc_i386_mmx_linux ();
|
||||||
initialize_tdesc_i386_avx_linux ();
|
initialize_tdesc_i386_avx_linux ();
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ extern uint64_t i386_linux_core_read_xcr0
|
|||||||
|
|
||||||
/* Linux target description. */
|
/* Linux target description. */
|
||||||
extern struct target_desc *tdesc_i386_linux;
|
extern struct target_desc *tdesc_i386_linux;
|
||||||
|
extern struct target_desc *tdesc_i386_mmx_linux;
|
||||||
extern struct target_desc *tdesc_i386_avx_linux;
|
extern struct target_desc *tdesc_i386_avx_linux;
|
||||||
|
|
||||||
/* Format of XSAVE extended state is:
|
/* Format of XSAVE extended state is:
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
#include "features/i386/i386.c"
|
#include "features/i386/i386.c"
|
||||||
#include "features/i386/i386-avx.c"
|
#include "features/i386/i386-avx.c"
|
||||||
|
#include "features/i386/i386-mmx.c"
|
||||||
|
|
||||||
/* Register names. */
|
/* Register names. */
|
||||||
|
|
||||||
@ -2937,8 +2938,8 @@ i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
|||||||
tdep->jb_pc_offset = 36;
|
tdep->jb_pc_offset = 36;
|
||||||
|
|
||||||
/* DJGPP does not support the SSE registers. */
|
/* DJGPP does not support the SSE registers. */
|
||||||
tdep->num_xmm_regs = 0;
|
if (! tdesc_has_registers (info.target_desc))
|
||||||
set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I387_NUM_REGS);
|
tdep->tdesc = tdesc_i386_mmx;
|
||||||
|
|
||||||
/* Native compiler is GCC, which uses the SVR4 register numbering
|
/* Native compiler is GCC, which uses the SVR4 register numbering
|
||||||
even in COFF and STABS. See the comment in i386_gdbarch_init,
|
even in COFF and STABS. See the comment in i386_gdbarch_init,
|
||||||
@ -6649,13 +6650,12 @@ i386_validate_tdesc_p (struct gdbarch_tdep *tdep,
|
|||||||
|
|
||||||
/* Get core registers. */
|
/* Get core registers. */
|
||||||
feature_core = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.core");
|
feature_core = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.core");
|
||||||
|
if (feature_core == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Get SSE registers. */
|
/* Get SSE registers. */
|
||||||
feature_sse = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.sse");
|
feature_sse = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.sse");
|
||||||
|
|
||||||
if (feature_core == NULL || feature_sse == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Try AVX registers. */
|
/* Try AVX registers. */
|
||||||
feature_avx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx");
|
feature_avx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx");
|
||||||
|
|
||||||
@ -6664,6 +6664,10 @@ i386_validate_tdesc_p (struct gdbarch_tdep *tdep,
|
|||||||
/* The XCR0 bits. */
|
/* The XCR0 bits. */
|
||||||
if (feature_avx)
|
if (feature_avx)
|
||||||
{
|
{
|
||||||
|
/* AVX register description requires SSE register description. */
|
||||||
|
if (!feature_sse)
|
||||||
|
return 0;
|
||||||
|
|
||||||
tdep->xcr0 = I386_XSTATE_AVX_MASK;
|
tdep->xcr0 = I386_XSTATE_AVX_MASK;
|
||||||
|
|
||||||
/* It may have been set by OSABI initialization function. */
|
/* It may have been set by OSABI initialization function. */
|
||||||
@ -6679,19 +6683,27 @@ i386_validate_tdesc_p (struct gdbarch_tdep *tdep,
|
|||||||
tdep->ymm0h_regnum + i,
|
tdep->ymm0h_regnum + i,
|
||||||
tdep->ymmh_register_names[i]);
|
tdep->ymmh_register_names[i]);
|
||||||
}
|
}
|
||||||
else
|
else if (feature_sse)
|
||||||
tdep->xcr0 = I386_XSTATE_SSE_MASK;
|
tdep->xcr0 = I386_XSTATE_SSE_MASK;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tdep->xcr0 = I386_XSTATE_X87_MASK;
|
||||||
|
tdep->num_xmm_regs = 0;
|
||||||
|
}
|
||||||
|
|
||||||
num_regs = tdep->num_core_regs;
|
num_regs = tdep->num_core_regs;
|
||||||
for (i = 0; i < num_regs; i++)
|
for (i = 0; i < num_regs; i++)
|
||||||
valid_p &= tdesc_numbered_register (feature_core, tdesc_data, i,
|
valid_p &= tdesc_numbered_register (feature_core, tdesc_data, i,
|
||||||
tdep->register_names[i]);
|
tdep->register_names[i]);
|
||||||
|
|
||||||
/* Need to include %mxcsr, so add one. */
|
if (feature_sse)
|
||||||
num_regs += tdep->num_xmm_regs + 1;
|
{
|
||||||
for (; i < num_regs; i++)
|
/* Need to include %mxcsr, so add one. */
|
||||||
valid_p &= tdesc_numbered_register (feature_sse, tdesc_data, i,
|
num_regs += tdep->num_xmm_regs + 1;
|
||||||
tdep->register_names[i]);
|
for (; i < num_regs; i++)
|
||||||
|
valid_p &= tdesc_numbered_register (feature_sse, tdesc_data, i,
|
||||||
|
tdep->register_names[i]);
|
||||||
|
}
|
||||||
|
|
||||||
return valid_p;
|
return valid_p;
|
||||||
}
|
}
|
||||||
@ -6732,15 +6744,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
and the SSE registers. This can be overridden for a specific ABI
|
and the SSE registers. This can be overridden for a specific ABI
|
||||||
by adjusting the members `st0_regnum', `mm0_regnum' and
|
by adjusting the members `st0_regnum', `mm0_regnum' and
|
||||||
`num_xmm_regs' of `struct gdbarch_tdep', otherwise the registers
|
`num_xmm_regs' of `struct gdbarch_tdep', otherwise the registers
|
||||||
will show up in the output of "info all-registers". Ideally we
|
will show up in the output of "info all-registers". */
|
||||||
should try to autodetect whether they are available, such that we
|
|
||||||
can prevent "info all-registers" from displaying registers that
|
|
||||||
aren't available.
|
|
||||||
|
|
||||||
NOTE: kevinb/2003-07-13: ... if it's a choice between printing
|
|
||||||
[the SSE registers] always (even when they don't exist) or never
|
|
||||||
showing them to the user (even when they do exist), I prefer the
|
|
||||||
former over the latter. */
|
|
||||||
|
|
||||||
tdep->st0_regnum = I386_ST0_REGNUM;
|
tdep->st0_regnum = I386_ST0_REGNUM;
|
||||||
|
|
||||||
@ -7039,6 +7043,7 @@ is \"default\"."),
|
|||||||
|
|
||||||
/* Initialize the standard target descriptions. */
|
/* Initialize the standard target descriptions. */
|
||||||
initialize_tdesc_i386 ();
|
initialize_tdesc_i386 ();
|
||||||
|
initialize_tdesc_i386_mmx ();
|
||||||
initialize_tdesc_i386_avx ();
|
initialize_tdesc_i386_avx ();
|
||||||
|
|
||||||
/* Tell remote stub that we support XML target description. */
|
/* Tell remote stub that we support XML target description. */
|
||||||
|
46
gdb/regformats/i386/i386-mmx-linux.dat
Normal file
46
gdb/regformats/i386/i386-mmx-linux.dat
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# DO NOT EDIT: generated from i386/i386-mmx-linux.xml
|
||||||
|
name:i386_mmx_linux
|
||||||
|
xmltarget:i386-mmx-linux.xml
|
||||||
|
expedite:ebp,esp,eip
|
||||||
|
32:eax
|
||||||
|
32:ecx
|
||||||
|
32:edx
|
||||||
|
32:ebx
|
||||||
|
32:esp
|
||||||
|
32:ebp
|
||||||
|
32:esi
|
||||||
|
32:edi
|
||||||
|
32:eip
|
||||||
|
32:eflags
|
||||||
|
32:cs
|
||||||
|
32:ss
|
||||||
|
32:ds
|
||||||
|
32:es
|
||||||
|
32:fs
|
||||||
|
32:gs
|
||||||
|
80:st0
|
||||||
|
80:st1
|
||||||
|
80:st2
|
||||||
|
80:st3
|
||||||
|
80:st4
|
||||||
|
80:st5
|
||||||
|
80:st6
|
||||||
|
80:st7
|
||||||
|
32:fctrl
|
||||||
|
32:fstat
|
||||||
|
32:ftag
|
||||||
|
32:fiseg
|
||||||
|
32:fioff
|
||||||
|
32:foseg
|
||||||
|
32:fooff
|
||||||
|
32:fop
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
0:
|
||||||
|
32:orig_eax
|
36
gdb/regformats/i386/i386-mmx.dat
Normal file
36
gdb/regformats/i386/i386-mmx.dat
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# DO NOT EDIT: generated from i386/i386-mmx.xml
|
||||||
|
name:i386_mmx
|
||||||
|
xmltarget:i386-mmx.xml
|
||||||
|
expedite:ebp,esp,eip
|
||||||
|
32:eax
|
||||||
|
32:ecx
|
||||||
|
32:edx
|
||||||
|
32:ebx
|
||||||
|
32:esp
|
||||||
|
32:ebp
|
||||||
|
32:esi
|
||||||
|
32:edi
|
||||||
|
32:eip
|
||||||
|
32:eflags
|
||||||
|
32:cs
|
||||||
|
32:ss
|
||||||
|
32:ds
|
||||||
|
32:es
|
||||||
|
32:fs
|
||||||
|
32:gs
|
||||||
|
80:st0
|
||||||
|
80:st1
|
||||||
|
80:st2
|
||||||
|
80:st3
|
||||||
|
80:st4
|
||||||
|
80:st5
|
||||||
|
80:st6
|
||||||
|
80:st7
|
||||||
|
32:fctrl
|
||||||
|
32:fstat
|
||||||
|
32:ftag
|
||||||
|
32:fiseg
|
||||||
|
32:fioff
|
||||||
|
32:foseg
|
||||||
|
32:fooff
|
||||||
|
32:fop
|
Reference in New Issue
Block a user