complementary x86_64-xlate.pl update.
This commit is contained in:
parent
d85185217b
commit
e84b663a93
@ -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})) {
|
||||
|
Loading…
Reference in New Issue
Block a user