Compile by USE_SSE2 only without USE_MMX
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 18 Feb 2010 05:30:01 +0000 (14:30 +0900)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Thu, 18 Feb 2010 18:09:08 +0000 (13:09 -0500)
Although we added MMX emulation for Microsoft Visual C++ compiler for x64,
USE_SSE2 still requires USE_MMX.  So we remove dependency of USE_MMX
for Windows x64.

Signed-off-by: Makoto Kato <m_kato@ga2.so-net.ne.jp>
pixman/pixman-cpu.c
pixman/pixman-sse2.c

index d727ddb..e96b140 100644 (file)
@@ -309,7 +309,7 @@ pixman_have_arm_neon (void)
 
 #endif /* USE_ARM_SIMD || USE_ARM_NEON */
 
-#ifdef USE_MMX
+#if defined(USE_MMX) || defined(USE_SSE2)
 /* The CPU detection code needs to be in a file not compiled with
  * "-mmmx -msse", as gcc would generate CMOV instructions otherwise
  * that would lead to SIGILL instructions on old CPUs that don't have
index 2bade74..f69de0b 100644 (file)
@@ -5955,8 +5955,12 @@ __attribute__((__force_align_arg_pointer__))
 pixman_implementation_t *
 _pixman_implementation_create_sse2 (void)
 {
-    pixman_implementation_t *mmx = _pixman_implementation_create_mmx ();
-    pixman_implementation_t *imp = _pixman_implementation_create (mmx);
+#ifdef USE_MMX
+    pixman_implementation_t *fallback = _pixman_implementation_create_mmx ();
+#else
+    pixman_implementation_t *fallback = _pixman_implementation_create_fast_path ();
+#endif
+    pixman_implementation_t *imp = _pixman_implementation_create (fallback);
 
     /* SSE2 constants */
     mask_565_r  = create_mask_2x32_128 (0x00f80000, 0x00f80000);