1 1.1 fvdl /* $NetBSD: alloca.S,v 1.2 2014/05/22 15:01:56 uebayasi Exp $ */ 2 1.1 fvdl 3 1.1 fvdl #include <machine/asm.h> 4 1.1 fvdl 5 1.1 fvdl #if defined(LIBC_SCCS) 6 1.2 uebayasi RCSID("$NetBSD: alloca.S,v 1.2 2014/05/22 15:01:56 uebayasi Exp $") 7 1.1 fvdl #endif 8 1.1 fvdl 9 1.1 fvdl ENTRY(alloca) 10 1.1 fvdl popq %rdx 11 1.1 fvdl movq %rsp,%rcx 12 1.1 fvdl addq $15,%rdi /* round up to 16 bytes */ 13 1.1 fvdl andq $~15,%rdi 14 1.1 fvdl subq %rdi,%rsp 15 1.1 fvdl movq %rsp,%rax 16 1.1 fvdl jmp *%rdx 17 1.2 uebayasi END(alloca) 18