aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-04 20:57:29 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-04 20:57:29 +0000
commitb87bc0d80e4efe7283f46cc194b1b6ed7548ceec (patch)
tree8883507305fe38bb45f40e7f0d80ae4f15d2f296 /gdb
parent84367a3eeac2bc96e2b0c461f285e02bf701a0d1 (diff)
downloadgdb-b87bc0d80e4efe7283f46cc194b1b6ed7548ceec.zip
gdb-b87bc0d80e4efe7283f46cc194b1b6ed7548ceec.tar.gz
gdb-b87bc0d80e4efe7283f46cc194b1b6ed7548ceec.tar.bz2
* i387-tdep.c (i387_supply_fsave): Provide summy values for the
SSE registers.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/i387-tdep.c20
2 files changed, 21 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 35d8fb9..d1e53c8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2004-08-04 Mark Kettenis <kettenis@gnu.org>
+ * i387-tdep.c (i387_supply_fsave): Provide summy values for the
+ SSE registers.
+
* Makefile.in: Remove embedded page breaks.
2004-08-04 Jim Blandy <jimb@redhat.com>
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 0e60a13..003818c 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -390,9 +390,11 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
- /* Define I387_ST0_REGNUM such that we use the proper definitions
- for REGCACHE's architecture. */
+ /* Define I387_ST0_REGNUM and I387_NUM_XMM_REGS such that we use the
+ proper definitions for REGCACHE's architecture. */
+
#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
for (i = I387_ST0_REGNUM; i < I387_XMM0_REGNUM; i++)
if (regnum == -1 || regnum == i)
@@ -419,7 +421,21 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
else
regcache_raw_supply (regcache, i, FSAVE_ADDR (regs, i));
}
+
+ /* Provide dummy values for the SSE registers. */
+ for (i = I387_XMM0_REGNUM; i < I387_MXCSR_REGNUM; i++)
+ if (regnum == -1 || regnum == i)
+ regcache_raw_supply (regcache, i, NULL);
+ if (regnum == -1 || regnum == I387_MXCSR_REGNUM)
+ {
+ char buf[4];
+
+ store_unsigned_integer (buf, 4, 0x1f80);
+ regcache_raw_supply (regcache, I387_MXCSR_REGNUM, buf);
+ }
+
#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE