void restore_registers(int pid, union uml_pt_regs *regs) { int err; err = move_registers(pid, PTRACE_SETREGS, PTRACE_SETFPREGS, regs); if(err) panic("restore_registers - saving registers failed, " "errno = %d\n", -err); }
void restore_registers(int pid, union uml_pt_regs *regs) { unsigned long *fp_regs; int err, fp_op; if(have_fpx_regs){ fp_op = PTRACE_SETFPXREGS; fp_regs = regs->skas.xfp; } else { fp_op = PTRACE_SETFPREGS; fp_regs = regs->skas.fp; } err = move_registers(pid, PTRACE_SETREGS, regs, fp_op, fp_regs); if(err) panic("restore_registers - saving registers failed, " "errno = %d\n", -err); }
void save_registers(union uml_pt_regs *regs) { unsigned long *fp_regs; int err, fp_op; if(have_fpx_regs){ fp_op = PTRACE_GETFPXREGS; fp_regs = regs->skas.xfp; } else { fp_op = PTRACE_GETFPREGS; fp_regs = regs->skas.fp; } err = move_registers(PTRACE_GETREGS, fp_op, regs, fp_regs); if(err) panic("save_registers - saving registers failed, errno = %d\n", err); }