[Haskell-cafe] Detecting extensions of the host processor

Evgeny Tarasov etarasov.ekb at gmail.com
Wed Mar 10 08:42:02 EST 2010

If you use intel processor, you should call 'cpuid' assembler 
instruction to obtain this info.

Look at this document for the instruction semantics: 

There is a wrapper for cpuid in haskell: 

Henning Thielemann wrote:
> I like to detect at runtime whether the processor my program runs on 
> has certain extensions (SSE2, SSE3 or so) in order to execute 
> optimized code. On Linux I can process the contents of /proc/cpuinfo 
> but this will not work on Windows. Is there a portable way in Haskell?
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list