From 2772775d024b202d5879ca694e056754852b19f4 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Mon, 13 Jun 2011 17:12:33 +0900 Subject: [PATCH] Bug 662765 - Respect _M_IX86_FP. r=jlebar --- xpcom/glue/SSE.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xpcom/glue/SSE.h b/xpcom/glue/SSE.h index edf16054aa2..b0cc33c6db6 100644 --- a/xpcom/glue/SSE.h +++ b/xpcom/glue/SSE.h @@ -171,7 +171,18 @@ #define MOZILLA_SSE_HAVE_CPUID_DETECTION #endif -#if defined(_M_AMD64) +#if defined(_M_IX86_FP) + +#if _M_IX86_FP >= 1 + // It's ok to use SSE instructions based on the /arch option + #define MOZILLA_PRESUME_SSE +#endif +#if _M_IX86_FP >= 2 + // It's ok to use SSE2 instructions based on the /arch option + #define MOZILLA_PRESUME_SSE2 +#endif + +#elif defined(_M_AMD64) // MSVC for AMD64 doesn't support MMX, so don't presume it here. // SSE is always available on AMD64.