Bug 536725 - Disable SSE1 code on Windows x64 r=jmuizelaar
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 01 Feb 2010 17:43:21 +0900
changeset 37789 f57b95afb57e72b65a4e56de0d5582e8248442bb
parent 37788 7006acb49dfb6560274b11ba82c5cb41c4a353f9
child 37790 be38c78eb674076c899f248f43466d09831780fa
push id11435
push userm_kato@ga2.so-net.ne.jp
push dateMon, 01 Feb 2010 08:45:00 +0000
treeherdermozilla-central@f57b95afb57e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs536725
milestone1.9.3a1pre
Bug 536725 - Disable SSE1 code on Windows x64 r=jmuizelaar
gfx/qcms/Makefile.in
gfx/qcms/transform.c
--- a/gfx/qcms/Makefile.in
+++ b/gfx/qcms/Makefile.in
@@ -11,16 +11,19 @@ LIBXUL_LIBRARY = 1
 GRE_MODULE      = 1
 DIST_INSTALL = 1
 
 EXPORTS      = qcms.h qcmstypes.h
 
 CSRCS = iccread.c transform.c
 
 ifeq (86,$(findstring 86,$(OS_TEST)))
+ifeq ($(OS_ARCH)_$(OS_TEST),WINNT_x86_64)
+	CSRCS += transform-sse2.c
+else
 	CSRCS += transform-sse2.c transform-sse1.c
 ifdef GNU_CC
 	SSE1_FLAGS=-msse
 	SSE2_FLAGS=-msse2
 else
 ifeq ($(SOLARIS_SUNPRO_CC),1)
 ifneq (64,$(findstring 64,$(OS_TEST)))
 	SSE1_FLAGS=-xarch=sse
@@ -32,16 +35,17 @@ else
 	SSE2_FLAGS= -xO4
 endif
 else
 	SSE1_FLAGS=
 	SSE2_FLAGS=
 endif
 endif
 endif
+endif
 
 FORCE_STATIC_LIB = 1
 # This library is used by other shared libs
 FORCE_USE_PIC = 1
 
 include $(topsrcdir)/config/rules.mk
 
 CFLAGS          += -DMOZ_QCMS
--- a/gfx/qcms/transform.c
+++ b/gfx/qcms/transform.c
@@ -1221,23 +1221,26 @@ qcms_transform* qcms_transform_create(
 	    if (precache) {
 #ifdef X86
 		    if (sse_version_available() >= 2) {
 			    if (in_type == QCMS_DATA_RGB_8)
 				    transform->transform_fn = qcms_transform_data_rgb_out_lut_sse2;
 			    else
 				    transform->transform_fn = qcms_transform_data_rgba_out_lut_sse2;
 
+#if !(defined(_MSC_VER) && defined(_M_AMD64))
+                    /* Microsoft Compiler for x64 doesn't support MMX.
+                     * SSE code uses MMX so that we disable on x64 */
 		    } else
 		    if (sse_version_available() >= 1) {
 			    if (in_type == QCMS_DATA_RGB_8)
 				    transform->transform_fn = qcms_transform_data_rgb_out_lut_sse1;
 			    else
 				    transform->transform_fn = qcms_transform_data_rgba_out_lut_sse1;
-
+#endif
 		    } else
 #endif
 		    {
 			    if (in_type == QCMS_DATA_RGB_8)
 				    transform->transform_fn = qcms_transform_data_rgb_out_lut_precache;
 			    else
 				    transform->transform_fn = qcms_transform_data_rgba_out_lut_precache;
 		    }