From c84625f0d565d12038c72528d1af9bee1a7100bc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Jul 2015 19:01:44 -0700 Subject: Fix compilation with GCC 4.9.2 and up in debug mode Somehow the const int is no longer understood to be an immediate. GCC 4.8 still compiles this fine. qstring.cpp:316:34: error: the fifth argument must be an 8-bit immediate Change-Id: Ib056b47dde3341ef9a52ffff13ef24d541833abc Reviewed-by: Marc Mutz Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qstring.cpp') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index bbb5647eea..d63982d1f5 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -274,9 +274,9 @@ static inline __m128i mergeQuestionMarks(__m128i chunk) // that they are doing the right thing. Inverting the arguments in the // instruction does cause a bunch of test failures. - const int mode = _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK; const __m128i rangeMatch = _mm_cvtsi32_si128(0xffff0100); - const __m128i offLimitMask = _mm_cmpestrm(rangeMatch, 2, chunk, 8, mode); + const __m128i offLimitMask = _mm_cmpestrm(rangeMatch, 2, chunk, 8, + _SIDD_UWORD_OPS | _SIDD_CMP_RANGES | _SIDD_UNIT_MASK); // replace the non-Latin 1 characters in the chunk with question marks chunk = _mm_blendv_epi8(chunk, questionMark, offLimitMask); -- cgit v1.2.3