1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8#if defined(LIBC_SCCS) && !defined(lint) 9 .asciz "@(#)alloca.s 5.5 (Berkeley) 04/18/91" 10#endif /* LIBC_SCCS and not lint */ 11 12#include "DEFS.h" 13 14ENTRY(alloca, 0) 15 movl 4(ap),r0 # get allocation size 16 movl 16(fp),r2 # save return address before we smash it 17 movab here,16(fp) 18 ret 19here: 20 subl2 r0,sp # create stack space 21 bicl2 $3,sp # align to longword boundary 22 movl sp,r0 23 jmp (r2) 24