[libav-devel] [GASPP PATCH 2/2] Handle whitespace being matched as branch condition code

Martin Storsjo martin at martin.st
Fri Oct 19 23:07:52 CEST 2018


For cases like "b    1b", this is matched as $cond = "  ". This fixes
preprocessing with a preprocessor that preserves multiple spaces as such,
which cl.exe does.
---
 gas-preprocessor.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index b22ee8a..e7a135d 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -885,7 +885,7 @@ sub handle_serialized_line {
             my $width = $4;
             my $target = $5;
             # Don't interpret e.g. bic as b<cc> with ic as conditional code
-            if ($cond !~ /^(|$arm_cond_codes)$/) {
+            if ($cond !~ /^(\s*|$arm_cond_codes)$/) {
                 # Not actually a branch
             } elsif ($target =~ /^(\d+)([bf])$/) {
                 # The target is a local label
-- 
2.7.4



More information about the libav-devel mailing list