diff options
author | Andy Polyakov <appro@openssl.org> | 2016-03-04 11:32:26 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-03-07 14:51:26 +0100 |
commit | 6e42e3ff9cde43830555549fdafa2a8b37b9485b (patch) | |
tree | c39fc3a48cb8b8a41c1d99aaf0b3569dcaef4a9a /crypto/perlasm | |
parent | a193388811db7e842ed7d1966bbe2552095b26cc (diff) | |
download | openssl-6e42e3ff9cde43830555549fdafa2a8b37b9485b.tar.gz |
perlasm/x86_64-xlate.pl: handle binary constants early.
Not all assemblers of "gas" flavour handle binary constants, e.g.
seasoned MacOS Xcode doesn't, so give them a hand.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 0a023fb82f..80ab17fc25 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -195,6 +195,7 @@ my %globals; sub out { my $self = shift; + $self->{value} =~ s/\b(0b[0-1]+)/oct($1)/eig; if ($gas) { # Solaris /usr/ccs/bin/as can't handle multiplications # in $self->{value} @@ -205,7 +206,6 @@ my %globals; } sprintf "\$%s",$self->{value}; } else { - $self->{value} =~ s/(0b[0-1]+)/oct($1)/eig; $self->{value} =~ s/0x([0-9a-f]+)/0$1h/ig if ($masm); sprintf "%s",$self->{value}; } |