[PATCH] fixing SSE detection in solid

Tobias Koenig tokoe at kde.org
Wed Feb 6 17:28:12 GMT 2008


Hej,

the attached patch should fix the SSE detection in the HAL backend of
solid. Unfortunately I can't reach the original author Bernhard Loos aka
PutHuhn by mail (it seems nhuh.put at web.de doesn't exsist any longer).

As I'm not really good at assembler development could somebody else take
a look at it?

I assume the bit calculation was off by one half octet, as by using the
applyed patch seems to work.

According to the specs, MMX is at bit 23, SSE at bit 25 and SSE2 at bit 26

0000 0110 1000 0000 0000 0000 0000 0000 <- msb

So the bitmask 0x06800000 should cover the SSE/2 and MMX bit and
0x02000000 checks for SSE and 0x04000000 for SSE2.

In the original code 0x00E00000 was used to cover the SSE/2 and MMX bits
(happens when shifted right by 2) and 0x00200000 for SSE and 0x00400000
for SSE2 (one '0' too much).

Chiao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuid.patch
Type: text/x-diff
Size: 1709 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080206/0ce1df3e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080206/0ce1df3e/attachment.sig>


More information about the kde-core-devel mailing list