[libav-devel] [GASPP PATCH] Comment out "it" instructions for armasm

Martin Storsjo martin at martin.st
Wed Oct 2 10:53:28 CEST 2019


Armasm implicitly adds it instructions as needed. In VS 2019 16.3,
there's a bug [1] in armasm making it fail to parse these it instructions
(but it can still add them implicitly just fine).

I'm not sure if it really is worth working around this issue, or just
wait for it to hopefully be fixed by the next release again.

[1] https://developercommunity.visualstudio.com/content/problem/757709/armasm-fails-to-handle-it-instructions.html
---
 gas-preprocessor.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index b6c2786..9d8fb5d 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -1168,6 +1168,10 @@ sub handle_serialized_line {
         $line =~ s/fmxr/vmsr/;
         $line =~ s/fmrx/vmrs/;
         $line =~ s/fadds/vadd.f32/;
+        # Armasm in VS 2019 16.3 errors out on "it" instructions. But
+        # armasm implicitly adds the necessary it instructions anyway, so we
+        # can just filter it out.
+        $line =~ s/^\s*it[te]*\s+/$comm$&/;
     }
     if ($as_type eq "armasm" and $arch eq "aarch64") {
         # Convert "b.eq" into "beq"
-- 
2.17.1



More information about the libav-devel mailing list