Skip to content

Instantly share code, notes, and snippets.

@chewxy
Created August 17, 2014 13:49
Show Gist options
  • Save chewxy/02159093814794eb18d8 to your computer and use it in GitHub Desktop.
Save chewxy/02159093814794eb18d8 to your computer and use it in GitHub Desktop.
variadic functions in ASM
.LFB0:
pushq %rbp
movq %rsp, %rbp
subq $64, %rsp
movl %edi, -180(%rbp)
movq %rdx, -160(%rbp)
movq %rcx, -152(%rbp)
movq %r8, -144(%rbp)
movq %r9, -136(%rbp)
testb %al, %al
je .L2
movaps %xmm0, -128(%rbp)
movaps %xmm1, -112(%rbp)
movaps %xmm2, -96(%rbp)
movaps %xmm3, -80(%rbp)
movaps %xmm4, -64(%rbp)
movaps %xmm5, -48(%rbp)
movaps %xmm6, -32(%rbp)
movaps %xmm7, -16(%rbp)
.L2:
movl %esi, -184(%rbp)
nop
leave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment