2 * Copyright (C) 2006 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
7 #include <sys/ptrace.h>
8 #define __FRAME_OFFSETS
9 #include <asm/ptrace.h>
10 #include "kern_constants.h"
14 int save_fp_registers(int pid, unsigned long *fp_regs)
16 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
21 int restore_fp_registers(int pid, unsigned long *fp_regs)
23 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
28 unsigned long get_thread_reg(int reg, jmp_buf *buf)
38 printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n",
44 int get_fp_registers(int pid, unsigned long *regs)
46 return save_fp_registers(pid, regs);
49 int put_fp_registers(int pid, unsigned long *regs)
51 return restore_fp_registers(pid, regs);