Skip to content

Commit

Permalink
fix (?) AVX clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed Oct 21, 2011
1 parent af4bfa1 commit dfe9a47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fips/fips.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int FIPS_module_mode_set(int onoff, const char *auth)

#ifdef OPENSSL_IA32_SSE2
{
unsigned int OPENSSL_ia32cap_P[];
extern unsigned int OPENSSL_ia32cap_P[2];
if ((OPENSSL_ia32cap_P[0] & (1<<25|1<<26)) != (1<<25|1<<26))
{
FIPSerr(FIPS_F_FIPS_MODULE_MODE_SET,FIPS_R_UNSUPPORTED_PLATFORM);
Expand All @@ -325,7 +325,7 @@ int FIPS_module_mode_set(int onoff, const char *auth)
goto end;
}
OPENSSL_ia32cap_P[0] |= (1<<28); /* set "shared cache" */
OPENSSL_ia32cap_P[1] &= ~(1<<60); /* clear AVX */
OPENSSL_ia32cap_P[1] &= ~(1<<(60-32)); /* clear AVX */
}
#endif

Expand Down

0 comments on commit dfe9a47

Please sign in to comment.