diff options
author | Mark Kettenis <kettenis@gnu.org> | 2006-01-21 20:59:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2006-01-21 20:59:50 +0000 |
commit | 878d91936fddadb1fa647386134bf65b0712ea08 (patch) | |
tree | 4c58ccbe945864e099455460c4101533e91d9cbc | |
parent | 67d78caad5228c04e198e8e5d96dc27fdc28adb9 (diff) | |
download | gdb-878d91936fddadb1fa647386134bf65b0712ea08.zip gdb-878d91936fddadb1fa647386134bf65b0712ea08.tar.gz gdb-878d91936fddadb1fa647386134bf65b0712ea08.tar.bz2 |
* i386-tdep.c (i386_mxcsr_type): New variable.
(i386_init_types): Initialize i386_mxcsr_type.
(i386_register_type): Return i386_mxcsr_type for %mxcsr.
* i386-tdep.c (i386_mxcsr_type): New extern.
* amd64-tdep.c (amd64_register_info): Return i386_mxcsr_type for
%mxcsr.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 31 | ||||
-rw-r--r-- | gdb/i386-tdep.h | 1 |
4 files changed, 40 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc1c223..3e7f38a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2006-01-21 Mark Kettenis <kettenis@gnu.org> + + * i386-tdep.c (i386_mxcsr_type): New variable. + (i386_init_types): Initialize i386_mxcsr_type. + (i386_register_type): Return i386_mxcsr_type for %mxcsr. + * i386-tdep.c (i386_mxcsr_type): New extern. + * amd64-tdep.c (amd64_register_info): Return i386_mxcsr_type for + %mxcsr. + 2006-01-20 Mark Mitchell <mark@codesourcery.com> * Makefile.in (remote-rdi.o): Remove. diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 1bea297..31a1281 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -121,7 +121,7 @@ static struct amd64_register_info const amd64_register_info[] = { "xmm13", &i386_sse_type }, { "xmm14", &i386_sse_type }, { "xmm15", &i386_sse_type }, - { "mxcsr", &builtin_type_int32 } + { "mxcsr", &i386_mxcsr_type } }; /* Total number of registers. */ diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 6b437c5..1ef1bb8 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1530,6 +1530,7 @@ struct type *i386_eflags_type; /* Types for the MMX and SSE registers. */ struct type *i386_mmx_type; struct type *i386_sse_type; +struct type *i386_mxcsr_type; /* Construct types for ISA-specific registers. */ static void @@ -1602,6 +1603,23 @@ i386_init_types (void) TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; TYPE_NAME (type) = "builtin_type_vec128i"; i386_sse_type = type; + + type = init_flags_type ("builtin_type_i386_mxcsr", 4); + append_flags_type_flag (type, 0, "IE"); + append_flags_type_flag (type, 1, "DE"); + append_flags_type_flag (type, 2, "ZE"); + append_flags_type_flag (type, 3, "OE"); + append_flags_type_flag (type, 4, "UE"); + append_flags_type_flag (type, 5, "PE"); + append_flags_type_flag (type, 6, "DAZ"); + append_flags_type_flag (type, 7, "IM"); + append_flags_type_flag (type, 8, "DM"); + append_flags_type_flag (type, 9, "ZM"); + append_flags_type_flag (type, 10, "OM"); + append_flags_type_flag (type, 11, "UM"); + append_flags_type_flag (type, 12, "PM"); + append_flags_type_flag (type, 15, "FZ"); + i386_mxcsr_type = type; } /* Return the GDB type object for the "standard" data type of data in @@ -1623,11 +1641,20 @@ i386_register_type (struct gdbarch *gdbarch, int regnum) if (i386_fp_regnum_p (regnum)) return builtin_type_i387_ext; + if (i386_mmx_regnum_p (gdbarch, regnum)) + return i386_mmx_type; + if (i386_sse_regnum_p (gdbarch, regnum)) return i386_sse_type; - if (i386_mmx_regnum_p (gdbarch, regnum)) - return i386_mmx_type; +#define I387_ST0_REGNUM I386_ST0_REGNUM +#define I387_NUM_XMM_REGS (gdbarch_tdep (current_gdbarch)->num_xmm_regs) + + if (regnum == I387_MXCSR_REGNUM) + return i386_mxcsr_type; + +#undef I387_ST0_REGNUM +#undef I387_NUM_XMM_REGS return builtin_type_int; } diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 6419086..7fceae0 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -154,6 +154,7 @@ enum i386_regnum extern struct type *i386_eflags_type; extern struct type *i386_mmx_type; extern struct type *i386_sse_type; +extern struct type *i386_mxcsr_type; /* Segment selectors. */ #define I386_SEL_RPL 0x0003 /* Requester's Privilege Level mask. */ |