Home | History | Annotate | Line # | Download | only in gen
alloca.S revision 1.1
      1  1.1  fvdl /*	$NetBSD: alloca.S,v 1.1 2001/06/19 00:25:02 fvdl 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.1  fvdl 	RCSID("$NetBSD: alloca.S,v 1.1 2001/06/19 00:25:02 fvdl 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