1 2#include <asm.inc> 3 4.code64 5 6PUBLIC KdbpStackSwitchAndCall 7KdbpStackSwitchAndCall: 8 push rbp 9 mov rbp, rsp /* Old stack - frame */ 10 11 /* Switch stack */ 12 mov rsp, rcx 13 14 /* Call function */ 15 call rdx 16 17 /* Switch back to old stack */ 18 pop rsp 19 20 ret 8 21 22END 23