From 66956eaba30e703ada46843d1accbc4e0ba44f25 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 19 Jan 2010 21:45:16 +0000 Subject: [PATCH] x86_64-xlate.pl: refine sign extension logic when handling lea [from HEAD]. PR: 2094,2095 --- crypto/perlasm/x86_64-xlate.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index e702674143..fe348b99ad 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -190,8 +190,9 @@ my $current_function; # Solaris /usr/ccs/bin/as can't handle multiplications # in $self->{label} use integer; - $self->{label} =~ s/(?>32/egi; + $self->{label} =~ s/(?{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; + $self->{label} =~ s/([0-9]+)/$1<<32>>32/eg; if (defined($self->{index})) { sprintf "%s(%%%s,%%%s,%d)", -- 2.34.1