1OPENSSL_ia32cap(3) OpenSSL OPENSSL_ia32cap(3)
2
3
4
6 OPENSSL_ia32cap - finding the IA-32 processor capabilities
7
9 unsigned long *OPENSSL_ia32cap_loc(void);
10 #define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))
11
13 Value returned by OPENSSL_ia32cap_loc() is address of a variable con‐
14 taining IA-32 processor capabilities bit vector as it appears in EDX
15 register after executing CPUID instruction with EAX=1 input value (see
16 Intel Application Note #241618). Naturally it's meaningful on IA-32[E]
17 platforms only. The variable is normally set up automatically upon
18 toolkit initialization, but can be manipulated afterwards to modify
19 crypto library behaviour. For the moment of this writing three bits are
20 significant, namely bit #28 denoting Hyperthreading, which is used to
21 distinguish Intel P4 core, bit #26 denoting SSE2 support, and bit #4
22 denoting presence of Time-Stamp Counter. Clearing bit #26 at run-time
23 for example disables high-performance SSE2 code present in the crypto
24 library. You might have to do this if target OpenSSL application is
25 executed on SSE2 capable CPU, but under control of OS which does not
26 support SSE2 extentions. Even though you can manipulate the value pro‐
27 grammatically, you most likely will find it more appropriate to set up
28 an environment variable with the same name prior starting target appli‐
29 cation, e.g. 'env OPENSSL_ia32cap=0x10 apps/openssl', to achieve same
30 effect without modifying the application source code. Alternatively
31 you can reconfigure the toolkit with no-sse2 option and recompile.
32
33
34
350.9.8b 2005-06-23 OPENSSL_ia32cap(3)