]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
workaround for missing _mm_cvtss_f32 on some gcc versionsx
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2011 08:57:38 +0000 (08:57 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2011 08:57:38 +0000 (08:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11024 d7cf8633-e32d-0410-b094-e92efae38249

dpsoftrast.c

index 4f7fbf34aa53b2933e908ccdc70d20cb71e12d4a..ae48e8cd33eef1f458cac263c8d99461c4b4e65c 100644 (file)
@@ -73,6 +73,10 @@ typedef qboolean bool;
 #ifdef SSE_POSSIBLE
 #include <emmintrin.h>
 
+#if defined(__GNUC__) && (__GNUC < 4 || __GNUC_MINOR__ < 6)
+       #define _mm_cvtss_f32(val) (__builtin_ia32_vec_ext_v4sf ((__v4sf)(val), 0))
+#endif
+
 #define MM_MALLOC(size) _mm_malloc(size, ATOMIC_SIZE)
 
 static void *MM_CALLOC(size_t nmemb, size_t size)