Module: gas-preprocessor Branch: master Commit: 035b8717275ae3324ed56822d33d323194da2d0f
Author: Martin Storsjo <[email protected]> Committer: Martin Storsjo <[email protected]> Date: Tue Feb 4 23:33:56 2014 +0200 Check the matched conditions in regexps that match branches This avoids interpreting instructions such as e.g. bic as a branch with the condition 'ic'. --- gas-preprocessor.pl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 1c9a1d5..48940e6 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -480,11 +480,16 @@ foreach my $line (@pass1_lines) { $thumb_labels{$1}++; } - if ($line =~ /^\s*((\w+\s*:\s*)?bl?x?(?:..)?(?:\.w)?|\.globl)\s+(\w+)/) { - if (exists $thumb_labels{$3}) { - print ASMFILE ".thumb_func $3\n"; - } else { - $call_targets{$3}++; + if ($line =~ /^\s*((\w+\s*:\s*)?bl?x?(..)?(?:\.w)?|\.globl)\s+(\w+)/) { + my $cond = $3; + my $label = $4; + # Don't interpret e.g. bic as b<cc> with ic as conditional code + if ($cond =~ /|eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo/) { + if (exists $thumb_labels{$label}) { + print ASMFILE ".thumb_func $label\n"; + } else { + $call_targets{$label}++; + } } } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
