;  alloca(nbytes) allocate junk in stack frame
;
;  void *alloca(size_t size)
; 

	.text
 	.even

.globl	_alloca
_alloca:
	move.l	(sp)+,a0	; get return addr
	move.w	(sp)+,d0	; get size -- assist in bug fix, add 2 to sp

	addq.w	#1,d0		; ensure address even
	bclr	#0,d0

	sub.w	d0,sp		; increase stack frame size by that much
	move.l	sp,d0		; set up to return it

	subq.l	#2,sp		; new top of stack (real bug fix here)

	jmp	(a0)		; return by jmping via saved addr
