Module: gas-preprocessor Branch: master Commit: d1980e0c9ab344c3752dddf5120cf45d70e946b6
Author: Mans Rullgard <[email protected]> Committer: Mans Rullgard <[email protected]> Date: Mon Dec 3 15:08:09 2012 +0000 Fix thumb function handling Correctly detect branch targets by matching all forms of branch instructions and allowing whitespace around a label on the same line. Emit .thumb_func directives for known targets before the first use, otherwise they are ignored. --- gas-preprocessor.pl | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 6c949ea..2806b72 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -436,8 +436,12 @@ foreach my $line (@pass1_lines) { $thumb_labels{$1}++; } - if ($line =~ /^\s*((\w+:)?blx?|\.globl)\s+(\w+)/) { - $call_targets{$3}++; + 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}++; + } } # @l -> lo16() @ha -> ha16() _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
