Skip to content

Commit 010baf6

Browse files
committed
Match the full branch target when checking for local labels
This avoids spurious matches if actual labels contain the pattern <digits>[bf].
1 parent 9d65cb9 commit 010baf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gas-preprocessor.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ sub handle_serialized_line {
874874
# Don't interpret e.g. bic as b<cc> with ic as conditional code
875875
if ($cond !~ /|$arm_cond_codes/) {
876876
# Not actually a branch
877-
} elsif ($target =~ /(\d+)([bf])/) {
877+
} elsif ($target =~ /^(\d+)([bf])$/) {
878878
# The target is a local label
879879
$line = handle_local_label($line, $1, $2);
880880
$line =~ s/\b$instr\b/$&.w/ if $width eq "";

0 commit comments

Comments
 (0)