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
This commit is contained in:
James Zern 2017-10-19 12:39:39 -07:00
parent 68b2eab7df
commit 61e535f1ac

View File

@ -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; return ((uint32_t)a << 24) | (r << 16) | (g << 8) | b;
} }
// gcc-4.9 on ARM generates incorrect code in Select() when Sub3() is inlined. // gcc <= 4.9 on ARM generates incorrect code in Select() when Sub3() is
#if defined(__arm__) && LOCAL_GCC_VERSION == 0x409 // inlined.
#if defined(__arm__) && LOCAL_GCC_VERSION <= 0x409
# define LOCAL_INLINE __attribute__ ((noinline)) # define LOCAL_INLINE __attribute__ ((noinline))
#else #else
# define LOCAL_INLINE WEBP_INLINE # define LOCAL_INLINE WEBP_INLINE