summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2013-11-15 09:17:37 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-11-15 09:17:37 -0800
commitb4a28b33140e11017e91a6a9e623eb796986e438 (patch)
treecd0734adab38dd8e067c15b506f3cbc35fbf14fe
parent37d7550391132fbb2e1db2422dd96f99f9892da0 (diff)
parent16344c4a5511669543ab91e5cdb567644210bfb7 (diff)
downloadlibvpx-b4a28b33140e11017e91a6a9e623eb796986e438.tar.gz
libvpx-b4a28b33140e11017e91a6a9e623eb796986e438.tar.bz2
libvpx-b4a28b33140e11017e91a6a9e623eb796986e438.zip
Merge "Generate GAS output for Chromium"
-rwxr-xr-xbuild/make/ads2gas_apple.pl23
1 files changed, 22 insertions, 1 deletions
diff --git a/build/make/ads2gas_apple.pl b/build/make/ads2gas_apple.pl
index fdafa982b..befb3dbe7 100755
--- a/build/make/ads2gas_apple.pl
+++ b/build/make/ads2gas_apple.pl
@@ -17,6 +17,13 @@
#
# Usage: cat inputfile | perl ads2gas_apple.pl > outputfile
#
+
+my $chromium = 0;
+
+foreach my $arg (@ARGV) {
+ $chromium = 1 if ($arg eq "-chromium");
+}
+
print "@ This file was created from a .asm file\n";
print "@ using the ads2gas_apple.pl script.\n\n";
print "\t.set WIDE_REFERENCE, 0\n";
@@ -47,7 +54,7 @@ while (<STDIN>)
s/@/,:/g;
# Comment character
- s/;/@/g;
+ s/;/ @/g;
# Hexadecimal constants prefaced by 0x
s/#&/#0x/g;
@@ -210,5 +217,19 @@ while (<STDIN>)
# s/\$/\\/g; # End macro definition
s/MEND/.endm/; # No need to tell it where to stop assembling
next if /^\s*END\s*$/;
+
+ # Clang used by Chromium differs slightly from clang in XCode in what it
+ # will accept in the assembly.
+ if ($chromium) {
+ s/qsubaddx/qsax/i;
+ s/qaddsubx/qasx/i;
+ s/ldrneb/ldrbne/i;
+ s/ldrneh/ldrhne/i;
+ s/(vqshrun\.s16 .*, \#)0$/${1}8/i;
+
+ # http://llvm.org/bugs/show_bug.cgi?id=16022
+ s/\.include/#include/;
+ }
+
print;
}