xref: /csrg-svn/lib/libc/vax/gen/alloca.s (revision 47908)
1/*-
2 * Copyright (c) 1983 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.proprietary.c%
6 */
7
8#if defined(LIBC_SCCS) && !defined(lint)
9	.asciz "@(#)alloca.s	5.4 (Berkeley) 04/12/91"
10#endif /* LIBC_SCCS and not lint */
11
12/* like alloc, but automatic free in return */
13
14#include "DEFS.h"
15
16ENTRY(alloca, 0)
17	subl2	4(ap),sp	/* crude allocation */
18	movl	16(fp),r1	/* pc */
19	movq	8(fp),ap	/* new (old) ap and fp */
20	bicl2	$3,sp		/* 4-byte align */
21	addl2	$7*4,sp		/* reuse space of mscp */
22	movl	sp,r0		/* return value */
23	jmp 	(r1)		/* funny return */
24