2 * Copyright (C) 2004 PathScale, Inc
3 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 * Licensed under the GPL
8 #include "kern_constants.h"
11 #include "sysdep/ptrace_user.h"
13 int save_fp_registers(int pid
, unsigned long *fp_regs
)
15 if (ptrace(PTRACE_GETFPREGS
, pid
, 0, fp_regs
) < 0)
20 int restore_fp_registers(int pid
, unsigned long *fp_regs
)
22 if (ptrace(PTRACE_SETFPREGS
, pid
, 0, fp_regs
) < 0)
27 int save_fpx_registers(int pid
, unsigned long *fp_regs
)
29 if (ptrace(PTRACE_GETFPXREGS
, pid
, 0, fp_regs
) < 0)
34 int restore_fpx_registers(int pid
, unsigned long *fp_regs
)
36 if (ptrace(PTRACE_SETFPXREGS
, pid
, 0, fp_regs
) < 0)
41 unsigned long get_thread_reg(int reg
, jmp_buf *buf
)
51 printk(UM_KERN_ERR
"get_thread_regs - unknown register %d\n",
57 int have_fpx_regs
= 1;
59 <<<<<<< HEAD
:arch
/um
/os
-Linux
/sys
-i386
/registers
.c
61 int get_fp_registers(int pid
, unsigned long *regs
)
64 return save_fpx_registers(pid
, regs
);
66 return save_fp_registers(pid
, regs
);
69 int put_fp_registers(int pid
, unsigned long *regs
)
72 return restore_fpx_registers(pid
, regs
);
74 return restore_fp_registers(pid
, regs
);
77 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/um
/os
-Linux
/sys
-i386
/registers
.c
78 void arch_init_registers(int pid
)
80 unsigned long fpx_regs
[HOST_XFP_SIZE
];
83 err
= ptrace(PTRACE_GETFPXREGS
, pid
, 0, fpx_regs
);
88 panic("check_ptrace : PTRACE_GETFPXREGS failed, errno = %d",