Lines Matching defs:rp

193 die(uint_t type, struct regs *rp, caddr_t addr, processorid_t cpuid)
210 ti.trap_regs = rp;
217 panic("BAD TRAP: type=%x (#%s %s) rp=%p addr=%p "
219 type, trap_mnemonic, trap_name, (void *)rp, (void *)addr,
220 mod_containing_pc((caddr_t)rp->r_pc),
225 panic("BAD TRAP: type=%x (#%s %s) rp=%p addr=%p",
226 type, trap_mnemonic, trap_name, (void *)rp, (void *)addr);
302 ldt_rewrite_syscall(struct regs *rp, proc_t *p, int syscall_insn)
309 if (linear_pc(rp, p, &linearpc) == 0) {
404 emulate_lsahf(struct regs *rp, uchar_t instr)
408 rp->r_ps = (rp->r_ps & ~0xff) |
409 ((rp->r_rax >> 8) & PSL_LSAHFMASK) | PS_MB1;
412 rp->r_rax = (rp->r_rax & ~0xff00) |
413 (((rp->r_ps & PSL_LSAHFMASK) | PS_MB1) << 8);
415 rp->r_pc += LSAHFSIZE;
465 trap(struct regs *rp, caddr_t addr, processorid_t cpuid)
492 type = rp->r_trapno;
498 errcode = rp->r_err;
501 else if ((caddr_t)rp->r_pc == addr ||
535 showregs(type, rp, addr);
537 if (USERMODE(rp->r_cs)) {
557 ASSERT(lwptoregs(lwp) == rp);
562 if ((caddr_t)rp->r_pc == addr)
588 (ulong_t)type, (ulong_t)rp);
600 showregs(type, rp, (caddr_t)0);
605 siginfo.si_addr = (caddr_t)rp->r_pc;
610 (void) die(type, rp, addr, cpuid);
623 rp->r_pc = ct->t_ontrap->ot_trampoline;
637 (void) die(type, rp, addr, cpuid);
651 (rp->r_ps & PS_ACHK) == 0) {
652 (void) die(type, rp, addr, cpuid);
702 uintptr_t rip = rp->r_pc;
710 rp->r_pc = rip;
725 caddr_t pc = (caddr_t)rp->r_pc;
739 (void *)rp->r_pc);
744 (void) die(type, rp, addr, cpuid);
749 (void) die(type, rp, addr, cpuid);
755 showregs(type, rp, addr);
756 traceregs(rp);
762 rp->r_r0 = res;
763 rp->r_pc = ct->t_lofault;
809 if (rp->r_pc <= 0xffffffff)
829 if (watchpage && addr == (caddr_t)rp->r_sp &&
830 rw == S_READ && instr_is_lcall_syscall((caddr_t)rp->r_pc)) {
833 rp->r_pc += LCALLSIZE;
839 if (!watchpage || (sz = instr_size(rp, &vaddr, rw)) <= 0)
845 watchcode, rp->r_pc);
853 siginfo.si_pc = (caddr_t)rp->r_pc;
859 if (rw != S_EXEC && pr_watch_emul(rp, vaddr, rw))
897 addr != (caddr_t)rp->r_pc &&
898 instr_is_prefetch((caddr_t)rp->r_pc)) {
902 (void *)rp->r_pc, p->p_pid);
909 showregs(type, rp, addr);
954 ldt_rewrite_syscall(rp, p, X86FSET_ASYSC))
963 instr_is_lsahf((caddr_t)rp->r_pc, &instr)) {
964 emulate_lsahf(rp, instr);
972 showregs(type, rp, (caddr_t)0);
975 siginfo.si_addr = (caddr_t)rp->r_pc;
981 showregs(type, rp, (caddr_t)0);
984 siginfo.si_addr = (caddr_t)rp->r_pc;
990 showregs(type, rp, (caddr_t)0);
993 siginfo.si_addr = (caddr_t)rp->r_pc;
999 showregs(type, rp, addr);
1000 if (fpnoextflt(rp)) {
1003 siginfo.si_addr = (caddr_t)rp->r_pc;
1012 if (rp->r_pc != (uintptr_t)ndptrap_frstor) {
1014 (void) die(type, rp, addr, cpuid);
1021 showregs(type, rp, addr);
1022 if (fpextovrflt(rp)) {
1025 siginfo.si_addr = (caddr_t)rp->r_pc;
1034 if (rp->r_pc != (uintptr_t)ndptrap_frstor) {
1036 (void) die(type, rp, addr, cpuid);
1044 showregs(type, rp, addr);
1045 if (sicode = fpexterrflt(rp)) {
1048 siginfo.si_addr = (caddr_t)rp->r_pc;
1055 showregs(type, rp, addr);
1065 siginfo.si_addr = (caddr_t)rp->r_pc;
1068 } else if ((sicode = fpsimderrflt(rp)) != 0) {
1071 siginfo.si_addr = (caddr_t)rp->r_pc;
1087 showregs(type, rp, (caddr_t)0);
1089 (void) die(type, rp, addr, cpuid);
1107 if (rp->r_pc == (uintptr_t)sys_sysenter ||
1108 rp->r_pc == (uintptr_t)brand_sys_sysenter) {
1118 if (rp->r_pc == (uintptr_t)sys_sysenter)
1119 rp->r_pc = (uintptr_t)
1122 rp->r_pc = (uintptr_t)
1127 else if (rp->r_pc == (uintptr_t)sys_call ||
1128 rp->r_pc == (uintptr_t)brand_sys_call) {
1135 showregs(type, rp, (caddr_t)0);
1138 rp->r_ps &= ~PS_T; /* turn off trace */
1149 (void) die(type, rp, addr, cpuid);
1190 showregs(type, rp, (caddr_t)0);
1191 rp->r_pc = ct->t_ontrap->ot_trampoline;
1205 showregs(type, rp, addr);
1206 traceregs(rp);
1208 rp->r_r0 = EFAULT;
1209 rp->r_pc = ct->t_lofault;
1231 showregs(type, rp, (caddr_t)0);
1232 rp->r_pc = ct->t_ontrap->ot_trampoline;
1239 showregs(type, rp, (caddr_t)0);
1240 if (kern_gpfault(rp))
1241 (void) die(type, rp, addr, cpuid);
1260 if (instr_is_lcall_syscall((caddr_t)rp->r_pc)) {
1276 * Since this is a not-present trap, rp->r_pc points to
1280 rp->r_pc += LCALLSIZE;
1281 lwp->lwp_regs = rp;
1307 ldt_rewrite_syscall(rp, p, X86FSET_SEP))
1316 showregs(type, rp, (caddr_t)0);
1319 siginfo.si_addr = (caddr_t)rp->r_pc;
1325 showregs(type, rp, (caddr_t)0);
1329 siginfo.si_addr = (caddr_t)rp->r_pc;
1335 showregs(type, rp, (caddr_t)0);
1341 rp->r_ps &= ~PS_T;
1353 siginfo.si_addr = (caddr_t)rp->r_pc;
1362 showregs(type, rp, (caddr_t)0);
1370 rp->r_pc--;
1373 siginfo.si_addr = (caddr_t)rp->r_pc;
1406 showregs(type, rp, (caddr_t)0);
1410 siginfo.si_addr = (caddr_t)rp->r_pc;
1450 profil_tick(rp->r_pc);
1467 deferred_singlestep_trap((caddr_t)rp->r_pc);
1534 rp->r_ps |= PS_T;
1538 rp->r_ps &= ~PS_T;
1696 showregs(uint_t type, struct regs *rp, caddr_t addr)
1720 USERMODE(rp->r_cs) ? "user": "kernel", (uintptr_t)addr);
1727 ttoproc(curthread)->p_pid : 0, rp->r_pc, rp->r_sp, rp->r_ps);
1750 dumpregs(rp);
1755 dumpregs(struct regs *rp)
1760 printf(fmt, "rdi", rp->r_rdi, "rsi", rp->r_rsi, "rdx", rp->r_rdx);
1761 printf(fmt, "rcx", rp->r_rcx, " r8", rp->r_r8, " r9", rp->r_r9);
1762 printf(fmt, "rax", rp->r_rax, "rbx", rp->r_rbx, "rbp", rp->r_rbp);
1763 printf(fmt, "r10", rp->r_r10, "r11", rp->r_r11, "r12", rp->r_r12);
1764 printf(fmt, "r13", rp->r_r13, "r14", rp->r_r14, "r15", rp->r_r15);
1767 " ds", rp->r_ds);
1768 printf(fmt, " es", rp->r_es, " fs", rp->r_fs, " gs", rp->r_gs);
1770 printf(fmt, "trp", rp->r_trapno, "err", rp->r_err, "rip", rp->r_rip);
1771 printf(fmt, " cs", rp->r_cs, "rfl", rp->r_rfl, "rsp", rp->r_rsp);
1773 printf("\t%3s: %16lx\n", " ss", rp->r_ss);
1778 printf(fmt, " gs", rp->r_gs, " fs", rp->r_fs,
1779 " es", rp->r_es, " ds", rp->r_ds);
1780 printf(fmt, "edi", rp->r_edi, "esi", rp->r_esi,
1781 "ebp", rp->r_ebp, "esp", rp->r_esp);
1782 printf(fmt, "ebx", rp->r_ebx, "edx", rp->r_edx,
1783 "ecx", rp->r_ecx, "eax", rp->r_eax);
1784 printf(fmt, "trp", rp->r_trapno, "err", rp->r_err,
1785 "eip", rp->r_eip, " cs", rp->r_cs);
1787 "efl", rp->r_efl, "usp", rp->r_uesp, " ss", rp->r_ss);
1891 kern_gpfault(struct regs *rp)
1897 caddr_t pc = (caddr_t)rp->r_pc;
1939 bcopy(rp, trp, offsetof(struct regs, r_pc));
1945 ASSERT(trp->r_err == rp->r_err);
1967 ASSERT((caddr_t)trp == (caddr_t)rp->r_sp);
1991 trp->r_trapno = rp->r_trapno;
1992 trp->r_err = rp->r_err;