#define GETREGS_SUPPLIES(regnum) \
((0 <= (regnum) && (regnum) <= 15))
-#ifdef HAVE_PT_GETXMMREGS
/* Set to 1 if the kernel supports PT_GETXMMREGS. Initialized to -1
so that we try PT_GETXMMREGS the first time around. */
static int have_ptrace_xmmregs = -1;
-#endif
\f
/* Supply the general-purpose registers in GREGS, to REGCACHE. */
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
{
struct fpreg fpregs;
-#ifdef HAVE_PT_GETXMMREGS
char xmmregs[512];
if (have_ptrace_xmmregs != 0
else
{
have_ptrace_xmmregs = 0;
-#endif
if (gdb_ptrace (PT_GETFPREGS, ptid,
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
i387_supply_fsave (regcache, -1, &fpregs);
-#ifdef HAVE_PT_GETXMMREGS
}
-#endif
}
}
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
{
struct fpreg fpregs;
-#ifdef HAVE_PT_GETXMMREGS
char xmmregs[512];
if (have_ptrace_xmmregs != 0
else
{
have_ptrace_xmmregs = 0;
-#endif
if (gdb_ptrace (PT_GETFPREGS, ptid,
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
if (gdb_ptrace (PT_SETFPREGS, ptid,
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
-#ifdef HAVE_PT_GETXMMREGS
}
-#endif
}
}