alloca()

Svante Lindahl zap at nada.kth.se
Wed Mar 22 04:01:55 AEST 1989


In article <KARL.89Mar21080920 at triceratops.cis.ohio-state.edu> karl at triceratops.cis.ohio-state.edu (Karl Kleinpaste) writes:
>pete at sun360.Online.Nixdorf.De (pete delany) writes:
>   Could someone send a copy of alloca() for OSX 4.1;
>
>You've already got it:

>[78] [8:09am] tut:/n/dinosaur/0/karl> nm /usr/.attlib/libPW.a | grep alloca

That version differs slightly from the one that is distributed with
Gnu Emacs (in file src/alloca.s). From that file:

.globl _alloca

_alloca: addw $3,pr0	# add 3 (dec) to first argument
	bicw $3,pr0	# then clear its last 2 bits
	subw pr0,sp	# subtract from SP the val in PR0
	andw $-32,sp	# keep sp aligned on multiple of 32.
	movw sp,pr0	# ret. current SP
	ret


Svante



More information about the Comp.sys.pyramid mailing list