Don't allow code path to be forced on a system that doesn't support it

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@159 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2010-03-03 08:46:29 +00:00
parent 048990944f
commit f8b77c44f1

View File

@@ -48,16 +48,16 @@ init_simd (void)
/* Force different settings through environment variables */
env = getenv("JSIMD_FORCEMMX");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = JSIMD_MMX;
simd_support &= JSIMD_MMX;
env = getenv("JSIMD_FORCE3DNOW");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = JSIMD_3DNOW|JSIMD_MMX;
simd_support &= JSIMD_3DNOW|JSIMD_MMX;
env = getenv("JSIMD_FORCESSE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = JSIMD_SSE|JSIMD_MMX;
simd_support &= JSIMD_SSE|JSIMD_MMX;
env = getenv("JSIMD_FORCESSE2");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = JSIMD_SSE2;
simd_support &= JSIMD_SSE2;
}
GLOBAL(int)