Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/dtrace/amd64/dtrace_asm.S
Show All 31 Lines | |||||
#include <machine/asmacros.h> | #include <machine/asmacros.h> | ||||
#include <sys/cpuvar_defs.h> | #include <sys/cpuvar_defs.h> | ||||
#include <sys/dtrace.h> | #include <sys/dtrace.h> | ||||
#include "assym.inc" | #include "assym.inc" | ||||
#define INTR_POP \ | #define INTR_POP \ | ||||
MEXITCOUNT; \ | |||||
movq TF_RDI(%rsp),%rdi; \ | movq TF_RDI(%rsp),%rdi; \ | ||||
movq TF_RSI(%rsp),%rsi; \ | movq TF_RSI(%rsp),%rsi; \ | ||||
movq TF_RDX(%rsp),%rdx; \ | movq TF_RDX(%rsp),%rdx; \ | ||||
movq TF_RCX(%rsp),%rcx; \ | movq TF_RCX(%rsp),%rcx; \ | ||||
movq TF_R8(%rsp),%r8; \ | movq TF_R8(%rsp),%r8; \ | ||||
movq TF_R9(%rsp),%r9; \ | movq TF_R9(%rsp),%r9; \ | ||||
movq TF_RAX(%rsp),%rax; \ | movq TF_RAX(%rsp),%rax; \ | ||||
movq TF_RBX(%rsp),%rbx; \ | movq TF_RBX(%rsp),%rbx; \ | ||||
Show All 18 Lines | 1: addq $TF_RIP,%rsp; | ||||
* the value to indicate the address of the int3 (0xcc) instruction | * the value to indicate the address of the int3 (0xcc) instruction | ||||
* that we substituted. | * that we substituted. | ||||
*/ | */ | ||||
movq TF_RIP(%rsp), %rdi | movq TF_RIP(%rsp), %rdi | ||||
decq %rdi | decq %rdi | ||||
movq %rsp, %rsi | movq %rsp, %rsi | ||||
movq TF_RAX(%rsp), %rdx | movq TF_RAX(%rsp), %rdx | ||||
call dtrace_invop | call dtrace_invop | ||||
ALTENTRY(dtrace_invop_callsite) | ENTRY(dtrace_invop_callsite) | ||||
cmpl $DTRACE_INVOP_PUSHL_EBP, %eax | cmpl $DTRACE_INVOP_PUSHL_EBP, %eax | ||||
je bp_push | je bp_push | ||||
cmpl $DTRACE_INVOP_LEAVE, %eax | cmpl $DTRACE_INVOP_LEAVE, %eax | ||||
je bp_leave | je bp_leave | ||||
cmpl $DTRACE_INVOP_NOP, %eax | cmpl $DTRACE_INVOP_NOP, %eax | ||||
je bp_nop | je bp_nop | ||||
cmpl $DTRACE_INVOP_RET, %eax | cmpl $DTRACE_INVOP_RET, %eax | ||||
je bp_ret | je bp_ret | ||||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |