[MPlayer-dev-eng] [PATCH] Solaris support for SSE(2) autodetection

Milan Jurik milan.jurik at xylab.cz
Sat Sep 20 13:59:16 CEST 2008


Hi,

Reimar Döffinger napsal(a):
> On Thu, Sep 18, 2008 at 10:08:11AM +0200, Milan Jurik wrote:
>   
>> V st, 17. 09. 2008 v 23:24, Reimar Döffinger píše:
>>     
>>> On Wed, Sep 17, 2008 at 10:30:49PM +0200, Milan Jurik wrote:
>>>       
>>>> I don't understand. The code adds possibility for autodetection of 
>>>> SSE/SSE2 in runtime-cpudetection for Solaris, when it's requested (as 
>>>> done for other platforms already). I believe it's purpose of runtime CPU 
>>>> detection to detect CPU capabilities.
>>>>         
>>> There is already working, perfectly portable code to detect CPU
>>> capabilities. The code you are modifying is for detecting if the
>>> operating system supports SSE/SSE2, after we already _know_ that the
>>> CPU supports them.
>>> I am not even sure there are any Solaris versions at all that do not
>>> support SSE/SSE2, in which case the check would be quite pointless.
>>>       
>> Ah, this you meant. Officially SSE/SSE2 are supported from Solaris 9 (it
>> could be workarounded on S8 probably). Not sure if we can count Solaris
>> 8 as relevant on multimedia desktop today. What do you prefer, automatic
>> enable for Solaris or uname() version test?
>>     
>
> If your method works under Solaris 8, too, I think your first patch is
> ok - except that it is a bit much code for what it does, casting ignored
> return values away is not MPlayer style (though if you ignore the return
> value, you should at least initialize the ui variable).
> And e.g.
> gCpuCaps.hasSSE = !!(ui & AV_386_SSE)
> mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes" : "no");
> saves some code.
>   
I looked at Solaris 8 and used interface was added after Solaris 8 
release, so my patch is wrong, it would break compilation on Solaris 8.

> But my question was: currently when we have no special code, we assume the OS
> does not support SSE. Would it not be better to assume it does?
>   

No idea. I saw "FIXME" comment but my knowledge of SSE is limited.

> And a second question is: could we not use the sigaction method for more
> than just Linux, I think it might work on Solaris, too.
>   
We can. If you prefer this way, I will send new patch (tested on Solaris 
8 this time also). The shift of eip has documented.

Best regards,

Milan



More information about the MPlayer-dev-eng mailing list