sin/cos via SSE2, and an alignment bug (was Re: sqrt via SSE2)
Jan Hubicka
jh@suse.cz
Wed Feb 20 02:32:00 GMT 2002
> On Tue, Feb 19, 2002 at 03:33:04PM +0100, Jan Hubicka wrote:
> > Can you show me the testcase? Note that gcc does not align properly stack
> > frame of function main () in case your runtime don't.
>
> Yes it does.
It does not, unless something changed very recently. The patch doing trick
with alloca aligns the stack boundary, so all functions called from main are
aligned, but not main itself.
#include <xmmintrin.h>
main()
{
__m128 t;
return &t;
}
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl %ebp, %esp
leal -4(%ebp), %eax
popl %ebp
ret
.Lfe1:
esp gets aligned by and operation, but t is homed at stack and
computed off missaligned ebp.
Honza
>
>
> r~
More information about the Gcc
mailing list