dlfcn: always define _GNU_SOURCE
[oweals/openssl.git] / crypto / rc4 / asm / rc4-x86_64.pl
index 02bfac34f29fa9cec1902f8ac709ff4056e6e6a2..fa227631870354f78eee9f23b1f54a008d81c110 100755 (executable)
 # is better) and improvement coefficients relative to previous
 # version of this module are:
 #
-# Opteron      5.3/+0%
+# Opteron      5.3/+0%(*)
 # P4           6.5
-# Core2                6.2/+15%(*)
+# Core2                6.2/+15%(**)
 # Westmere     4.2/+60%
 # Sandy Bridge 4.2/+120%
 # Atom         9.3/+80%
+# VIA Nano     6.4/+4%
+# Ivy Bridge   4.1/+30%
+# Bulldozer    4.5/+30%(*)
 #
-# (*)  Note that Core2 result is ~15% lower than corresponding result
+# (*)  But corresponding loop has less instructions, which should have
+#      positive effect on upcoming Bulldozer, which has one less ALU.
+#      For reference, Intel code runs at 6.8 cpb rate on Opteron.
+# (**) Note that Core2 result is ~15% lower than corresponding result
 #      for 32-bit code, meaning that it's possible to improve it,
 #      but more than likely at the cost of the others (see rc4-586.pl
 #      to get the idea)...
@@ -109,7 +115,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
 die "can't locate x86_64-xlate.pl";
 
-open STDOUT,"| $^X $xlate $flavour $output";
+open OUT,"| \"$^X\" $xlate $flavour $output";
+*STDOUT=*OUT;
 
 $dat="%rdi";       # arg1
 $len="%rsi";       # arg2
@@ -119,6 +126,7 @@ $out="%rcx";            # arg4
 {
 $code=<<___;
 .text
+.extern        OPENSSL_ia32cap_P
 
 .globl RC4
 .type  RC4,\@function,4
@@ -425,7 +433,6 @@ $idx="%r8";
 $ido="%r9";
 
 $code.=<<___;
-.extern        OPENSSL_ia32cap_P
 .globl RC4_set_key
 .type  RC4_set_key,\@function,3
 .align 16