Lines Matching defs:tp

87 fasttrap_tracepoint_install(proc_t *p, fasttrap_tracepoint_t *tp)
91 if (uwrite(p, &instr, 4, tp->ftt_pc) != 0)
98 fasttrap_tracepoint_remove(proc_t *p, fasttrap_tracepoint_t *tp)
106 if (uread(p, &instr, 4, tp->ftt_pc) != 0)
110 if (uwrite(p, &tp->ftt_instr, 4, tp->ftt_pc) != 0)
117 fasttrap_tracepoint_init(proc_t *p, fasttrap_tracepoint_t *tp, uintptr_t pc,
144 tp->ftt_type = FASTTRAP_T_COMMON;
145 tp->ftt_instr = instr;
166 tp->ftt_type = FASTTRAP_T_NOP;
169 tp->ftt_type = FASTTRAP_T_BC;
170 tp->ftt_dest = instr & 0x0000FFFC; /* Extract target address */
172 tp->ftt_dest |= 0xFFFF0000;
175 tp->ftt_dest += pc;
176 tp->ftt_bo = OP_BO(instr);
177 tp->ftt_bi = OP_BI(instr);
180 tp->ftt_type = FASTTRAP_T_B;
181 tp->ftt_dest = instr & 0x03FFFFFC; /* Extract target address */
183 tp->ftt_dest |= 0xFC000000;
186 tp->ftt_dest += pc;
191 tp->ftt_type = FASTTRAP_T_BCTR;
192 tp->ftt_bo = OP_BO(instr);
193 tp->ftt_bi = OP_BI(instr);
196 tp->ftt_type = FASTTRAP_T_BCTR;
197 tp->ftt_bo = OP_BO(instr);
198 tp->ftt_bi = OP_BI(instr);
205 tp->ftt_type = FASTTRAP_T_NOP;
220 if (tp->ftt_type != FASTTRAP_T_RESTORE &&
223 tp->ftt_flags |= FASTTRAP_F_RETMAYBE;
305 fasttrap_tracepoint_t *tp;
311 for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) {
312 if (pid == tp->ftt_pid && pc == tp->ftt_pc &&
313 tp->ftt_proc->ftpc_acount != 0)
322 if (tp == NULL) {
326 for (id = tp->ftt_retids; id != NULL; id = id->fti_next) {
372 fasttrap_tracepoint_t *tp, tp_local;
406 for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) {
407 if (pid == tp->ftt_pid && pc == tp->ftt_pc &&
408 tp->ftt_proc->ftpc_acount != 0)
417 if (tp == NULL) {
422 if (tp->ftt_ids != NULL) {
425 for (id = tp->ftt_ids; id != NULL; id = id->fti_next) {
471 tp_local = *tp;
473 tp = &tp_local;
493 switch (tp->ftt_type) {
498 if (!fasttrap_branch_taken(tp->ftt_bo, tp->ftt_bi, rp))
502 if (tp->ftt_instr & 0x01)
504 new_pc = tp->ftt_dest;
508 if (!fasttrap_branch_taken(tp->ftt_bo, tp->ftt_bi, rp))
511 if (tp->ftt_type == FASTTRAP_T_BCTR)
515 if (tp->ftt_instr & 0x01)
528 if (tp->ftt_retids != NULL) {
536 if (tp->ftt_type != FASTTRAP_T_COMMON) {