diff options
author | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:24:12 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-14 17:25:14 +0100 |
commit | 104c032b7bed893f87d08ef3178848715e7035b3 (patch) | |
tree | d231b0877c1a78f1421666b69df58e46a98b0365 /crypto/x86cpuid.pl | |
parent | b347341c75656cf8bc039bd0ea5e3571c9299687 (diff) |
x86[_64]cpuid.pl: add low-level RDSEED.
(cherry picked from commit f4d456408d9d7bca31f34765d1a05fbd9fa55826)
Diffstat (limited to 'crypto/x86cpuid.pl')
-rw-r--r-- | crypto/x86cpuid.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index 390c883d2b..e95f6274f5 100644 --- a/crypto/x86cpuid.pl +++ b/crypto/x86cpuid.pl @@ -367,6 +367,18 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &ret (); &function_end_B("OPENSSL_ia32_rdrand"); +&function_begin_B("OPENSSL_ia32_rdseed"); + &mov ("ecx",8); +&set_label("loop"); + &rdseed ("eax"); + &jc (&label("break")); + &loop (&label("loop")); +&set_label("break"); + &cmp ("eax",0); + &cmove ("eax","ecx"); + &ret (); +&function_end_B("OPENSSL_ia32_rdseed"); + &initseg("OPENSSL_cpuid_setup"); &hidden("OPENSSL_cpuid_setup"); |