From 61e535f1ac4ad7307af1582cd669a545f661283b Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 19 Oct 2017 12:39:39 -0700 Subject: [PATCH] dsp/lossless: workaround gcc-4.8 bug on arm and all older versions. force Sub3() to not be inlined, otherwise the code in Select() will be incorrect. extends the check add previously in: 637b3888 dsp/lossless: workaround gcc-4.9 bug on arm BUG=webp:363 Change-Id: I1403b558f8660b764f3a570a3326822d5ef0be29 --- src/dsp/lossless.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index 000d6566..8b03b1bd 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -80,8 +80,9 @@ static WEBP_INLINE uint32_t ClampedAddSubtractHalf(uint32_t c0, uint32_t c1, return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b; } -// gcc-4.9 on ARM generates incorrect code in Select() when Sub3() is inlined. -#if defined(__arm__) && LOCAL_GCC_VERSION == 0x409 +// gcc <= 4.9 on ARM generates incorrect code in Select() when Sub3() is +// inlined. +#if defined(__arm__) && LOCAL_GCC_VERSION <= 0x409 # define LOCAL_INLINE __attribute__ ((noinline)) #else # define LOCAL_INLINE WEBP_INLINE