sqrt via SSE2 registers

Jan Hubicka jh@suse.cz
Tue Feb 19 09:16:00 GMT 2002


> >         pushl   %ebp
> >         movl    %esp, %ebp
> >         subl    $8, %esp
> >         sqrtsd  a, %xmm0
> >         andl    $-16, %esp
> >         movsd   %xmm0, a
> >         movl    %ebp, %esp
> >         popl    %ebp
> >         ret
> > .Lfe1:
> >         .size   main,.Lfe1-main
> >         .comm   a,8,8
> >         .ident  "GCC: (GNU) 3.1 20020217 (experimental)"
> > u-pl5:/tmp/egcs/build/gcc$
> So it seems we must remove the sqrt() code from 
> /usr/include/bits/mathinline.h or find some way to skip it when -mfpmath is 
> issued.

I believe it has been already removed in newer glibc releases.
Also gcc defines macro when SSE is available for such situations.

Honza



More information about the Gcc mailing list