Lines Matching refs:lwp

93 prgetprregs(klwp_t *lwp, prgregset_t prp)  in prgetprregs()  argument
97 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prgetprregs()
99 getgregs(lwp, gr); in prgetprregs()
123 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) { in prgetprregs()
124 prp[R_L0] = lwp->lwp_pcb.pcb_xregs.rw_local[0]; in prgetprregs()
125 prp[R_L1] = lwp->lwp_pcb.pcb_xregs.rw_local[1]; in prgetprregs()
126 prp[R_L2] = lwp->lwp_pcb.pcb_xregs.rw_local[2]; in prgetprregs()
127 prp[R_L3] = lwp->lwp_pcb.pcb_xregs.rw_local[3]; in prgetprregs()
128 prp[R_L4] = lwp->lwp_pcb.pcb_xregs.rw_local[4]; in prgetprregs()
129 prp[R_L5] = lwp->lwp_pcb.pcb_xregs.rw_local[5]; in prgetprregs()
130 prp[R_L6] = lwp->lwp_pcb.pcb_xregs.rw_local[6]; in prgetprregs()
131 prp[R_L7] = lwp->lwp_pcb.pcb_xregs.rw_local[7]; in prgetprregs()
133 prp[R_I0] = lwp->lwp_pcb.pcb_xregs.rw_in[0]; in prgetprregs()
134 prp[R_I1] = lwp->lwp_pcb.pcb_xregs.rw_in[1]; in prgetprregs()
135 prp[R_I2] = lwp->lwp_pcb.pcb_xregs.rw_in[2]; in prgetprregs()
136 prp[R_I3] = lwp->lwp_pcb.pcb_xregs.rw_in[3]; in prgetprregs()
137 prp[R_I4] = lwp->lwp_pcb.pcb_xregs.rw_in[4]; in prgetprregs()
138 prp[R_I5] = lwp->lwp_pcb.pcb_xregs.rw_in[5]; in prgetprregs()
139 prp[R_I6] = lwp->lwp_pcb.pcb_xregs.rw_in[6]; in prgetprregs()
140 prp[R_I7] = lwp->lwp_pcb.pcb_xregs.rw_in[7]; in prgetprregs()
155 prsetprregs(klwp_t *lwp, prgregset_t prp, int initial) in prsetprregs() argument
176 lwp->lwp_pcb.pcb_xregs.rw_local[0] = prp[R_L0]; in prsetprregs()
177 lwp->lwp_pcb.pcb_xregs.rw_local[1] = prp[R_L1]; in prsetprregs()
178 lwp->lwp_pcb.pcb_xregs.rw_local[2] = prp[R_L2]; in prsetprregs()
179 lwp->lwp_pcb.pcb_xregs.rw_local[3] = prp[R_L3]; in prsetprregs()
180 lwp->lwp_pcb.pcb_xregs.rw_local[4] = prp[R_L4]; in prsetprregs()
181 lwp->lwp_pcb.pcb_xregs.rw_local[5] = prp[R_L5]; in prsetprregs()
182 lwp->lwp_pcb.pcb_xregs.rw_local[6] = prp[R_L6]; in prsetprregs()
183 lwp->lwp_pcb.pcb_xregs.rw_local[7] = prp[R_L7]; in prsetprregs()
185 lwp->lwp_pcb.pcb_xregs.rw_in[0] = prp[R_I0]; in prsetprregs()
186 lwp->lwp_pcb.pcb_xregs.rw_in[1] = prp[R_I1]; in prsetprregs()
187 lwp->lwp_pcb.pcb_xregs.rw_in[2] = prp[R_I2]; in prsetprregs()
188 lwp->lwp_pcb.pcb_xregs.rw_in[3] = prp[R_I3]; in prsetprregs()
189 lwp->lwp_pcb.pcb_xregs.rw_in[4] = prp[R_I4]; in prsetprregs()
190 lwp->lwp_pcb.pcb_xregs.rw_in[5] = prp[R_I5]; in prsetprregs()
191 lwp->lwp_pcb.pcb_xregs.rw_in[6] = prp[R_I6]; in prsetprregs()
192 lwp->lwp_pcb.pcb_xregs.rw_in[7] = prp[R_I7]; in prsetprregs()
194 lwp->lwp_pcb.pcb_xregstat = XREGMODIFIED; in prsetprregs()
195 lwptot(lwp)->t_post_sys = 1; in prsetprregs()
208 if (lwptoproc(lwp)->p_model == DATAMODEL_LP64) in prsetprregs()
209 lwptoregs(lwp)->r_tstate = TSTATE_USER64|TSTATE_MM_TSO; in prsetprregs()
211 lwptoregs(lwp)->r_tstate = TSTATE_USER32|TSTATE_MM_TSO; in prsetprregs()
213 lwptoregs(lwp)->r_tstate &= ~TSTATE_PEF; in prsetprregs()
216 setgregs(lwp, gr); in prsetprregs()
231 prgregset_32ton(klwp_t *lwp, prgregset32_t src, prgregset_t dest) in prgregset_32ton() argument
233 struct regs *r = lwptoregs(lwp); in prgregset_32ton()
253 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) { in prgregset_32ton()
254 struct rwindow *rw = &lwp->lwp_pcb.pcb_xregs; in prgregset_32ton()
301 dest[R_FPRS] = lwptofpu(lwp)->fpu_fprs; in prgregset_32ton()
312 prgetprregs32(klwp_t *lwp, prgregset32_t prp) in prgetprregs32() argument
318 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prgetprregs32()
320 getgregs32(lwp, gr); in prgetprregs32()
344 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) { in prgetprregs32()
345 prp[R_L0] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[0]); in prgetprregs32()
346 prp[R_L1] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[1]); in prgetprregs32()
347 prp[R_L2] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[2]); in prgetprregs32()
348 prp[R_L3] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[3]); in prgetprregs32()
349 prp[R_L4] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[4]); in prgetprregs32()
350 prp[R_L5] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[5]); in prgetprregs32()
351 prp[R_L6] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[6]); in prgetprregs32()
352 prp[R_L7] = R32(lwp->lwp_pcb.pcb_xregs.rw_local[7]); in prgetprregs32()
354 prp[R_I0] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[0]); in prgetprregs32()
355 prp[R_I1] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[1]); in prgetprregs32()
356 prp[R_I2] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[2]); in prgetprregs32()
357 prp[R_I3] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[3]); in prgetprregs32()
358 prp[R_I4] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[4]); in prgetprregs32()
359 prp[R_I5] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[5]); in prgetprregs32()
360 prp[R_I6] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[6]); in prgetprregs32()
361 prp[R_I7] = R32(lwp->lwp_pcb.pcb_xregs.rw_in[7]); in prgetprregs32()
376 prgetrvals(klwp_t *lwp, long *rval1, long *rval2) in prgetrvals() argument
378 struct regs *r = lwptoregs(lwp); in prgetrvals()
382 if (lwp->lwp_eosys == JUSTRETURN) { in prgetrvals()
385 } else if (lwptoproc(lwp)->p_model == DATAMODEL_ILP32) { in prgetrvals()
412 prgetprfpregs(klwp_t *lwp, prfpregset_t *pfp) in prgetprfpregs() argument
420 getfpregs(lwp, (fpregset_t *)pfp); in prgetprfpregs()
433 prgetprfpregs32(klwp_t *lwp, prfpregset32_t *pfp) in prgetprfpregs32() argument
441 getfpregs32(lwp, (fpregset32_t *)pfp); in prgetprfpregs32()
457 prsetprfpregs(klwp_t *lwp, prfpregset_t *pfp) in prsetprfpregs() argument
479 setfpregs(lwp, (fpregset_t *)pfp); in prsetprfpregs()
484 prsetprfpregs32(klwp_t *lwp, prfpregset32_t *pfp) in prsetprfpregs32() argument
506 setfpregs32(lwp, (fpregset32_t *)pfp); in prsetprfpregs32()
540 prgetprxregs(klwp_t *lwp, caddr_t prx) in prgetprxregs() argument
544 (void) xregs_get(lwp, prx); in prgetprxregs()
551 prsetprxregs(klwp_t *lwp, caddr_t prx) in prsetprxregs() argument
555 (void) xregs_set(lwp, prx); in prsetprxregs()
562 prgetasregs(klwp_t *lwp, asrset_t asrset) in prgetasregs() argument
565 getasrs(lwp, asrset); in prgetasregs()
566 getfpasrs(lwp, asrset); in prgetasregs()
573 prsetasregs(klwp_t *lwp, asrset_t asrset) in prsetasregs() argument
575 setasrs(lwp, asrset); in prsetasregs()
576 setfpasrs(lwp, asrset); in prsetasregs()
602 prstep(klwp_t *lwp, int watchstep) in prstep() argument
604 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prstep()
606 lwp->lwp_pcb.pcb_step = STEP_REQUESTED; in prstep()
607 lwp->lwp_pcb.pcb_tracepc = NULL; in prstep()
609 lwp->lwp_pcb.pcb_flags |= WATCH_STEP; in prstep()
611 lwp->lwp_pcb.pcb_flags |= NORMAL_STEP; in prstep()
618 prnostep(klwp_t *lwp) in prnostep() argument
620 ASSERT(ttolwp(curthread) == lwp || in prnostep()
621 MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prnostep()
623 lwp->lwp_pcb.pcb_step = STEP_NONE; in prnostep()
624 lwp->lwp_pcb.pcb_tracepc = NULL; in prnostep()
625 lwp->lwp_pcb.pcb_flags &= ~(NORMAL_STEP|WATCH_STEP); in prnostep()
632 prisstep(klwp_t *lwp) in prisstep() argument
634 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prisstep()
636 return (lwp->lwp_pcb.pcb_step != STEP_NONE); in prisstep()
643 prsvaddr(klwp_t *lwp, caddr_t vaddr) in prsvaddr() argument
645 struct regs *r = lwptoregs(lwp); in prsvaddr()
647 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prsvaddr()
731 klwp_t *lwp = ttolwp(curthread); in prdostep() local
732 struct regs *r = lwptoregs(lwp); in prdostep()
733 proc_t *p = lwptoproc(lwp); in prdostep()
738 ASSERT(lwp != NULL); in prdostep()
741 if (lwp->lwp_pcb.pcb_step == STEP_NONE || in prdostep()
742 lwp->lwp_pcb.pcb_step == STEP_ACTIVE) in prdostep()
753 if (lwp->lwp_pcb.pcb_step == STEP_WASACTIVE) { in prdostep()
754 if (npc == (caddr_t)lwp->lwp_pcb.pcb_tracepc) in prdostep()
757 lwp->lwp_pcb.pcb_tracepc = (void *)pc; in prdostep()
785 lwp->lwp_pcb.pcb_tracepc = (void *)(pc + i); in prdostep()
794 lwp->lwp_pcb.pcb_tracepc = (void *)(pc + i); in prdostep()
798 lwp->lwp_pcb.pcb_tracepc = (void *)npc; in prdostep()
803 lwp->lwp_pcb.pcb_step = STEP_ACTIVE; in prdostep()
819 klwp_t *lwp = ttolwp(curthread); in prundostep() local
826 ASSERT(lwp != NULL); in prundostep()
828 if (lwp->lwp_pcb.pcb_step == STEP_ACTIVE) { in prundostep()
829 struct regs *r = lwptoregs(lwp); in prundostep()
844 r->r_pc = (greg_t)lwp->lwp_pcb.pcb_tracepc; in prundostep()
848 r->r_pc = (greg_t)lwp->lwp_pcb.pcb_tracepc + 4; in prundostep()
853 r->r_npc = (greg_t)lwp->lwp_pcb.pcb_tracepc; in prundostep()
855 lwp->lwp_pcb.pcb_step = STEP_WASACTIVE; in prundostep()
877 klwp_t *lwp = ttolwp(curthread); in prstop() local
878 proc_t *p = lwptoproc(lwp); in prstop()
879 struct regs *r = lwptoregs(lwp); in prstop()
880 kfpu_t *pfp = lwptofpu(lwp); in prstop()
886 if (lwp->lwp_pcb.pcb_flags & PRSTOP_CALLED) in prstop()
893 ASSERT(lwp->lwp_nostop == 0); in prstop()
894 lwp->lwp_nostop = 1; in prstop()
896 if (lwp->lwp_pcb.pcb_step != STEP_NONE) in prstop()
899 if (lwp->lwp_pcb.pcb_xregstat == XREGNONE) { in prstop()
905 struct machpcb *mpcb = lwptompcb(lwp); in prstop()
925 copyin(rwp, &lwp->lwp_pcb.pcb_xregs, rw_size) == 0) in prstop()
926 lwp->lwp_pcb.pcb_xregstat = XREGPRESENT; in prstop()
929 rwindow_32ton(&rwindow32, &lwp->lwp_pcb.pcb_xregs); in prstop()
930 lwp->lwp_pcb.pcb_xregstat = XREGPRESENT; in prstop()
939 &lwp->lwp_pcb.pcb_xregs, in prstop()
947 &lwp->lwp_pcb.pcb_xregs); in prstop()
949 lwp->lwp_pcb.pcb_xregstat = XREGPRESENT; in prstop()
968 if (copyin_nowatch(pc, &lwp->lwp_pcb.pcb_instr, in prstop()
969 sizeof (lwp->lwp_pcb.pcb_instr)) == 0) in prstop()
970 lwp->lwp_pcb.pcb_flags |= INSTR_VALID; in prstop()
972 lwp->lwp_pcb.pcb_flags &= ~INSTR_VALID; in prstop()
973 lwp->lwp_pcb.pcb_instr = 0; in prstop()
977 ASSERT(lwp->lwp_nostop == 1); in prstop()
978 lwp->lwp_nostop = 0; in prstop()
980 lwp->lwp_pcb.pcb_flags |= PRSTOP_CALLED; in prstop()
1000 prfetchinstr(klwp_t *lwp, ulong_t *ip) in prfetchinstr() argument
1002 *ip = (ulong_t)(instr_t)lwp->lwp_pcb.pcb_instr; in prfetchinstr()
1003 return (lwp->lwp_pcb.pcb_flags & INSTR_VALID); in prfetchinstr()
1007 prnwindows(klwp_t *lwp) in prnwindows() argument
1009 struct machpcb *mpcb = lwptompcb(lwp); in prnwindows()
1015 prgetwindows(klwp_t *lwp, gwindows_t *gwp) in prgetwindows() argument
1017 getgwins(lwp, gwp); in prgetwindows()
1022 prgetwindows32(klwp_t *lwp, gwindows32_t *gwp) in prgetwindows32() argument
1024 getgwins32(lwp, gwp); in prgetwindows32()