Use two separate comment variables - one for the input source
format and one used to comment out directives from the output.
This is necessary if the two input passes are merged.
---
gas-preprocessor.pl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 10c7203..4e140b2 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -201,6 +201,8 @@ die "Unknown target architecture '$arch'" if not exists
$canonical_arch{$arch};
$arch = $canonical_arch{$arch};
$comm = $comments{$arch};
+my $inputcomm = $comm;
+$comm = ";" if $as_type =~ /armasm/;
my %ppc_spr = (ctr => 9,
vrsave => 256);
@@ -236,7 +238,7 @@ if ($force_thumb) {
# but it should be the same for valid cases
while (<ASMFILE>) {
# remove all comments (to avoid interfering with evaluating directives)
- s/(?<!\\)$comm.*//x;
+ s/(?<!\\)$inputcomm.*//x;
# Strip out windows linefeeds
s/\r$//;
# Strip out line number comments - armasm can handle them in a separate
@@ -246,8 +248,6 @@ while (<ASMFILE>) {
parse_line($_);
}
-$comm = ";" if $as_type =~ /armasm/;
-
sub eval_expr {
my $expr = $_[0];
while ($expr =~ /([A-Za-z._][A-Za-z0-9._]*)/g) {
--
1.8.5.2 (Apple Git-48)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel