aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jumper/SkJumper.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-08-28 12:18:26 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-28 17:40:36 +0000
commitd6e12862f08e4fb6491f350d01e24bc907817569 (patch)
tree8d0b0e6a9caa7dd455ecb872887f9ff70209dda3 /src/jumper/SkJumper.h
parent2e86634ae64ac333100d55a49992143fbf143384 (diff)
split up JUMPER define
Whether JUMPER is defined is starting to get a little overloaded: - are we compiling offline (defined) or as part of Skia (!defined)? - are we using Clang vector extensions (defined) or scalars (!defined)? This splits JUMPER into these two separate concerns: - JUMPER_IS_OFFLINE - JUMPER_IS_SCALAR, JUMPER_IS_NEON, JUMPER_IS_AVX2, etc. The upshot is that we'll now use Clang vector extensions when available for our "portable" baseline. On x86-64 and ARMv8 compiled by Clang, we're guaranteed to pick up SSE2 and NEON respectively. Our -Fast bot should even get all the way to AVX2. Another CL will do some refactoring in SkJumper to remove the redundant copies of guaranteed vector code on x86-64 and ARMv8. I didn't want to do that here yet to demonstrate that there is zero effect on the .S files from this CL. Change-Id: Ib5e8f00b35e8721b2cc7180e294840ffaf9dddce Reviewed-on: https://skia-review.googlesource.com/39500 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/jumper/SkJumper.h')
-rw-r--r--src/jumper/SkJumper.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jumper/SkJumper.h b/src/jumper/SkJumper.h
index d4e8ef4f37..20b8d32aba 100644
--- a/src/jumper/SkJumper.h
+++ b/src/jumper/SkJumper.h
@@ -13,15 +13,15 @@
// Keep it simple!
// Externally facing functions (start_pipeline) are called a little specially on Windows.
-#if defined(JUMPER) && defined(WIN) && defined(__x86_64__)
+#if defined(JUMPER_IS_OFFLINE) && defined(WIN) && defined(__x86_64__)
#define MAYBE_MSABI __attribute__((ms_abi)) // Use MS' ABI, not System V.
-#elif defined(JUMPER) && defined(WIN) && defined(__i386__)
+#elif defined(JUMPER_IS_OFFLINE) && defined(WIN) && defined(__i386__)
#define MAYBE_MSABI __attribute__((force_align_arg_pointer)) // Re-align stack 4 -> 16 bytes.
#else
#define MAYBE_MSABI
#endif
-#if defined(JUMPER) && (defined(__aarch64__) || defined(__arm__))
+#if defined(JUMPER_IS_OFFLINE) && (defined(__aarch64__) || defined(__arm__))
// To reduce SkJumper's dependency on the Android NDK,
// we provide what we need from <string.h>, <stdint.h>, and <stddef.h> ourselves.
#define memcpy __builtin_memcpy