add via nano cpuid and code path
This commit is contained in:
parent
058e94c369
commit
a2bf208858
54
configure
vendored
54
configure
vendored
@ -4081,7 +4081,7 @@ echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i
|
||||
gcc_cflags_cpu="-mtune=nocona -mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486"
|
||||
gcc_cflags_arch="-march=nocona -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium"
|
||||
;;
|
||||
viac32)
|
||||
nano | viac32)
|
||||
# Not sure of the best fallbacks here for -mcpu.
|
||||
# c3-2 has sse and mmx, so pentium3 is good for -march.
|
||||
gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486"
|
||||
@ -4125,7 +4125,7 @@ echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i
|
||||
nehalem) path="x86/nehalem x86" ;;
|
||||
prescott | netburst | netburstlahf) path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86" ;;
|
||||
# VIA/Centaur processors, sold as CyrixIII and C3.
|
||||
viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
|
||||
nano | viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
|
||||
viac3*) path="x86/pentium/mmx x86/pentium x86";;
|
||||
*) path="x86" ;;
|
||||
esac
|
||||
@ -4194,6 +4194,8 @@ echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i
|
||||
path_64="x86_64/nehalem x86_64" ;;
|
||||
atom-*-*)
|
||||
path_64="x86_64/atom x86_64" ;;
|
||||
nano-*-*)
|
||||
path_64="x86_64/nano x86_64" ;;
|
||||
esac
|
||||
|
||||
# If the user asked for a fat build, override the path set above
|
||||
@ -4202,7 +4204,7 @@ echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i
|
||||
gcc_64_cflags_arch=""
|
||||
extra_functions_64="$extra_functions_64 fat fat_entry"
|
||||
path_64="x86_64/fat x86_64"
|
||||
fat_path_64="x86_64 x86_64/fat x86_64/netburst x86_64/netburst/netburstlahf x86_64/k8 x86_64/k8/k10 x86_64/k8/k10/k102 x86_64/core2 x86_64/core2/penryn x86_64/nehalem x86_64/atom"
|
||||
fat_path_64="x86_64 x86_64/fat x86_64/netburst x86_64/netburst/netburstlahf x86_64/k8 x86_64/k8/k10 x86_64/k8/k10/k102 x86_64/core2 x86_64/core2/penryn x86_64/nehalem x86_64/atom x86_64/nano"
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -11038,7 +11040,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 11041 "configure"' > conftest.$ac_ext
|
||||
echo '#line 11043 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -13107,11 +13109,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:13110: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:13112: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:13114: \$? = $ac_status" >&5
|
||||
echo "$as_me:13116: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -13397,11 +13399,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:13400: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:13402: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:13404: \$? = $ac_status" >&5
|
||||
echo "$as_me:13406: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -13501,11 +13503,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:13504: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:13506: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:13508: \$? = $ac_status" >&5
|
||||
echo "$as_me:13510: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -15850,7 +15852,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 15853 "configure"
|
||||
#line 15855 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -15950,7 +15952,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 15953 "configure"
|
||||
#line 15955 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -18370,11 +18372,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:18373: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:18375: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:18377: \$? = $ac_status" >&5
|
||||
echo "$as_me:18379: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -18474,11 +18476,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:18477: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:18479: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:18481: \$? = $ac_status" >&5
|
||||
echo "$as_me:18483: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -20036,11 +20038,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:20039: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:20041: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:20043: \$? = $ac_status" >&5
|
||||
echo "$as_me:20045: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -20140,11 +20142,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:20143: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:20145: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:20147: \$? = $ac_status" >&5
|
||||
echo "$as_me:20149: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -22327,11 +22329,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:22330: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22332: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:22334: \$? = $ac_status" >&5
|
||||
echo "$as_me:22336: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -22617,11 +22619,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:22620: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22622: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:22624: \$? = $ac_status" >&5
|
||||
echo "$as_me:22626: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -22721,11 +22723,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:22724: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22726: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:22728: \$? = $ac_status" >&5
|
||||
echo "$as_me:22730: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -1409,7 +1409,7 @@ case $host in
|
||||
gcc_cflags_cpu="-mtune=nocona -mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486"
|
||||
gcc_cflags_arch="-march=nocona -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium"
|
||||
;;
|
||||
viac32)
|
||||
nano | viac32)
|
||||
# Not sure of the best fallbacks here for -mcpu.
|
||||
# c3-2 has sse and mmx, so pentium3 is good for -march.
|
||||
gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486"
|
||||
@ -1453,7 +1453,7 @@ case $host in
|
||||
nehalem) path="x86/nehalem x86" ;;
|
||||
prescott | netburst | netburstlahf) path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86" ;;
|
||||
# VIA/Centaur processors, sold as CyrixIII and C3.
|
||||
viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
|
||||
nano | viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";;
|
||||
viac3*) path="x86/pentium/mmx x86/pentium x86";;
|
||||
*) path="x86" ;;
|
||||
esac
|
||||
@ -1522,6 +1522,8 @@ case $host in
|
||||
path_64="x86_64/nehalem x86_64" ;;
|
||||
atom-*-*)
|
||||
path_64="x86_64/atom x86_64" ;;
|
||||
nano-*-*)
|
||||
path_64="x86_64/nano x86_64" ;;
|
||||
esac
|
||||
|
||||
# If the user asked for a fat build, override the path set above
|
||||
@ -1530,7 +1532,7 @@ case $host in
|
||||
gcc_64_cflags_arch=""
|
||||
extra_functions_64="$extra_functions_64 fat fat_entry"
|
||||
path_64="x86_64/fat x86_64"
|
||||
fat_path_64="x86_64 x86_64/fat x86_64/netburst x86_64/netburst/netburstlahf x86_64/k8 x86_64/k8/k10 x86_64/k8/k10/k102 x86_64/core2 x86_64/core2/penryn x86_64/nehalem x86_64/atom"
|
||||
fat_path_64="x86_64 x86_64/fat x86_64/netburst x86_64/netburst/netburstlahf x86_64/k8 x86_64/k8/k10 x86_64/k8/k10/k102 x86_64/core2 x86_64/core2/penryn x86_64/nehalem x86_64/atom x86_64/nano"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
12
cpuid.c
12
cpuid.c
@ -29,7 +29,7 @@ Boston, MA 02110-1301, USA.
|
||||
// this should return the microarchitecture , NOT which code path we think is best
|
||||
|
||||
#if CONFIG_GUESS
|
||||
// use's the stringinzing directive #x so MODELSTR(teddy) expands to modelstr="teddy"
|
||||
// use's the stringinzing directive #x ie #x expands to "x"
|
||||
#define CPUIS(x) modelstr=#x
|
||||
#define __gmpn_cpuid cpuid
|
||||
#endif
|
||||
@ -115,19 +115,21 @@ Boston, MA 02110-1301, USA.
|
||||
CPUIS(k8);
|
||||
break;
|
||||
case 16:
|
||||
if (model == 2) { CPUIS(k10);break;} // phenom
|
||||
if (model == 4) { CPUIS(k102);break;} //phenom II
|
||||
if (model == 2) { CPUIS(k10);break;}
|
||||
if (model == 4) { CPUIS(k102);break;}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if CONFIG_GUESS_32 || FAT32
|
||||
else if (strcmp (vendor_string, "CentaurHauls") == 0)
|
||||
{
|
||||
switch (family)
|
||||
{
|
||||
case 6:
|
||||
if (model == 15){CPUIS(nano);break;}
|
||||
#if CONFIG_GUESS_32BIT || FAT32
|
||||
if (model < 9) { CPUIS(viac3);break;}
|
||||
CPUIS(viac32);break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -205,6 +205,7 @@ __gmpn_cpuvec_init (void)
|
||||
#define CPUSETUP_penryn CPUVEC_SETUP_core2;CPUVEC_SETUP_core2_penryn
|
||||
#define CPUSETUP_nehalem CPUVEC_SETUP_nehalem
|
||||
#define CPUSETUP_atom CPUVEC_SETUP_atom
|
||||
#define CPUSETUP_nano CPUVEC_SETUP_nano
|
||||
#define CPUSETUP_netburst CPUVEC_SETUP_netburst
|
||||
#define CPUSETUP_netburstlahf CPUVEC_SETUP_netburst;CPUVEC_SETUP_netburst_netburstlahf
|
||||
#define CPUSETUP_k8 CPUVEC_SETUP_k8
|
||||
|
Loading…
Reference in New Issue
Block a user