summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_sse2.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-04-15 09:12:07 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:48 +0200
commitc889ddb59d774116242823613956ad1427a82f01 (patch)
tree9903d01333eb6eee4524d8c367e047a63d5b61fd /src/gui/painting/qdrawhelper_sse2.cpp
parent49fc8921293b664d8ec48a399c4e5ee77f5d3176 (diff)
Another attempt at fixing the MSVC2005 build.
Apparently direct casting is illegal there too, even though they don't have the cast operators. Reviewed-by: Kim (cherry picked from commit 45c60ceac3d5a401543d7d56a44d1f9227464431)
Diffstat (limited to 'src/gui/painting/qdrawhelper_sse2.cpp')
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index affc6cc11f..be6dc91922 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -525,7 +525,12 @@ public:
// 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); }
+ static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b)
+ {
+ union Convert { Int32x4 vi; Float32x4 vf; } convert;
+ convert.vf = _mm_cmpgt_ps(a, b);
+ return convert.vi;
+ }
#else
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
#endif