[darwinbuild] Re: Darwin 8.0.1 gcc for pentiumpro

Michael Franz mvfranz at gmail.com
Sat Aug 6 07:57:05 PDT 2005


> You can just look at the generated assembly. Like this:
> [shantonu at localhost]$ cat foo.c
> int foo(double a) {
>   return (int)a;
> }
> [shantonu@ localhost]$ cc -S -o - -arch i386 foo.c | grep xmm
>         movsd   -16(%ebp), %xmm0
>         cvttsd2si       %xmm0, %eax
> [shantonu@ localhost]$ cc -S -o - -arch i386 foo.c -mno-sse2 | grep xmm
> [shantonu@ localhost]$ cc -S -o - -arch i386 foo.c -march=pentiumpro | grep
> xmm
> [shantonu@ localhost]$ 
> 
> If you don't get any output for all 3 invocations, your compiler is not
> auto-generating SSE2 instructions (or at least, that's a pretty good
> metric). There are probably SSE(1) instructions that use the xmm registers,
> this is just a quick heuristic for this one program.
> 
When I run this test on the base install, 1 & 3 have output, the same
for using the patched roots.  However, when I build the patched gcc
myself, the resulting compiler produces no mmx results.  So, do I
infer that the patched roots ARE producing SSE2, but that the gcc
patch does work?

Michael



More information about the darwinbuild-dev mailing list