SkSplicer: move armv7 ABI settings into build_stages.py.

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>
This commit is contained in:
Mike Klein 2017-01-21 10:16:15 -05:00
parent 58ce2bc51a
commit 4a84f0afe0
3 changed files with 4 additions and 13 deletions

View 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);

View 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);

View File

@ -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'] +