From: Andy Polyakov Date: Tue, 12 Jul 2005 22:11:22 +0000 (+0000) Subject: complementary x86_64-xlate.pl update. X-Git-Tag: OpenSSL_0_9_8k^2~1937 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e84b663a933eff8834d66233ac0d6882ed918b82;p=oweals%2Fopenssl.git complementary x86_64-xlate.pl update. --- diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index ef1a4ce656..166dcec6ac 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -133,6 +133,10 @@ my $current_function; my $self = shift; if (!$masm) { + # Solaris /usr/ccs/bin/as can't handle multiplications + # in $self->{value} + $self->{value} =~ s/(?{value} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; sprintf "\$%s",$self->{value}; } else { $self->{value} =~ s/0x([0-9a-f]+)/0$1h/ig; @@ -163,14 +167,14 @@ my $current_function; my $self = shift; my $sz = shift; + # silently convert all EAs to 64-bit, required for elder GNU + # assembler and results in more compact code + $self->{index} =~ s/^[er](.?[0-9xp])[d]?$/r\1/; + $self->{base} =~ s/^[er](.?[0-9xp])[d]?$/r\1/; if (!$masm) { - # elder GNU assembler insists on 64-bit EAs:-( - # on pros side, this results in more compact code:-) - $self->{index} =~ s/^[er](.?[0-9xp])[d]?$/r\1/; - $self->{base} =~ s/^[er](.?[0-9xp])[d]?$/r\1/; # Solaris /usr/ccs/bin/as can't handle multiplications # in $self->{label} - $self->{label} =~ s/(?{label} =~ s/(?{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; if (defined($self->{index})) {