HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (12/29/90)
When tracking down a problem with my new 386 compiler, I discovered that Sun C compilers generate special code when leaving a function which called alloca. The problem occurs when registers used by register variables have to be restored. Since the stack pointer is much lower now, they cannot be retrieved using popl %edi (say), but by using movl -xxxx(%ebp),%edi. Since this is generally inefficient and I do not like to generate code which is dependent on a function that has been called (note that it is nothing like __builtin_alloca !), does anybody have a 386 alloca source? Stack frame: arguments return address old stackpointer <--- ebp locals saved registers <--- esp