x86_64 assembly pack: make it possible to compile with Perl located
on path with spaces [from HEAD]. PR: 2835
This commit is contained in:
parent
652ac3e93a
commit
4887e07819
@ -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
|
||||||
|
@ -26,7 +26,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,
|
||||||
|
@ -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/;
|
||||||
|
@ -120,7 +120,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
|
||||||
|
@ -69,7 +69,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
|
||||||
|
@ -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";
|
||||||
|
|
||||||
$ctx="%rdi"; # 1st arg
|
$ctx="%rdi"; # 1st arg
|
||||||
$inp="%rsi"; # 2nd arg
|
$inp="%rsi"; # 2nd arg
|
||||||
|
@ -51,7 +51,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";
|
||||||
|
|
||||||
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"; }
|
||||||
|
@ -7,7 +7,7 @@ if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
|
|||||||
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
|
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
|
||||||
|
|
||||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||||
open STDOUT,"| $^X ${dir}perlasm/x86_64-xlate.pl $flavour $output";
|
open STDOUT,"| \"$^X\" ${dir}perlasm/x86_64-xlate.pl $flavour $output";
|
||||||
|
|
||||||
if ($win64) { $arg1="%rcx"; $arg2="%rdx"; }
|
if ($win64) { $arg1="%rcx"; $arg2="%rdx"; }
|
||||||
else { $arg1="%rdi"; $arg2="%rsi"; }
|
else { $arg1="%rdi"; $arg2="%rsi"; }
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user