Make environment variable syntax consistent between ARM and x86 code, and add an option to disable SIMD on x86 (this option will be added to the x86-64 code as well, but it makes more sense to add it when we add AVX support.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1073 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2013-10-31 07:40:24 +00:00
parent 7a0bc500e2
commit fabf58ed48
2 changed files with 7 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
* jsimd_arm.c
*
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright 2009-2011 D. R. Commander
* Copyright 2009-2011, 2013 D. R. Commander
*
* Based on the x86 SIMD extension for IJG JPEG library,
* Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -123,10 +123,10 @@ init_simd (void)
#endif
/* Force different settings through environment variables */
env = getenv("JSIMD_FORCE_ARM_NEON");
env = getenv("JSIMD_FORCENEON");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support &= JSIMD_ARM_NEON;
env = getenv("JSIMD_FORCE_NO_SIMD");
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
}

View File

@@ -2,7 +2,7 @@
* jsimd_i386.c
*
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright 2009-2011 D. R. Commander
* Copyright 2009-2011, 2013 D. R. Commander
*
* Based on the x86 SIMD extension for IJG JPEG library,
* Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -59,6 +59,9 @@ init_simd (void)
env = getenv("JSIMD_FORCESSE2");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support &= JSIMD_SSE2;
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
}
GLOBAL(int)