diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-15 07:12:07 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-15 07:44:04 (GMT) |
commit | 45c60ceac3d5a401543d7d56a44d1f9227464431 (patch) | |
tree | 9274f6cf9f3b87b88907bbac69b803283bfe7675 | |
parent | 7f921ea08c296e7451a44a1dae15350ae183ea20 (diff) | |
download | Qt-45c60ceac3d5a401543d7d56a44d1f9227464431.zip Qt-45c60ceac3d5a401543d7d56a44d1f9227464431.tar.gz Qt-45c60ceac3d5a401543d7d56a44d1f9227464431.tar.bz2 |
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
-rw-r--r-- | src/gui/painting/qdrawhelper_sse2.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index affc6cc..be6dc91 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 |