summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_sse2.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-04-14 18:00:42 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:48 +0200
commit49fc8921293b664d8ec48a399c4e5ee77f5d3176 (patch)
tree7247dd43be4934d534b7050776be31f29dd81802 /src/gui/painting/qdrawhelper_sse2.cpp
parent4b25f3fa1f7cdbee225b6b8aebe3102f5201e217 (diff)
Compile fix in qdrawhelper_sse2.cpp for MSVC 2005.
(cherry picked from commit 7f921ea08c296e7451a44a1dae15350ae183ea20)
Diffstat (limited to 'src/gui/painting/qdrawhelper_sse2.cpp')
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index c6bd33952c..affc6cc11f 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -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,