Auto-detect for 128-bit 4-way SSE2

Auto-detect for 128-bit 4-way SSE2

Date: September 9, 2010

Source: BitcoinTalk Forum

URL: https://satoshi.nakamotoinstitute.org/posts/bitcointalk/444/


SVN rev 150 has some code to try to auto-detect whether to use 4-way SSE2.  We need this because it's only faster on certain newer CPUs that have 128-bit SSE2 and not ones with 64-bit SSE2.

It uses the CPUID instruction to get the CPU brand, family, model number and stepping.  That's the easy part.  Knowing what to do with the model number is the hard part.  I was not able to find any table of family, model and stepping numbers for CPUs.  I had to go by various random reports I saw.

Here's what I ended up with:

Code:


← Back to Satoshi Record