summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm/x86asm.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-02-14 17:24:12 +0100
committerAndy Polyakov <appro@openssl.org>2014-02-14 17:24:12 +0100
commitf4d456408d9d7bca31f34765d1a05fbd9fa55826 (patch)
treee52d1370e39be0b3d428d0b34b5a0c281a589e85 /crypto/perlasm/x86asm.pl
parent5599c7331b90d9d29c9914c2a95c16d91485415a (diff)
x86[_64]cpuid.pl: add low-level RDSEED.
Diffstat (limited to 'crypto/perlasm/x86asm.pl')
-rw-r--r--crypto/perlasm/x86asm.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl
index 17abf92297..dcbc738516 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -131,6 +131,14 @@ sub ::rdrand
{ &::generic("rdrand",@_); }
}
+sub ::rdseed
+{ my ($dst)=@_;
+ if ($dst =~ /(e[a-dsd][ixp])/)
+ { &::data_byte(0x0f,0xc7,0xf8|$regrm{$dst}); }
+ else
+ { &::generic("rdrand",@_); }
+}
+
sub rxb {
local *opcode=shift;
my ($dst,$src1,$src2,$rxb)=@_;