diff -up chromium-83.0.4103.97/third_party/skia/include/private/SkVx.h.gcc10-aarch64-hack chromium-83.0.4103.97/third_party/skia/include/private/SkVx.h --- chromium-83.0.4103.97/third_party/skia/include/private/SkVx.h.gcc10-aarch64-hack 2020-06-18 14:47:30.912177044 +0000 +++ chromium-83.0.4103.97/third_party/skia/include/private/SkVx.h 2020-06-18 14:51:08.230506417 +0000 @@ -141,6 +141,15 @@ static inline D bit_pun(const S& s) { return d; } +// This is a hack to work around GCC PR95726 +template +static inline D bit_pun2(const S& s) { + static_assert(sizeof(D) == sizeof(S), ""); + D d; + memcpy(&d, &s, sizeof(D)); + return d; +} + // Translate from a value type T to its corresponding Mask, the result of a comparison. template struct Mask { using type = T; }; template <> struct Mask { using type = int32_t; }; @@ -554,9 +563,9 @@ static inline Vec approx_scal static inline Vec<4,float> if_then_else(const Vec<4,int >& c, const Vec<4,float>& t, const Vec<4,float>& e) { - return bit_pun>(vbslq_f32(bit_pun (c), - bit_pun(t), - bit_pun(e))); + return bit_pun>(vbslq_f32(bit_pun2 (c), + bit_pun2(t), + bit_pun2(e))); } #endif @@ -581,9 +590,9 @@ static inline Vec approx_scal const Vec<4,float>& y, const Vec<4,float>& z) { // These instructions tend to work like z += xy, so the order here is z,x,y. - return bit_pun>(vfmaq_f32(bit_pun(z), - bit_pun(x), - bit_pun(y))); + return bit_pun>(vfmaq_f32(bit_pun2(z), + bit_pun2(x), + bit_pun2(y))); } #endif