+2002-05-12 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_supply_fxsave): Skip the SSE registers if
+ the're not supported by the current architecture.
+ (i387_fill_fxsave): Likewise.
+
2002-05-12 Fred Fish <fnf@redhat.com>
* symfile.c (default_symfile_offsets): Arrange for uninitialized
/* Intel 387 floating point stuff.
- Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1998, 1999, 2000,
+ 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
void
i387_supply_fxsave (char *fxsave)
{
- int i;
+ int i, last_regnum = MXCSR_REGNUM;
+
+ if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
+ last_regnum = FOP_REGNUM;
- for (i = FP0_REGNUM; i <= MXCSR_REGNUM; i++)
+ for (i = FP0_REGNUM; i <= last_regnum; i++)
{
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
void
i387_fill_fxsave (char *fxsave, int regnum)
{
- int i;
+ int i, last_regnum = MXCSR_REGNUM;
+
+ if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
+ last_regnum = FOP_REGNUM;
- for (i = FP0_REGNUM; i <= MXCSR_REGNUM; i++)
+ for (i = FP0_REGNUM; i <= last_regnum; i++)
if (regnum == -1 || regnum == i)
{
/* Most of the FPU control registers occupy only 16 bits in