diff options
author | Andy Polyakov <appro@openssl.org> | 2013-10-03 00:26:09 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2013-10-03 00:26:09 +0200 |
commit | 667053a2f3ad0788586f629f618d07b783bdde31 (patch) | |
tree | b4885fc30c3f05ad7d63ca3d5d5a8088194d9ce8 /crypto/perlasm/x86_64-xlate.pl | |
parent | 7f893258f6e9298a24fbfced5331e4867df4fd6c (diff) |
x86_64-xlate.pl: fix jrcxz in nasm case.
Diffstat (limited to 'crypto/perlasm/x86_64-xlate.pl')
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 85ffc7571c..bd165b152b 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -250,8 +250,8 @@ my %globals; # in $self->{label}, new gas requires sign extension... use integer; $self->{label} =~ s/(?<![\w\$\.])(0x?[0-9a-f]+)/oct($1)/egi; - $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg; - $self->{label} =~ s/([0-9]+)/$1<<32>>32/eg; + $self->{label} =~ s/\b([0-9]+\s*[\*\/\%]\s*[0-9]+)\b/eval($1)/eg; + $self->{label} =~ s/\b([0-9]+)\b/$1<<32>>32/eg; if (!$self->{label} && $self->{index} && $self->{scale}==1 && $self->{base} =~ /(rbp|r13)/) { @@ -418,7 +418,7 @@ my %globals; } sub out { my $self = shift; - if ($nasm && opcode->mnemonic()=~m/^j/) { + if ($nasm && opcode->mnemonic()=~m/^j(?![re]cxz)/) { "NEAR ".$self->{value}; } else { $self->{value}; |