diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index c1d303520..e4fc17bdb 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -241,10 +241,11 @@ my %globals; if ($gas) { # Solaris /usr/ccs/bin/as can't handle multiplications - # in $self->{label}, new gas requires sign extentions... + # in $self->{label}, new gas requires sign extension... 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; $self->{label} =~ s/^___imp_/__imp__/ if ($flavour eq "mingw64"); if (defined($self->{index})) {