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 <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
bb10
Thiago Macieira 2015-07-08 19:01:44 -07:00
parent 02418d1aaa
commit c84625f0d5
1 changed files with 2 additions and 2 deletions

View File

@ -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);