diff options
author | Andy Polyakov <appro@openssl.org> | 2016-02-10 15:11:40 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-02-11 21:26:44 +0100 |
commit | 10c639a8a56c90bec9e332c7ca76ef552b3952ac (patch) | |
tree | b4c709c65ab3dc8b1021be4c8c75db75804fd965 /crypto/perlasm | |
parent | 0fffd522426c7fc022894c8dd079dc2625c04096 (diff) |
perlasm/x86_64-xlate.pl: pass pure constants verbatim.
RT#3885
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit fd7dc201d3b9d43972de6a0e659f7ef6421c99cc)
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 9c70b8c2c6..ee04221c7e 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -198,8 +198,11 @@ my %globals; if ($gas) { # Solaris /usr/ccs/bin/as can't handle multiplications # in $self->{value} - $self->{value} =~ s/(?<![\w\$\.])(0x?[0-9a-f]+)/oct($1)/egi; - $self->{value} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; + my $value = $self->{value}; + $value =~ s/(?<![\w\$\.])(0x?[0-9a-f]+)/oct($1)/egi; + if ($value =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg) { + $self->{value} = $value; + } sprintf "\$%s",$self->{value}; } else { $self->{value} =~ s/(0b[0-1]+)/oct($1)/eig; |