From c162ccfd1b1698fafefda38e4a677ddd54569b19 Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Fri, 5 Mar 2004 22:17:45 +0000 Subject: [PATCH] Bug 125762 - turn on SSE2 jpeg code (win32). r=sicking, sr=bryner git-svn-id: svn://10.0.0.236/trunk@153592 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/jpeg/jdapimin.c | 5 ++++- mozilla/jpeg/jmorecfg.h | 7 +------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/mozilla/jpeg/jdapimin.c b/mozilla/jpeg/jdapimin.c index 9cc4db702fb..6d4a675883f 100644 --- a/mozilla/jpeg/jdapimin.c +++ b/mozilla/jpeg/jdapimin.c @@ -49,7 +49,10 @@ jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) MMXAvailable = mmxsupport(); #ifdef HAVE_SSE2_INTEL_MNEMONICS - SSE2Available = sse2support(); + /* only do the sse2 support check if mmx is supported (so + we know the processor supports cpuid) */ + if (MMXAvailable) + SSE2Available = sse2support(); #endif cpuidDetected = 1; diff --git a/mozilla/jpeg/jmorecfg.h b/mozilla/jpeg/jmorecfg.h index 2cd9798fa29..5ad307cfbda 100644 --- a/mozilla/jpeg/jmorecfg.h +++ b/mozilla/jpeg/jmorecfg.h @@ -105,18 +105,13 @@ typedef short JSAMPLE; typedef short JCOEF; -/* Defines for MMX support. */ +/* Defines for MMX/SSE2 support. */ #if defined(XP_WIN32) && defined(_M_IX86) #define HAVE_MMX_INTEL_MNEMONICS -#endif - -/* Defines for SSE2 support. */ -#if defined(XP_WIN32) && defined(_M_IX86) && defined(__m128i) #define HAVE_SSE2_INTEL_MNEMONICS #endif - /* Compressed datastreams are represented as arrays of JOCTET. * These must be EXACTLY 8 bits wide, at least once they are written to * external storage. Note that when using the stdio data source/destination