Mac Intel

Joel Reymont joelr1@REDACTED
Mon Aug 14 17:43:55 CEST 2006

On Aug 14, 2006, at 2:23 PM, Daniel Luna wrote:

> 4. The tricky part! Find some way to detect (at runtime, or at  
> least load time) that the machine doesn't handle SSE2 and fallback  
> to BEAM. Easy, but probably more expensive than the potential gain.  
> The downside of backwards compatibility. If core dumps are ok for  
> an old machine, this step can be skipped. (A no-issue for the Mac  
> Intel)

According to Intel's manuals:

12.1.2 Checking for SSE/SSE2/SSE3 Extension Support

If the processor attempts to execute an unsupported SSE/SSE2/SSE3  
instruction, the processor
will generate an invalid-opcode exception (#UD).

Before an operating system or executive attempts to use SSE/SSE2/SSE3  
extensions, it should
check that support is present on the processor. To make this check,  
execute CPUID with an argument of 1 in the EAX register. Make sure:

CPUID.1:EDX.SSE[bit 25] = 1
CPUID.1:EDX.SSE2[bit 26] = 1
CPUID.1:ECX.SSE3[bit 0] = 1


More information about the erlang-questions mailing list