projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86[_64]cpuid.pl: add low-level RDSEED.
[openssl.git]
/
crypto
/
perlasm
/
x86_64-xlate.pl
diff --git
a/crypto/perlasm/x86_64-xlate.pl
b/crypto/perlasm/x86_64-xlate.pl
index
ed74b85
..
4dd7f52
100755
(executable)
--- a/
crypto/perlasm/x86_64-xlate.pl
+++ b/
crypto/perlasm/x86_64-xlate.pl
@@
-778,6
+778,19
@@
my $rdrand = sub {
}
};
}
};
+my $rdseed = sub {
+ if (shift =~ /%[er](\w+)/) {
+ my @opcode=();
+ my $dst=$1;
+ if ($dst !~ /[0-9]+/) { $dst = $regrm{"%e$dst"}; }
+ rex(\@opcode,0,$1,8);
+ push @opcode,0x0f,0xc7,0xf8|($dst&7);
+ @opcode;
+ } else {
+ ();
+ }
+};
+
sub rxb {
local *opcode=shift;
my ($dst,$src1,$src2,$rxb)=@_;
sub rxb {
local *opcode=shift;
my ($dst,$src1,$src2,$rxb)=@_;