Compile fix in qdrawhelper_sse2.cpp for MSVC 2005.
authorSamuel Rødal <samuel.rodal@nokia.com>
Thu, 14 Apr 2011 16:00:42 +0000 (18:00 +0200)
committerOlivier Goffart <olivier.goffart@nokia.com>
Tue, 10 May 2011 10:54:48 +0000 (12:54 +0200)
(cherry picked from commit 7f921ea08c296e7451a44a1dae15350ae183ea20)

src/gui/painting/qdrawhelper_sse2.cpp

index c6bd339..affc6cc 100644 (file)
@@ -523,7 +523,12 @@ public:
 
     static inline Int32x4 v_toInt(Float32x4 x) { return _mm_cvttps_epi32(x); }
 
+    // pre-VS 2008 doesn't have cast intrinsics, whereas 2008 and later requires it
+#if defined(Q_CC_MSVC) && _MSC_VER < 1500
+    static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return (__m128i)_mm_cmpgt_ps(a, b); }
+#else
     static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
+#endif
 };
 
 const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data,