Commit abe7f8b4 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Make all x86_64 modules independent on current working directory.

parent a078befc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -109,7 +109,13 @@ EOF
}

my $output = shift;
open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";

$0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
( $xlate="${dir}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";

open STDOUT,"| $^X $xlate $output";

$code .= <<EOF;
.text
+7 −1
Original line number Diff line number Diff line
@@ -31,7 +31,13 @@
# operand.

$output=shift;
open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";

$0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
( $xlate="${dir}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";

open STDOUT,"| $^X $xlate $output";

sub L() { $code.=".byte	".join(',',@_)."\n"; }
sub LL(){ $code.=".byte	".join(',',@_).",".join(',',@_)."\n"; }
+3 −1
Original line number Diff line number Diff line
@@ -99,7 +99,9 @@ OPENSSL_wipe_cpu:

___

open STDOUT,"| $^X perlasm/x86_64-xlate.pl $output";
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
open STDOUT,"| $^X $dir/perlasm/x86_64-xlate.pl $output";

print<<___;
.text