1184 movw %cx, CPUC_DTRACE_FLAGS(%rax) /* set fault to bad addr */
1185 movq %r15, CPUC_DTRACE_ILLVAL(%rax)
1186 /* fault addr is illegal value */
1187 2:
1188 movq REGOFF_RIP(%rbp), %rdi
1189 movq %rdi, %r12
1190 call dtrace_instr_size
1191 addq %rax, %r12
1192 movq %r12, REGOFF_RIP(%rbp)
1193 INTR_POP
1194 jmp tr_iret_auto
1195 /*NOTREACHED*/
1196 3:
1197 leaq dtrace_badflags(%rip), %rdi
1198 xorl %eax, %eax
1199 call panic
1200 4:
1201 leaq dtrace_badtrap(%rip), %rdi
1202 xorl %eax, %eax
1203 call panic
1204 SET_SIZE(cmntrap)
1205 SET_SIZE(_cmntrap)
1206
1207 #elif defined(__i386)
1208
1209
1210 ENTRY_NP2(cmntrap, _cmntrap)
1211
1212 INTR_PUSH
1213
1214 ALTENTRY(cmntrap_pushed)
1215
1216 movl %esp, %ebp
1217
1218 /*
1219 * - if this is a #pf i.e. T_PGFLT, %esi is live
1220 * and contains the faulting address i.e. a copy of %cr2
1221 *
1222 * - if this is a #db i.e. T_SGLSTP, %esi is live
1223 * and contains the value of %db6
|
1184 movw %cx, CPUC_DTRACE_FLAGS(%rax) /* set fault to bad addr */
1185 movq %r15, CPUC_DTRACE_ILLVAL(%rax)
1186 /* fault addr is illegal value */
1187 2:
1188 movq REGOFF_RIP(%rbp), %rdi
1189 movq %rdi, %r12
1190 call dtrace_instr_size
1191 addq %rax, %r12
1192 movq %r12, REGOFF_RIP(%rbp)
1193 INTR_POP
1194 jmp tr_iret_auto
1195 /*NOTREACHED*/
1196 3:
1197 leaq dtrace_badflags(%rip), %rdi
1198 xorl %eax, %eax
1199 call panic
1200 4:
1201 leaq dtrace_badtrap(%rip), %rdi
1202 xorl %eax, %eax
1203 call panic
1204 SET_SIZE(cmntrap_pushed)
1205 SET_SIZE(cmntrap)
1206 SET_SIZE(_cmntrap)
1207
1208 #elif defined(__i386)
1209
1210
1211 ENTRY_NP2(cmntrap, _cmntrap)
1212
1213 INTR_PUSH
1214
1215 ALTENTRY(cmntrap_pushed)
1216
1217 movl %esp, %ebp
1218
1219 /*
1220 * - if this is a #pf i.e. T_PGFLT, %esi is live
1221 * and contains the faulting address i.e. a copy of %cr2
1222 *
1223 * - if this is a #db i.e. T_SGLSTP, %esi is live
1224 * and contains the value of %db6
|