From d85dff3775b00dde079c50bcf417cae5ed884512 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 4 Jul 2022 14:42:45 +0200 Subject: Remove Q_DECL_VECTORCALL when SSE2 is not available It expands to sseregparm in gcc, and then can't build with SSE2 disabled. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-104726 Change-Id: I063ed87ed7f7ba683a19cd3f6e8a25c5111ef72a Reviewed-by: Thiago Macieira --- src/gui/painting/qrgba64_p.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qrgba64_p.h b/src/gui/painting/qrgba64_p.h index e848ae0148..ae8b6fd8cb 100644 --- a/src/gui/painting/qrgba64_p.h +++ b/src/gui/painting/qrgba64_p.h @@ -81,18 +81,22 @@ static inline QRgba64 multiplyAlpha65535(QRgba64 rgba64, uint alpha65535) #endif } +#if defined(__SSE2__) || defined(__ARM_NEON__) template static inline T Q_DECL_VECTORCALL multiplyAlpha255(T rgba64, uint alpha255) { -#if defined(__SSE2__) || defined(__ARM_NEON__) return multiplyAlpha65535(rgba64, alpha255 * 257); +} #else +template +static inline T multiplyAlpha255(T rgba64, uint alpha255) +{ return QRgba64::fromRgba64(qt_div_255(rgba64.red() * alpha255), qt_div_255(rgba64.green() * alpha255), qt_div_255(rgba64.blue() * alpha255), qt_div_255(rgba64.alpha() * alpha255)); -#endif } +#endif #if defined __SSE2__ static inline __m128i Q_DECL_VECTORCALL interpolate255(__m128i x, uint alpha1, __m128i y, uint alpha2) -- cgit v1.2.3