break;
}
- get_frame_register (frame, (fpreg + 8 - top) % 8 + I387_ST0_REGNUM (tdep),
+ get_frame_register (frame,
+ (fpreg + 8 - top) % 8 + I387_ST0_REGNUM (tdep),
raw);
fputs_filtered ("0x", file);
needs any special handling. */
int
-i387_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
+i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
+ struct type *type)
{
if (i386_fp_regnum_p (gdbarch, regnum))
{
/* Read a value of type TYPE from register REGNUM in frame FRAME, and
return its contents in TO. */
-void
+int
i387_register_to_value (struct frame_info *frame, int regnum,
- struct type *type, gdb_byte *to)
+ struct type *type, gdb_byte *to,
+ int *optimizedp, int *unavailablep)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
gdb_byte from[I386_MAX_REGISTER_SIZE];
{
warning (_("Cannot convert floating-point register value "
"to non-floating-point type."));
- return;
+ *optimizedp = *unavailablep = 0;
+ return 0;
}
/* Convert to TYPE. */
- get_frame_register (frame, regnum, from);
+ if (!get_frame_register_bytes (frame, regnum, 0, TYPE_LENGTH (type),
+ from, optimizedp, unavailablep))
+ return 0;
+
convert_typed_floating (from, i387_ext_type (gdbarch), to, type);
+ *optimizedp = *unavailablep = 0;
+ return 1;
}
/* Write the contents FROM of a value of type TYPE into register
if (val[0] & (1 << fpreg))
{
- int regnum = (fpreg + 8 - top) % 8
- + I387_ST0_REGNUM (tdep);
- tag = i387_tag (FXSAVE_ADDR (tdep, regs, regnum));
+ int thisreg = (fpreg + 8 - top) % 8
+ + I387_ST0_REGNUM (tdep);
+ tag = i387_tag (FXSAVE_ADDR (tdep, regs, thisreg));
}
else
tag = 3; /* Empty */
return;
case all:
- /* Hanle the upper YMM registers. */
+ /* Handle the upper YMM registers. */
if ((tdep->xcr0 & I386_XSTATE_AVX))
{
if ((clear_bv & I386_XSTATE_AVX))
if (val[0] & (1 << fpreg))
{
- int regnum = (fpreg + 8 - top) % 8
+ int thisreg = (fpreg + 8 - top) % 8
+ I387_ST0_REGNUM (tdep);
- tag = i387_tag (FXSAVE_ADDR (tdep, regs, regnum));
+ tag = i387_tag (FXSAVE_ADDR (tdep, regs, thisreg));
}
else
tag = 3; /* Empty */
gdb_byte raw[I386_MAX_REGISTER_SIZE];
gdb_byte *xstate_bv_p = XSAVE_XSTATE_BV_ADDR (regs);
unsigned int xstate_bv = 0;
- /* The supported bits in `xstat_bv' are 1 byte. */
+ /* The supported bits in `xstat_bv' are 1 byte. */
unsigned int clear_bv = (~(*xstate_bv_p)) & tdep->xcr0;
gdb_byte *p;