SkSplicer: move armv7 ABI settings into build_stages.py.
authorMike Klein <mtklein@chromium.org>
Sat, 21 Jan 2017 15:16:15 +0000 (10:16 -0500)
committerMike Klein <mtklein@chromium.org>
Sat, 21 Jan 2017 15:24:38 +0000 (15:24 +0000)
This just tidies up the .cpp files a bit, and makes it easier to make
sure all exported functions use the aapcs-vfp callig convention, which
hard-float implies.

As a small simplification, fold -march=armv7-a into --target.

No generated code changes.

Change-Id: I2694970a6e48bd69c41dd280a44ddd0029e52ae8
Reviewed-on: https://skia-review.googlesource.com/7371
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
src/splicer/SkSplicer_stages.cpp
src/splicer/SkSplicer_stages_lowp.cpp
src/splicer/build_stages.py

index 4112779..9c5a442 100644 (file)
@@ -90,12 +90,7 @@ static T unaligned_load(const P* p) {
 
 // We'll be compiling this file to an object file, then extracting parts of it into
 // SkSplicer_generated.h.  It's easier to do if the function names are not C++ mangled.
-// On ARMv7, use aapcs-vfp calling convention to pass as much data in registers as possible.
-#if defined(__ARM_NEON__)
-    #define C extern "C" __attribute__((pcs("aapcs-vfp")))
-#else
-    #define C extern "C"
-#endif
+#define C extern "C"
 
 // Stages all fit a common interface that allows SkSplicer to splice them together.
 using Stage = void(size_t x, size_t limit, void* ctx, K* k, F,F,F,F, F,F,F,F);
index 9e5ea4e..244c733 100644 (file)
@@ -143,11 +143,7 @@ static T unaligned_load(const P* p) {
     return v;
 }
 
-#if defined(__ARM_NEON__)
-    #define C extern "C" __attribute__((pcs("aapcs-vfp")))
-#else
-    #define C extern "C"
-#endif
+#define C extern "C"
 
 using Stage = void(size_t x, size_t limit, void* ctx, K* k, F,F,F,F, F,F,F,F);
 
index 33f4dfe..9a52bec 100755 (executable)
@@ -37,10 +37,10 @@ subprocess.check_call(['clang++'] + cflags + aarch64 +
                       ['-o', 'aarch64_lowp.o'])
 
 armv7 = [
-    '--target=arm-linux-androideabi',
+    '--target=armv7a-linux-android',
     '--sysroot=' + ndk + 'platforms/android-18/arch-arm',
-    '-march=armv7-a',
     '-mfpu=neon-vfpv4',
+    '-mfloat-abi=hard',
 ]
 subprocess.check_call(['clang++'] + cflags + armv7 +
                       ['-c', 'src/splicer/SkSplicer_stages.cpp'] +