diff options
author | Andy Polyakov <appro@openssl.org> | 2012-11-17 19:04:15 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-11-17 19:04:15 +0000 |
commit | c5cd28bd64fa2b02f29e74486539e4b2f6741114 (patch) | |
tree | 47c1f26d5a0ce2ba6f32652f17ff240902fd5afb /crypto/perlasm/x86asm.pl | |
parent | b3aee265c5df5d1645ed83ae3dea706833a44ef0 (diff) |
Extend OPENSSL_ia32cap_P with extra word to accomodate AVX2 capability.
Diffstat (limited to 'crypto/perlasm/x86asm.pl')
-rw-r--r-- | crypto/perlasm/x86asm.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index 3f190ae590..17abf92297 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl @@ -131,6 +131,32 @@ sub ::rdrand { &::generic("rdrand",@_); } } +sub rxb { + local *opcode=shift; + my ($dst,$src1,$src2,$rxb)=@_; + + $rxb|=0x7<<5; + $rxb&=~(0x04<<5) if($dst>=8); + $rxb&=~(0x01<<5) if($src1>=8); + $rxb&=~(0x02<<5) if($src2>=8); + push @opcode,$rxb; +} + +sub ::vprotd +{ my $args=join(',',@_); + if ($args =~ /xmm([0-7]),xmm([0-7]),([x0-9a-f]+)/) + { my @opcode=(0x8f); + rxb(\@opcode,$1,$2,-1,0x08); + push @opcode,0x78,0xc2; + push @opcode,0xc0|($2&7)|(($1&7)<<3); # ModR/M + my $c=$3; + push @opcode,$c=~/^0/?oct($c):$c; + &::data_byte(@opcode); + } + else + { &::generic("vprotd",@_); } +} + # label management $lbdecor="L"; # local label decoration, set by package $label="000"; |