]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/os-Linux/sys-i386/registers.c
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / arch / um / os-Linux / sys-i386 / registers.c
index f74d853a0ee02372af46d4ab4ae244242a19ea4f..229f7a53d8dad95279798105eaa28fc81daa53e9 100644 (file)
@@ -5,6 +5,8 @@
  */
 
 #include <errno.h>
+#include <sys/ptrace.h>
+#include <sys/user.h>
 #include "kern_constants.h"
 #include "longjmp.h"
 #include "user.h"
@@ -56,12 +58,28 @@ unsigned long get_thread_reg(int reg, jmp_buf *buf)
 
 int have_fpx_regs = 1;
 
+int get_fp_registers(int pid, unsigned long *regs)
+{
+       if (have_fpx_regs)
+               return save_fpx_registers(pid, regs);
+       else
+               return save_fp_registers(pid, regs);
+}
+
+int put_fp_registers(int pid, unsigned long *regs)
+{
+       if (have_fpx_regs)
+               return restore_fpx_registers(pid, regs);
+       else
+               return restore_fp_registers(pid, regs);
+}
+
 void arch_init_registers(int pid)
 {
-       unsigned long fpx_regs[HOST_XFP_SIZE];
+       struct user_fpxregs_struct fpx_regs;
        int err;
 
-       err = ptrace(PTRACE_GETFPXREGS, pid, 0, fpx_regs);
+       err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs);
        if (!err)
                return;