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 444a1f617724d83ff7e3da1e375dcefea12e0663..d44afe1f5c90b484ae261b74cb5ee029ee780955 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");