2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
7 #include <asm/sigcontext.h>
9 #include "sysdep/frame.h"
11 int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data)
13 struct arch_frame_data *arch = data;
14 struct sigcontext *to = to_ptr, *from = from_ptr;
15 struct _fpstate *to_fp, *from_fp;
20 from_fp = from->fpstate;
22 err = copy_from_user_proc(to, from, sizeof(*to));
25 err |= copy_from_user_proc(&to->fpstate, &to_fp,
27 err |= copy_from_user_proc(to_fp, from_fp, arch->fpstate_size);
32 int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, void *data)
34 struct arch_frame_data *arch = data;
35 struct sigcontext *to = to_ptr, *from = from_ptr;
36 struct _fpstate *to_fp, *from_fp;
39 to_fp = (struct _fpstate *)
40 (fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to)));
41 from_fp = from->fpstate;
42 err = copy_to_user_proc(to, from, sizeof(*to));
44 err |= copy_to_user_proc(&to->fpstate, &to_fp,
46 err |= copy_to_user_proc(to_fp, from_fp, arch->fpstate_size);
52 * Overrides for Emacs so that we follow Linus's tabbing style.
53 * Emacs will notice this stuff at the end of the file and automatically
54 * adjust the settings for this buffer only. This must remain at the end
56 * ---------------------------------------------------------------------------
58 * c-file-style: "linux"