reactos/ntoskrnl/kdbg/amd64/kdb_help.S

31 lines
372 B
ArmAsm
Raw Normal View History

#include <asm.inc>
2020-01-26 17:59:05 +00:00
#include <ksamd64.inc>
.code64
PUBLIC KdbpStackSwitchAndCall
KdbpStackSwitchAndCall:
2020-01-26 17:59:05 +00:00
/* Save old stack */
mov rax, rsp
/* Set new stack */
mov rsp, rcx
2020-01-26 17:59:05 +00:00
/* Save old stack on new stack */
push rax
/* Call function */
call rdx
2020-01-26 17:59:05 +00:00
/* Restore old stack */
pop rax
mov rsp, rax
2020-01-26 17:59:05 +00:00
/* Return */
ret
END