1: /* 2: * Copyright (c) 1980 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: */ 6: 7: #ifdef LIBC_SCCS 8: .asciz "@(#)alloca.s 5.3 (Berkeley) 3/9/86" 9: #endif LIBC_SCCS 10: 11: /* like alloc, but automatic free in return */ 12: 13: #include "DEFS.h" 14: 15: ENTRY(alloca, 0) 16: subl2 4(ap),sp /* crude allocation */ 17: movl 16(fp),r1 /* pc */ 18: movq 8(fp),ap /* new (old) ap and fp */ 19: bicl2 $3,sp /* 4-byte align */ 20: addl2 $7*4,sp /* reuse space of mscp */ 21: movl sp,r0 /* return value */ 22: jmp (r1) /* funny return */