From 22de0e6583b7f8764e383cf818db45863281eeec Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 13 May 2013 16:06:25 +0200 Subject: [PATCH] x86_64-xlate.pl: minor size/performance improvement. --- crypto/perlasm/x86_64-xlate.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 444a1f6177..d44afe1f5c 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -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"); -- GitLab