aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-17 14:33:11 -0500
committerGravatar Mike Klein <mtklein@chromium.org>2016-11-17 19:54:10 +0000
commitb6ab4ae59e23b887f033197c08eab0b78f9979fc (patch)
tree63ff0e62e7bfad875f600b9559cd1eef8db22158
parentdb4183d227b764b219e9e314dd5387ded4c38797 (diff)
Be careful about types in SkNx_neon.h.
The Google3 Android ARM build is still using GCC, which isn't so loosey-goosey as Clang about bit-casting back and forth between int32x4_t and uint32x4_t. BUG=skia: Change-Id: I0d54f6859b8e03be4936c51bbaa1967db4261bd4 Reviewed-on: https://skia-review.googlesource.com/4974 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
-rw-r--r--src/opts/SkNx_neon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h
index 3f9637507a..b716cb6df5 100644
--- a/src/opts/SkNx_neon.h
+++ b/src/opts/SkNx_neon.h
@@ -516,11 +516,11 @@ template<> AI /*static*/ Sk4b SkNx_cast<uint8_t, float>(const Sk4f& src) {
template<> AI /*static*/ Sk4i SkNx_cast<int32_t, uint8_t>(const Sk4b& src) {
uint16x8_t _16 = vmovl_u8(src.fVec);
- return vmovl_u16(vget_low_u16(_16));
+ return vreinterpretq_s32_u32(vmovl_u16(vget_low_u16(_16)));
}
template<> AI /*static*/ Sk4f SkNx_cast<float, uint8_t>(const Sk4b& src) {
- return vcvtq_f32_u32(SkNx_cast<int32_t>(src).fVec);
+ return vcvtq_f32_s32(SkNx_cast<int32_t>(src).fVec);
}
template<> AI /*static*/ Sk16b SkNx_cast<uint8_t, float>(const Sk16f& src) {