From: Mike Klein Date: Sat, 21 Jan 2017 15:16:15 +0000 (-0500) Subject: SkSplicer: move armv7 ABI settings into build_stages.py. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~55^2~713 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a84f0afe04c77cce207e65d12946531c28917c5;p=platform%2Fupstream%2FlibSkiaSharp.git 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 Reviewed-by: Mike Klein --- diff --git a/src/splicer/SkSplicer_stages.cpp b/src/splicer/SkSplicer_stages.cpp index 4112779..9c5a442 100644 --- a/src/splicer/SkSplicer_stages.cpp +++ b/src/splicer/SkSplicer_stages.cpp @@ -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); diff --git a/src/splicer/SkSplicer_stages_lowp.cpp b/src/splicer/SkSplicer_stages_lowp.cpp index 9e5ea4e..244c733 100644 --- a/src/splicer/SkSplicer_stages_lowp.cpp +++ b/src/splicer/SkSplicer_stages_lowp.cpp @@ -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); diff --git a/src/splicer/build_stages.py b/src/splicer/build_stages.py index 33f4dfe..9a52bec 100755 --- a/src/splicer/build_stages.py +++ b/src/splicer/build_stages.py @@ -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'] +