x86_64-xlate.pl: minor size/performance improvement.
authorAndy Polyakov <appro@openssl.org>
Mon, 13 May 2013 14:06:25 +0000 (16:06 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 13 May 2013 14:06:25 +0000 (16:06 +0200)
crypto/perlasm/x86_64-xlate.pl

index 444a1f6..d44afe1 100755 (executable)
@@ -253,6 +253,11 @@ my %globals;
        $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
        $self->{label} =~ s/([0-9]+)/$1<<32>>32/eg;
 
+       if (!$self->{label} && $self->{index} && $self->{scale}==1 &&
+           $self->{base} =~ /(rbp|r13)/) {
+               $self->{base} = $self->{index}; $self->{index} = $1;
+       }
+
        if ($gas) {
            $self->{label} =~ s/^___imp_/__imp__/   if ($flavour eq "mingw64");