Brian Cameron wrote:
> 
> Alan:
> 
>> The upstream project adopted changes while porting to Microsoft Visual C
>> that made it easier to adapt to Studio 12 as well, so that is now working
>> for us, though it may still be a problem for other code written for gcc.
>> The one issue remaining there that I've been meaning to ask about is I
>> couldn't find an appropriate -xarch flag to enable the MMX intrinsics
>> without
>> also enabling SSE - right now it's using -xarch=sse since -xarch=mmx
>> isn't
>> recognized.  (The gcc code uses -mmmx for those.)   The changes I made to
>> port it to Studio 12 can be seen at:
>> http://cgit.freedesktop.org/pixman/commit/?id=fd7449c4855e77d31770f9042ba43e186c541ce5
>>
> 
> I wouldn't think "-xarch=sse" is needed.  Many desktop modules contain
> MMX hardware acceleration code and we don't use this flag when building
> any modules, yet the hardware acceleration code gets built.
> 
> I believe if you build with "-xarch=sse" that this will create binaries
> that will not work on machines that do not have SSE support.  So older
> MMX-only machines won't be able to run the code.

That's why the commit shown includes a mapfile that resets the hwcap flags
to just "FPU", since the library calls getisax() at runtime to determine
if it should call the MMX or SSE fastpath versions of the functions or the
plain x86 assembly versions.   Only the MMX & SSE files are compiled with
the -xarch flags to enable those ISA extensions.

-- 
        -Alan Coopersmith-           alan.coopersmith at sun.com
         Sun Microsystems, Inc. - X Window System Engineering


Reply via email to