x86gas.pl: add palignr and move pclmulqdq.
authorAndy Polyakov <appro@openssl.org>
Mon, 16 May 2011 18:07:00 +0000 (18:07 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 16 May 2011 18:07:00 +0000 (18:07 +0000)
crypto/bn/asm/x86-gf2m.pl
crypto/modes/asm/ghash-x86.pl
crypto/perlasm/x86asm.pl

index 4727576..808a1e5 100644 (file)
@@ -197,12 +197,6 @@ $R="mm0";
        &ret    ();
 &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);
 &function_begin_B("bn_GF2m_mul_2x2");
 if (!$x86only) {
@@ -314,6 +308,6 @@ if ($sse2) {
        &ret    ();
 &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();
index abd1a8c..1b9adfb 100644 (file)
@@ -821,12 +821,6 @@ $len="ebx";
 
 &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
 my ($Xhi,$Xi,$Hkey)=@_;
 
index e0b228e..efa7b61 100644 (file)
@@ -107,6 +107,22 @@ sub ::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
 $lbdecor="L";          # local label decoration, set by package
 $label="000";