Module: gas-preprocessor
Branch: master
Commit: 940274b97c669e1d19a3f2fed186675354f67f40

Author:    Janne Grunau <[email protected]>
Committer: Janne Grunau <[email protected]>
Date:      Tue Jan 14 16:10:32 2014 +0100

aarch64: fix bsl|saddl2? for Xcode5

Clang from Xcode5 supports bsl/saddl2? only in an unofficial assembler
syntax. To avoid breakage with later versions or different assembler
gas-preprocessor.pl checks for the environment variable GASPP_FIX_XCODE5
before changing these instructions to the non-standard syntax.

---

 gas-preprocessor.pl |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 6ee25c0..2072ca3 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -633,6 +633,16 @@ sub handle_serialized_line {
         if ($line =~ 
/^\s*uxtl(2)?\s+(v[0-3]?\d\.[248][hsdHSD])\s*,\s*(v[0-3]?\d\.(?:4|8|16)[bhsBHS])\b\s*$/)
 {
             $line = "        ushll$1 $2, $3, #0\n";
         }
+        if ($ENV{GASPP_FIX_XCODE5}) {
+            if ($line =~ /^\s*bsl\b/) {
+                $line =~ s/\b(bsl)(\s+v[0-3]?\d\.(\w+))\b/$1.$3$2/;
+                $line =~ s/\b(v[0-3]?\d)\.$3\b/$1/g;
+            }
+            if ($line =~ /^\s*saddl2?\b/) {
+                $line =~ s/\b(saddl2?)(\s+v[0-3]?\d\.(\w+))\b/$1.$3$2/;
+                $line =~ s/\b(v[0-3]?\d)\.\w+\b/$1/g;
+            }
+        }
     }
 
     print ASMFILE $line;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to