Bug 625629 - Don't define MMX in SSE.h since Microsoft compiler for x64 doesn't support MMX. r=jlebar a=bustage-fix

This commit is contained in:
Makoto Kato 2011-01-18 14:08:47 +09:00
Родитель 4d244cb86d
Коммит f2cc5a0073
2 изменённых файлов: 16 добавлений и 4 удалений

Просмотреть файл

@ -26,8 +26,16 @@ CPPSRCS = yuv_convert.cpp \
# yuv_convert_sse2.cpp. These files use MMX and SSE2 intrinsics, so they need
# special compile flags on some compilers.
ifneq (,$(INTEL_ARCHITECTURE))
CPPSRCS += yuv_convert_mmx.cpp \
yuv_convert_sse2.cpp
CPPSRCS += yuv_convert_sse2.cpp
# MSVC doesn't support MMX when targeting AMD64.
ifdef _MSC_VER
ifneq ($(OS_TEST),x86_64)
CPPSRCS += yuv_convert_mmx.cpp
endif
else
CPPSRCS += yuv_convert_mmx.cpp
endif
ifdef GNU_CC
yuv_convert_mmx.$(OBJ_SUFFIX): CXXFLAGS += -mmmx

Просмотреть файл

@ -172,8 +172,8 @@
#endif
#if defined(_M_AMD64)
// MMX is always available on AMD64.
#define MOZILLA_PRESUME_MMX
// MSVC for AMD64 doesn't support MMX, so don't presume it here.
// SSE is always available on AMD64.
#define MOZILLA_PRESUME_SSE
// SSE2 is always available on AMD64.
@ -231,7 +231,11 @@ namespace mozilla {
#define MOZILLA_MAY_SUPPORT_MMX 1
inline bool supports_mmx() { return true; }
#elif defined(MOZILLA_SSE_HAVE_CPUID_DETECTION)
#if !(defined(_MSC_VER) && defined(_M_AMD64))
// Define MOZILLA_MAY_SUPPORT_MMX only if we're not on MSVC for
// AMD64, since that compiler doesn't support MMX.
#define MOZILLA_MAY_SUPPORT_MMX 1
#endif
inline bool supports_mmx() { return sse_private::mmx_enabled; }
#else
inline bool supports_mmx() { return false; }