Lines Matching refs:regs
390 pub extern "C" fn do_signal(regs: &mut pt_regs) { in do_signal()
392 if current_pcb().sig_pending.signal == 0 || (!user_mode(regs)) { in do_signal()
403 let (sig_number, info, ka) = get_signal_to_deliver(regs.clone()); in do_signal()
413 let res = handle_signal(sig_number, ka.unwrap(), &info.unwrap(), &oldset, regs); in do_signal()
583 regs: &mut pt_regs, in handle_signal()
586 let retval = setup_frame(sig, ka, info, oldset, regs); in handle_signal()
601 regs: &mut pt_regs, in setup_frame()
604 let frame: *mut sigframe = get_stack(ka, ®s, size_of::<sigframe>()); in setup_frame()
638 err |= setup_sigcontext(unsafe { &mut (*frame).context }, oldset, ®s).unwrap_or(1); in setup_frame()
661 regs.rdi = sig as u64; in setup_frame()
662 regs.rsi = unsafe { &(*frame).info as *const siginfo as u64 }; in setup_frame()
663 regs.rsp = frame as u64; in setup_frame()
664 regs.rip = unsafe { ka._u._sa_handler }; in setup_frame()
669 if regs.rip >= USER_MAX_LINEAR_ADDR { in setup_frame()
676 regs.rip = 0; in setup_frame()
680 regs.cs = (USER_CS | 0x3) as u64; in setup_frame()
681 regs.ds = (USER_DS | 0x3) as u64; in setup_frame()
691 fn get_stack(_ka: &sigaction, regs: &pt_regs, size: usize) -> *mut sigframe { in get_stack()
693 let mut rsp: usize = (regs.rsp as usize) - 128 - size; in get_stack()
727 regs: &pt_regs, in setup_sigcontext()
732 context.regs = regs.clone(); in setup_sigcontext()
746 fn restore_sigcontext(context: *const sigcontext, regs: &mut pt_regs) -> bool { in restore_sigcontext()
749 *regs = (*context).regs; in restore_sigcontext()
870 pub fn sys_rt_sigreturn(regs: &mut pt_regs) -> u64 { in sys_rt_sigreturn()
871 let frame = regs.rsp as usize as *mut sigframe; in sys_rt_sigreturn()
886 if restore_sigcontext(unsafe { &mut (*frame).context }, regs) == false { in sys_rt_sigreturn()
895 return regs.rax; in sys_rt_sigreturn()