Latest update.
This commit is contained in:
@@ -28,9 +28,10 @@
|
||||
# the cost of 15/12% regression on Cortex-A5/A7, it's even possible
|
||||
# to improve Cortex-A9 result, but then A5/A7 loose more than 20%;
|
||||
|
||||
$flavour = shift;
|
||||
if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
|
||||
else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
if ($flavour && $flavour ne "void") {
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
@@ -38,9 +39,10 @@ if ($flavour && $flavour ne "void") {
|
||||
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
|
||||
die "can't locate arm-xlate.pl";
|
||||
|
||||
open STDOUT,"| \"$^X\" $xlate $flavour $output";
|
||||
open STDOUT,"| \"$^X\" $xlate $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
} else {
|
||||
open STDOUT,">$output";
|
||||
$output and open STDOUT,">$output";
|
||||
}
|
||||
|
||||
($ctx,$inp,$len,$padbit)=map("r$_",(0..3));
|
||||
|
||||
@@ -35,15 +35,18 @@
|
||||
# i.e. measured result is worse than expected, presumably binary
|
||||
# translator is not almighty;
|
||||
|
||||
$flavour=shift;
|
||||
$output=shift;
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
|
||||
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
|
||||
die "can't locate arm-xlate.pl";
|
||||
|
||||
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||
open OUT,"| \"$^X\" $xlate $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
my ($ctx,$inp,$len,$padbit) = map("x$_",(0..3));
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
# time dependent on input length. This module on the other hand is free
|
||||
# from such limitation.
|
||||
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
$output=pop and open STDOUT,">$output";
|
||||
|
||||
($CTXA,$INPB,$LEN,$PADBIT)=("A4","B4","A6","B6");
|
||||
($H0,$H1,$H2,$H3,$H4,$H4a)=("A8","B8","A10","B10","B2",$LEN);
|
||||
|
||||
@@ -56,7 +56,11 @@
|
||||
#
|
||||
######################################################################
|
||||
|
||||
$flavour = shift || "o32"; # supported flavours are o32,n32,64,nubi32,nubi64
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
# supported flavours are o32,n32,64,nubi32,nubi64, default is o32
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : "o32";
|
||||
|
||||
die "MIPS64 only" unless ($flavour =~ /64|n32/i);
|
||||
|
||||
@@ -431,7 +435,7 @@ poly1305_emit:
|
||||
___
|
||||
}
|
||||
|
||||
$output=pop and open STDOUT,">$output";
|
||||
$output and open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
|
||||
@@ -52,7 +52,10 @@
|
||||
# not, not one usable in the context. Improvement is ~40% over -m64
|
||||
# result above and is ~1.43 on little-endian systems.
|
||||
|
||||
$flavour = shift;
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
if ($flavour =~ /64/) {
|
||||
$SIZE_T =8;
|
||||
@@ -79,7 +82,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
|
||||
die "can't locate ppc-xlate.pl";
|
||||
|
||||
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
|
||||
open STDOUT,"| $^X $xlate $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
|
||||
$FRAME=24*$SIZE_T;
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
# POWER7 3.50/+30%
|
||||
# POWER8 3.75/+10%
|
||||
|
||||
$flavour = shift;
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
if ($flavour =~ /64/) {
|
||||
$SIZE_T =8;
|
||||
@@ -54,7 +57,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
|
||||
die "can't locate ppc-xlate.pl";
|
||||
|
||||
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
|
||||
open STDOUT,"| $^X $xlate $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
|
||||
$LOCALS=6*$SIZE_T;
|
||||
$FRAME=$LOCALS+6*8+18*8;
|
||||
|
||||
@@ -47,7 +47,10 @@ use FindBin qw($Bin);
|
||||
use lib "$Bin/../..";
|
||||
use perlasm::s390x qw(:DEFAULT :LD :GE :EI :MI1 :VX AUTOLOAD LABEL INCLUDE);
|
||||
|
||||
my $flavour = shift;
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
my $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
my $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
my ($z,$SIZE_T);
|
||||
if ($flavour =~ /3[12]/) {
|
||||
@@ -58,9 +61,6 @@ if ($flavour =~ /3[12]/) {
|
||||
$SIZE_T=8;
|
||||
}
|
||||
|
||||
my $output;
|
||||
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
|
||||
|
||||
my $stdframe=16*$SIZE_T+4*8;
|
||||
my $sp="%r15";
|
||||
|
||||
|
||||
@@ -41,17 +41,16 @@
|
||||
# (***) Multi-process benchmark saturates at ~12.5x single-process
|
||||
# result on 8-core processor, or ~21GBps per 2.85GHz socket.
|
||||
|
||||
my $output = pop;
|
||||
open STDOUT,">$output";
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
my $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
|
||||
open STDOUT,">$output" if $output;
|
||||
|
||||
my ($ctx,$inp,$len,$padbit,$shl,$shr) = map("%i$_",(0..5));
|
||||
my ($r0,$r1,$r2,$r3,$s1,$s2,$s3,$h4) = map("%l$_",(0..7));
|
||||
my ($h0,$h1,$h2,$h3, $t0,$t1,$t2) = map("%o$_",(0..5,7));
|
||||
my ($d0,$d1,$d2,$d3) = map("%g$_",(1..4));
|
||||
|
||||
my $output = pop;
|
||||
open STDOUT,">$stdout";
|
||||
|
||||
$code.=<<___;
|
||||
#include "sparc_arch.h"
|
||||
|
||||
|
||||
@@ -47,8 +47,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
push(@INC,"${dir}","${dir}../../perlasm");
|
||||
require "x86asm.pl";
|
||||
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
$output=pop and open STDOUT,">$output";
|
||||
|
||||
&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
|
||||
|
||||
|
||||
@@ -63,9 +63,10 @@
|
||||
# (***) strangely enough performance seems to vary from core to core,
|
||||
# listed result is best case;
|
||||
|
||||
$flavour = shift;
|
||||
$output = shift;
|
||||
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
|
||||
|
||||
@@ -94,7 +95,8 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
|
||||
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
my ($ctx,$inp,$len,$padbit)=("%rdi","%rsi","%rdx","%rcx");
|
||||
|
||||
Reference in New Issue
Block a user