diff options
author | Andy Polyakov <appro@openssl.org> | 2005-07-12 22:11:22 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-07-12 22:11:22 +0000 |
commit | e84b663a933eff8834d66233ac0d6882ed918b82 (patch) | |
tree | 9789525276e5cecfc08e05366a011a78ca69a2f3 /crypto/perlasm | |
parent | d85185217b19f65eedcd786f42b9859b6924eb31 (diff) |
complementary x86_64-xlate.pl update.
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 14 |
1 files changed, 9 insertions, 5 deletions
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/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/egi; + $self->{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/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/eg; + $self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/egi; $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; if (defined($self->{index})) { |