projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
687721a
)
sha1-x86_64.pl: add missing rex prefix in shaext.
author
Andy Polyakov
<appro@openssl.org>
Sat, 14 Jun 2014 13:26:14 +0000
(15:26 +0200)
committer
Andy Polyakov
<appro@openssl.org>
Sat, 14 Jun 2014 13:27:54 +0000
(15:27 +0200)
PR: 3405
crypto/sha/asm/sha1-x86_64.pl
patch
|
blob
|
history
diff --git
a/crypto/sha/asm/sha1-x86_64.pl
b/crypto/sha/asm/sha1-x86_64.pl
index 6dc64a2eadf0121efd15f310a16cb6d649e6a892..9aa128ed3aef4218171952a895cd69bffd9eb2b5 100755
(executable)
--- a/
crypto/sha/asm/sha1-x86_64.pl
+++ b/
crypto/sha/asm/sha1-x86_64.pl
@@
-2030,8
+2030,12
@@
sub sha1op38 {
"sha1msg1" => 0xc9,
"sha1msg2" => 0xca );
- if (defined($opcodelet{$instr}) && @_[0] =~ /%xmm([0-
7]),\s*%xmm([0-7]
)/) {
+ if (defined($opcodelet{$instr}) && @_[0] =~ /%xmm([0-
9]+),\s*%xmm([0-9]+
)/) {
my @opcode=(0x0f,0x38);
+ my $rex=0;
+ $rex|=0x04 if ($2>=8);
+ $rex|=0x01 if ($1>=8);
+ unshift @opcode,0x40|$rex if ($rex);
push @opcode,$opcodelet{$instr};
push @opcode,0xc0|($1&7)|(($2&7)<<3); # ModR/M
return ".byte\t".join(',',@opcode);