Lines Matching refs:regs

36 #define REF_REG_RET regs->regs[REG_RET]
37 #define REF_REG_SP regs->regs[REG_SP]
38 #define DEREF_REG_PR regs->regs[REG_PR]
44 asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
89 struct pt_regs * regs) in sys_sigsuspend() argument
104 regs->pc += 4; /* because sys_sigreturn decrements the pc */ in sys_sigsuspend()
105 if (do_signal (regs, &saveset)) in sys_sigsuspend()
108 regs->pc -= 4; in sys_sigsuspend()
118 struct pt_regs * regs) in sys_rt_sigsuspend() argument
139 regs->pc += 4; /* because sys_sigreturn decrements the pc */ in sys_rt_sigsuspend()
140 if (do_signal (regs, &saveset)) in sys_rt_sigsuspend()
143 regs->pc -= 4; in sys_rt_sigsuspend()
185 struct pt_regs * regs) in sys_sigaltstack() argument
213 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext *sc) in restore_sigcontext_fpu() argument
225 regs->sr |= SR_FD; in restore_sigcontext_fpu()
235 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext *sc) in setup_sigcontext_fpu() argument
250 regs->sr |= SR_FD; in setup_sigcontext_fpu()
261 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext *sc) in restore_sigcontext_fpu() argument
264 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext *sc) in setup_sigcontext_fpu() argument
269 restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, long long *r2_p) in restore_sigcontext() argument
273 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) in restore_sigcontext()
275 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); in restore_sigcontext()
276 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); in restore_sigcontext()
277 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); in restore_sigcontext()
278 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); in restore_sigcontext()
279 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); in restore_sigcontext()
280 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); in restore_sigcontext()
281 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); in restore_sigcontext()
282 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); in restore_sigcontext()
283 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); in restore_sigcontext()
284 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); in restore_sigcontext()
285 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); in restore_sigcontext()
286 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); in restore_sigcontext()
287 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); in restore_sigcontext()
288 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); in restore_sigcontext()
289 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); in restore_sigcontext()
290 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); in restore_sigcontext()
299 err |= restore_sigcontext_fpu(regs, sc); in restore_sigcontext()
301 regs->syscall_nr = -1; /* disable syscall checks */ in restore_sigcontext()
309 struct pt_regs * regs) in sys_sigreturn() argument
331 if (restore_sigcontext(regs, &frame->sc, &ret)) in sys_sigreturn()
333 regs->pc -= 4; in sys_sigreturn()
345 struct pt_regs * regs) in sys_rt_sigreturn() argument
364 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ret)) in sys_rt_sigreturn()
366 regs->pc -= 4; in sys_rt_sigreturn()
386 setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, in setup_sigcontext() argument
392 err |= setup_sigcontext_fpu(regs, sc); in setup_sigcontext()
394 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x) in setup_sigcontext()
396 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); in setup_sigcontext()
397 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); in setup_sigcontext()
398 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); in setup_sigcontext()
399 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); in setup_sigcontext()
400 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); in setup_sigcontext()
401 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); in setup_sigcontext()
402 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); in setup_sigcontext()
403 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); in setup_sigcontext()
404 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); in setup_sigcontext()
405 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); in setup_sigcontext()
406 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); in setup_sigcontext()
407 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); in setup_sigcontext()
408 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); in setup_sigcontext()
409 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); in setup_sigcontext()
410 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); in setup_sigcontext()
411 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); in setup_sigcontext()
439 sigset_t *set, struct pt_regs *regs) in setup_frame() argument
445 frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame)); in setup_frame()
456 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); in setup_frame()
509 regs->regs[REG_SP] = (unsigned long) frame; in setup_frame()
510 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ? in setup_frame()
511 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP]; in setup_frame()
512 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ in setup_frame()
513 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc; in setup_frame()
514 regs->pc = (unsigned long) ka->sa.sa_handler; in setup_frame()
515 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc; in setup_frame()
524 regs->pc >> 32, regs->pc & 0xffffffff, in setup_frame()
537 sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument
543 frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame)); in setup_rt_frame()
567 err |= __put_user(sas_ss_flags(regs->regs[REG_SP]), in setup_rt_frame()
571 regs, set->sig[0]); in setup_rt_frame()
616 regs->regs[REG_SP] = (unsigned long) frame; in setup_rt_frame()
617 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ? in setup_rt_frame()
618 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP]; in setup_rt_frame()
619 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */ in setup_rt_frame()
620 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext; in setup_rt_frame()
621 regs->pc = (unsigned long) ka->sa.sa_handler; in setup_rt_frame()
622 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc; in setup_rt_frame()
631 regs->pc >> 32, regs->pc & 0xffffffff, in setup_rt_frame()
649 siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) in handle_signal() argument
652 if (regs->syscall_nr >= 0) { in handle_signal()
654 switch (regs->regs[REG_RET]) { in handle_signal()
656 regs->regs[REG_RET] = -EINTR; in handle_signal()
661 regs->regs[REG_RET] = -EINTR; in handle_signal()
667 regs->regs[REG_RET] = regs->syscall_nr; in handle_signal()
668 regs->pc -= 4; in handle_signal()
674 setup_rt_frame(sig, ka, info, oldset, regs); in handle_signal()
676 setup_frame(sig, ka, oldset, regs); in handle_signal()
699 int do_signal(struct pt_regs *regs, sigset_t *oldset) in do_signal() argument
710 if (!user_mode(regs)) in do_signal()
794 if (do_coredump(signr, regs)) in do_signal()
805 handle_signal(signr, ka, &info, oldset, regs); in do_signal()
810 if (regs->syscall_nr >= 0) { in do_signal()
812 if (regs->regs[REG_RET] == -ERESTARTNOHAND || in do_signal()
813 regs->regs[REG_RET] == -ERESTARTSYS || in do_signal()
814 regs->regs[REG_RET] == -ERESTARTNOINTR) { in do_signal()
816 regs->regs[REG_RET] = regs->syscall_nr; in do_signal()
817 regs->pc -= 4; in do_signal()