x86_64 assembly pack: make it possible to compile with Perl located on
path with spaces. PR: 2835
This commit is contained in:
parent
faee82c1bc
commit
6251989eb6
20 changed files with 20 additions and 20 deletions
|
@ -36,7 +36,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$verticalspin=1; # unlike 32-bit version $verticalspin performs
|
$verticalspin=1; # unlike 32-bit version $verticalspin performs
|
||||||
# ~15% better on both AMD and Intel cores
|
# ~15% better on both AMD and Intel cores
|
||||||
|
|
|
@ -77,7 +77,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||||
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
||||||
$1>=10);
|
$1>=10);
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
# void aesni_cbc_sha1_enc(const void *inp,
|
# void aesni_cbc_sha1_enc(const void *inp,
|
||||||
# void *out,
|
# void *out,
|
||||||
|
|
|
@ -179,7 +179,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$movkey = $PREFIX eq "aesni" ? "movups" : "movups";
|
$movkey = $PREFIX eq "aesni" ? "movups" : "movups";
|
||||||
@_4args=$win64? ("%rcx","%rdx","%r8", "%r9") : # Win64 order
|
@_4args=$win64? ("%rcx","%rdx","%r8", "%r9") : # Win64 order
|
||||||
|
|
|
@ -105,7 +105,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
my ($inp,$out,$len,$key,$ivp)=("%rdi","%rsi","%rdx","%rcx");
|
my ($inp,$out,$len,$key,$ivp)=("%rdi","%rsi","%rdx","%rcx");
|
||||||
my @XMM=map("%xmm$_",(15,0..14)); # best on Atom, +10% over (0..15)
|
my @XMM=map("%xmm$_",(15,0..14)); # best on Atom, +10% over (0..15)
|
||||||
|
|
|
@ -56,7 +56,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$PREFIX="vpaes";
|
$PREFIX="vpaes";
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
my $code=".text\n\n";
|
my $code=".text\n\n";
|
||||||
|
|
|
@ -31,7 +31,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
($lo,$hi)=("%rax","%rdx"); $a=$lo;
|
($lo,$hi)=("%rax","%rdx"); $a=$lo;
|
||||||
($i0,$i1)=("%rsi","%rdi");
|
($i0,$i1)=("%rsi","%rdi");
|
||||||
|
|
|
@ -40,7 +40,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
# int bn_mul_mont(
|
# int bn_mul_mont(
|
||||||
$rp="%rdi"; # BN_ULONG *rp,
|
$rp="%rdi"; # BN_ULONG *rp,
|
||||||
|
|
|
@ -28,7 +28,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
# int bn_mul_mont_gather5(
|
# int bn_mul_mont_gather5(
|
||||||
$rp="%rdi"; # BN_ULONG *rp,
|
$rp="%rdi"; # BN_ULONG *rp,
|
||||||
|
|
|
@ -40,7 +40,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
sub hi() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1h/; $r; }
|
sub hi() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1h/; $r; }
|
||||||
sub lo() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1l/;
|
sub lo() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1l/;
|
||||||
|
|
|
@ -117,7 +117,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
no warnings qw(uninitialized);
|
no warnings qw(uninitialized);
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$code .= <<EOF;
|
$code .= <<EOF;
|
||||||
.text
|
.text
|
||||||
|
|
|
@ -52,7 +52,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
# common register layout
|
# common register layout
|
||||||
$nlo="%rax";
|
$nlo="%rax";
|
||||||
|
|
|
@ -54,7 +54,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
my ($dat,$in0,$out,$ctx,$inp,$len, $func,$nargs);
|
my ($dat,$in0,$out,$ctx,$inp,$len, $func,$nargs);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$dat="%rdi"; # arg1
|
$dat="%rdi"; # arg1
|
||||||
$len="%rsi"; # arg2
|
$len="%rsi"; # arg2
|
||||||
|
|
|
@ -85,7 +85,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||||
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
||||||
$1>=10);
|
$1>=10);
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$ctx="%rdi"; # 1st arg
|
$ctx="%rdi"; # 1st arg
|
||||||
$inp="%rsi"; # 2nd arg
|
$inp="%rsi"; # 2nd arg
|
||||||
|
|
|
@ -103,7 +103,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||||
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
|
||||||
$1>=10);
|
$1>=10);
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
if ($output =~ /512/) {
|
if ($output =~ /512/) {
|
||||||
$func="sha512_block_data_order";
|
$func="sha512_block_data_order";
|
||||||
|
|
|
@ -41,7 +41,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
|
||||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
sub L() { $code.=".byte ".join(',',@_)."\n"; }
|
sub L() { $code.=".byte ".join(',',@_)."\n"; }
|
||||||
sub LL(){ $code.=".byte ".join(',',@_).",".join(',',@_)."\n"; }
|
sub LL(){ $code.=".byte ".join(',',@_).",".join(',',@_)."\n"; }
|
||||||
|
|
|
@ -11,7 +11,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
($arg1,$arg2,$arg3,$arg4)=$win64?("%rcx","%rdx","%r8", "%r9") : # Win64 order
|
($arg1,$arg2,$arg3,$arg4)=$win64?("%rcx","%rdx","%r8", "%r9") : # Win64 order
|
||||||
("%rdi","%rsi","%rdx","%rcx"); # Unix order
|
("%rdi","%rsi","%rdx","%rcx"); # Unix order
|
||||||
|
|
|
@ -23,7 +23,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
( $xlate="${dir}../../crypto/perlasm/x86_64-xlate.pl" and -f $xlate) or
|
( $xlate="${dir}../../crypto/perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||||
die "can't locate x86_64-xlate.pl";
|
die "can't locate x86_64-xlate.pl";
|
||||||
|
|
||||||
open STDOUT,"| $^X $xlate $flavour $output";
|
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
|
|
||||||
$code=".text\n";
|
$code=".text\n";
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
$output=shift;
|
$output=shift;
|
||||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
open STDOUT,"| $^X ${dir}../crypto/perlasm/x86_64-xlate.pl $output";
|
open STDOUT,"| \"$^X\" ${dir}../crypto/perlasm/x86_64-xlate.pl $output";
|
||||||
push(@INC,"${dir}.");
|
push(@INC,"${dir}.");
|
||||||
|
|
||||||
require "uplink-common.pl";
|
require "uplink-common.pl";
|
||||||
|
|
Loading…
Reference in a new issue