diff options
author | Andy Polyakov <appro@openssl.org> | 2005-05-18 08:45:21 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-05-18 08:45:21 +0000 |
commit | ca3e683747e4d5dfc7aee56d2fbae78713031489 (patch) | |
tree | 3a8dd4d86fe15dd6089b9804ce7c86593266e061 /crypto/x86cpuid.pl | |
parent | 38a17571687d65d4ec10ef201125a8ddee681ec5 (diff) |
Don't emit SSE2 instructions unless were asked to [from HEAD].
PR: 1073
Diffstat (limited to 'crypto/x86cpuid.pl')
-rw-r--r-- | crypto/x86cpuid.pl | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index 9ad9435ffd..3d5d16bb64 100644 --- a/crypto/x86cpuid.pl +++ b/crypto/x86cpuid.pl @@ -5,6 +5,8 @@ require "x86asm.pl"; &asm_init($ARGV[0],"x86cpuid"); +for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } + &function_begin("OPENSSL_ia32_cpuid"); &xor ("edx","edx"); &pushf (); @@ -115,17 +117,19 @@ require "x86asm.pl"; &mov ("ecx",&DWP(0,"ecx")); &bt (&DWP(0,"ecx"),1); &jnc (&label("no_x87")); - &bt (&DWP(0,"ecx"),26); - &jnc (&label("no_sse2")); - &pxor ("xmm0","xmm0"); - &pxor ("xmm1","xmm1"); - &pxor ("xmm2","xmm2"); - &pxor ("xmm3","xmm3"); - &pxor ("xmm4","xmm4"); - &pxor ("xmm5","xmm5"); - &pxor ("xmm6","xmm6"); - &pxor ("xmm7","xmm7"); -&set_label("no_sse2"); + if ($sse2) { + &bt (&DWP(0,"ecx"),26); + &jnc (&label("no_sse2")); + &pxor ("xmm0","xmm0"); + &pxor ("xmm1","xmm1"); + &pxor ("xmm2","xmm2"); + &pxor ("xmm3","xmm3"); + &pxor ("xmm4","xmm4"); + &pxor ("xmm5","xmm5"); + &pxor ("xmm6","xmm6"); + &pxor ("xmm7","xmm7"); + &set_label("no_sse2"); + } # just a bunch of fldz to zap the fp/mm bank... &data_word(0xeed9eed9,0xeed9eed9,0xeed9eed9,0xeed9eed9); &emms (); |