Last active
October 7, 2017 15:53
-
-
Save ughman/7d09b7f47f788bd09d289b08f9157b93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.globl dyncall | |
dyncall: | |
pushq %rbp | |
movq %rsp, %rbp | |
pushq %rdx | |
movl %edi, %ecx | |
movl %ecx, %eax | |
shrl $1, %eax | |
shll $4, %eax | |
addl $40, %eax | |
subq %rax, %rsp | |
movq %rsp, %rdi | |
rep movsq | |
popq %rdi | |
popq %rsi | |
popq %rdx | |
popq %rcx | |
popq %r8 | |
popq %r9 | |
callq *-8(%rbp) | |
leaveq | |
retq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment