Commit 4887e078 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

x86_64 assembly pack: make it possible to compile with Perl located

on path with spaces [from HEAD].

PR: 2835
parent 652ac3e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ $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 STDOUT,"| \"$^X\" $xlate $flavour $output";

$verticalspin=1;	# unlike 32-bit version $verticalspin performs
			# ~15% better on both AMD and Intel cores
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ $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 STDOUT,"| \"$^X\" $xlate $flavour $output";

# int bn_mul_mont(
$rp="%rdi";	# BN_ULONG *rp,
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ $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 STDOUT,"| \"$^X\" $xlate $flavour $output";

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/;
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
die "can't locate x86_64-xlate.pl";

no warnings qw(uninitialized);
open STDOUT,"| $^X $xlate $flavour $output";
open STDOUT,"| \"$^X\" $xlate $flavour $output";

$code .= <<EOF;
.text
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ $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 STDOUT,"| \"$^X\" $xlate $flavour $output";

$dat="%rdi";	    # arg1
$len="%rsi";	    # arg2
Loading