x86gas.pl: add palignr and move pclmulqdq.

This commit is contained in:
Andy Polyakov 2011-05-16 18:07:00 +00:00
parent afebe623c5
commit 2b9a8ca15b
3 changed files with 17 additions and 13 deletions

View File

@ -197,12 +197,6 @@ $R="mm0";
&ret (); &ret ();
&function_end_B("_mul_1x1_ialu"); &function_end_B("_mul_1x1_ialu");
sub pclmulqdq
{ my($dst,$src,$imm)=@_;
if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
{ &data_byte(0x66,0x0f,0x3a,0x44,0xc0|($1<<3)|$2,$imm); }
}
# void bn_GF2m_mul_2x2(BN_ULONG *r, BN_ULONG a1, BN_ULONG a0, BN_ULONG b1, BN_ULONG b0); # void bn_GF2m_mul_2x2(BN_ULONG *r, BN_ULONG a1, BN_ULONG a0, BN_ULONG b1, BN_ULONG b0);
&function_begin_B("bn_GF2m_mul_2x2"); &function_begin_B("bn_GF2m_mul_2x2");
if (!$x86only) { if (!$x86only) {
@ -314,6 +308,6 @@ if ($sse2) {
&ret (); &ret ();
&function_end_B("bn_GF2m_mul_2x2"); &function_end_B("bn_GF2m_mul_2x2");
&asciz ("GF2m Multiplication for x86, CRYPTOGAMS by <appro\@openssl.org>"); &asciz ("GF(2^m) Multiplication for x86, CRYPTOGAMS by <appro\@openssl.org>");
&asm_finish(); &asm_finish();

View File

@ -821,12 +821,6 @@ $len="ebx";
&static_label("bswap"); &static_label("bswap");
sub pclmulqdq
{ my($dst,$src,$imm)=@_;
if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
{ &data_byte(0x66,0x0f,0x3a,0x44,0xc0|($1<<3)|$2,$imm); }
}
sub clmul64x64_T2 { # minimal "register" pressure sub clmul64x64_T2 { # minimal "register" pressure
my ($Xhi,$Xi,$Hkey)=@_; my ($Xhi,$Xi,$Hkey)=@_;

View File

@ -107,6 +107,22 @@ sub ::pshufb
{ &::generic("pshufb",@_); } { &::generic("pshufb",@_); }
} }
sub ::palignr
{ my($dst,$src,$imm)=@_;
if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
{ &::data_byte(0x66,0x0f,0x3a,0x0f,0xc0|($1<<3)|$2,$imm); }
else
{ &::generic("palignr",@_); }
}
sub ::pclmulqdq
{ my($dst,$src,$imm)=@_;
if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
{ &::data_byte(0x66,0x0f,0x3a,0x44,0xc0|($1<<3)|$2,$imm); }
else
{ &::generic("pclmulqdq",@_); }
}
# label management # label management
$lbdecor="L"; # local label decoration, set by package $lbdecor="L"; # local label decoration, set by package
$label="000"; $label="000";