diff options
| author | miod <> | 2014-04-13 15:16:40 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-13 15:16:40 +0000 |
| commit | dbf195d7fd4efbe4ee578f1dc5c72e7f3deadf18 (patch) | |
| tree | 0de23bccc2c4fc24d466d6a4291987efc8e44770 /src/lib/libcrypto/x86cpuid.pl | |
| parent | 210506dd94a697493eb809fb31df7283912ded73 (diff) | |
| parent | 52628ee3f51f011b463aaedb1a28aa0524b43cb3 (diff) | |
| download | openbsd-dbf195d7fd4efbe4ee578f1dc5c72e7f3deadf18.tar.gz openbsd-dbf195d7fd4efbe4ee578f1dc5c72e7f3deadf18.tar.bz2 openbsd-dbf195d7fd4efbe4ee578f1dc5c72e7f3deadf18.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/x86cpuid.pl')
| -rw-r--r-- | src/lib/libcrypto/x86cpuid.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x86cpuid.pl b/src/lib/libcrypto/x86cpuid.pl index 39fd8f2293..b270b44337 100644 --- a/src/lib/libcrypto/x86cpuid.pl +++ b/src/lib/libcrypto/x86cpuid.pl | |||
| @@ -67,6 +67,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |||
| 67 | &inc ("esi"); # number of cores | 67 | &inc ("esi"); # number of cores |
| 68 | 68 | ||
| 69 | &mov ("eax",1); | 69 | &mov ("eax",1); |
| 70 | &xor ("ecx","ecx"); | ||
| 70 | &cpuid (); | 71 | &cpuid (); |
| 71 | &bt ("edx",28); | 72 | &bt ("edx",28); |
| 72 | &jnc (&label("generic")); | 73 | &jnc (&label("generic")); |
| @@ -91,6 +92,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |||
| 91 | 92 | ||
| 92 | &set_label("nocacheinfo"); | 93 | &set_label("nocacheinfo"); |
| 93 | &mov ("eax",1); | 94 | &mov ("eax",1); |
| 95 | &xor ("ecx","ecx"); | ||
| 94 | &cpuid (); | 96 | &cpuid (); |
| 95 | &and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0 | 97 | &and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0 |
| 96 | &cmp ("ebp",0); | 98 | &cmp ("ebp",0); |
| @@ -165,7 +167,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |||
| 165 | &jnz (&label("nohalt")); # not enough privileges | 167 | &jnz (&label("nohalt")); # not enough privileges |
| 166 | 168 | ||
| 167 | &pushf (); | 169 | &pushf (); |
| 168 | &pop ("eax") | 170 | &pop ("eax"); |
| 169 | &bt ("eax",9); | 171 | &bt ("eax",9); |
| 170 | &jnc (&label("nohalt")); # interrupts are disabled | 172 | &jnc (&label("nohalt")); # interrupts are disabled |
| 171 | 173 | ||
| @@ -280,7 +282,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |||
| 280 | # arguments is 1 or 2! | 282 | # arguments is 1 or 2! |
| 281 | &function_begin_B("OPENSSL_indirect_call"); | 283 | &function_begin_B("OPENSSL_indirect_call"); |
| 282 | { | 284 | { |
| 283 | my $i,$max=7; # $max has to be chosen as 4*n-1 | 285 | my ($max,$i)=(7,); # $max has to be chosen as 4*n-1 |
| 284 | # in order to preserve eventual | 286 | # in order to preserve eventual |
| 285 | # stack alignment | 287 | # stack alignment |
| 286 | &push ("ebp"); | 288 | &push ("ebp"); |
