14 #include <linux/kernel.h>
19 #include <asm/ucontext.h>
20 #include <asm/cacheflush.h>
27 #define RETCODE_SIZE (9 << 2)
43 #define COPY(x) (err |= __get_user(regs->x, &sc->sc_##x))
81 frame = (
struct rt_sigframe __user *) ((
unsigned long) regs->
sp + 8);
90 if (restore_sigcontext(regs, &frame->
uc.uc_mcontext))
108 #define COPY(x) (err |= __put_user(regs->x, &sc->sc_##x))
132 unsigned long framesize)
134 unsigned long sp = regs->
sp;
139 if ((ka->
sa.sa_flags &
SA_ONSTACK) && sas_ss_flags(sp) == 0)
146 return (
void __user *)((sp - framesize) & ~7);
156 frame = get_sigframe(ka, regs,
sizeof(*frame));
168 err |= setup_sigcontext(&frame->
uc.uc_mcontext, regs,
set->sig[0]);
199 regs->
sp = (
unsigned long) frame - 8;
200 regs->
b3 = (
unsigned long) retcode;
201 regs->
pc = (
unsigned long) ka->
sa.sa_handler;
211 regs->b4 = (
unsigned long)&frame->
info;
212 regs->a6 = (
unsigned long)&frame->
uc;
239 regs->a4 = regs->orig_a4;
248 static void handle_signal(
int sig,
269 regs->a4 = regs->orig_a4;
275 if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs) < 0)
296 handle_signal(signr, &info, &ka, regs, syscall);
307 regs->a4 = regs->orig_a4;
312 regs->a4 = regs->orig_a4;
321 restore_saved_sigmask();
337 tracehook_notify_resume(regs);