Distinguish pentium4, prescott and nocona.
This commit is contained in:
parent
4495b28dea
commit
d04b978dc5
31
config.guess
vendored
31
config.guess
vendored
@ -694,11 +694,12 @@ _cpuid:
|
|||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cat <<EOF >${dummy}2.c
|
cat <<EOF >${dummy}2.c
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
char vendor_string[13];
|
char vendor_string[13];
|
||||||
char dummy_string[12];
|
char features[12];
|
||||||
long fms;
|
long fms;
|
||||||
int family, model, stepping;
|
int family, model, stepping;
|
||||||
char *modelstr;
|
char *modelstr;
|
||||||
@ -706,13 +707,15 @@ main ()
|
|||||||
cpuid (vendor_string, 0);
|
cpuid (vendor_string, 0);
|
||||||
vendor_string[12] = 0;
|
vendor_string[12] = 0;
|
||||||
|
|
||||||
fms = cpuid (dummy_string, 1);
|
fms = cpuid (features, 1);
|
||||||
|
|
||||||
family = ((fms >> 8) & 15) + ((fms >> 20) & 0xff);
|
family = ((fms >> 8) & 15) + ((fms >> 20) & 0xff);
|
||||||
model = ((fms >> 4) & 15) + ((fms >> 12) & 0xf0);
|
model = ((fms >> 4) & 15) + ((fms >> 12) & 0xf0);
|
||||||
stepping = fms & 15;
|
stepping = fms & 15;
|
||||||
|
|
||||||
modelstr = "i486";
|
modelstr = "i486";
|
||||||
|
|
||||||
|
cat <<EOF >>${dummy}2.c
|
||||||
if (strcmp (vendor_string, "GenuineIntel") == 0)
|
if (strcmp (vendor_string, "GenuineIntel") == 0)
|
||||||
{
|
{
|
||||||
switch (family)
|
switch (family)
|
||||||
@ -731,13 +734,32 @@ main ()
|
|||||||
else if (model == 23) modelstr = "core2"; // 64 bits
|
else if (model == 23) modelstr = "core2"; // 64 bits
|
||||||
else modelstr = "p6???";
|
else modelstr = "p6???";
|
||||||
break;
|
break;
|
||||||
|
EOF
|
||||||
|
case "$guess_cpu" in
|
||||||
|
i?86)
|
||||||
|
cat <<EOF >>${dummy}2.c
|
||||||
case 15:
|
case 15:
|
||||||
if (model <= 3) modelstr = "pentium4";
|
if (model <= 6) modelstr = "pentium4";
|
||||||
else if (model <= 6) modelstr = "pentiumD"; // 64 bits
|
|
||||||
else modelstr = "p4???";
|
else modelstr = "p4???";
|
||||||
|
int feat = ((int *)features)[2];
|
||||||
|
if (feat & 1) modelstr = "prescott";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
cat <<EOF >>${dummy}2.c
|
||||||
|
case 15:
|
||||||
|
modelstr = "nocona";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cat <<EOF >>${dummy}2.c
|
||||||
else if (strcmp (vendor_string, "AuthenticAMD") == 0)
|
else if (strcmp (vendor_string, "AuthenticAMD") == 0)
|
||||||
{
|
{
|
||||||
switch (family)
|
switch (family)
|
||||||
@ -778,6 +800,7 @@ main ()
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
if ($CC_FOR_BUILD ${dummy}1.s ${dummy}2.c -o $dummy) >/dev/null 2>&1; then
|
if ($CC_FOR_BUILD ${dummy}1.s ${dummy}2.c -o $dummy) >/dev/null 2>&1; then
|
||||||
# On 80386 and early 80486 cpuid is not available and will result in a
|
# On 80386 and early 80486 cpuid is not available and will result in a
|
||||||
# SIGILL message, hence 2>/dev/null.
|
# SIGILL message, hence 2>/dev/null.
|
||||||
|
@ -300,7 +300,8 @@ case $basic_machine in
|
|||||||
| avr-* \
|
| avr-* \
|
||||||
| bs2000-* \
|
| bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||||
| clipper-* | core2-* | cydra-* \
|
| core2-* \
|
||||||
|
| clipper-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| elxsi-* \
|
||||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||||
@ -327,11 +328,14 @@ case $basic_machine in
|
|||||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||||
| mipstx39-* | mipstx39el-* \
|
| mipstx39-* | mipstx39el-* \
|
||||||
| msp430-* \
|
| msp430-* \
|
||||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
| nocona-* \
|
||||||
|
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
| pentium4-* \
|
||||||
| pyramid-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||||
|
| prescott-* \
|
||||||
|
| pyramid-* \
|
||||||
| romp-* | rs6000-* \
|
| romp-* | rs6000-* \
|
||||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
@ -441,7 +445,10 @@ case $basic_machine in
|
|||||||
basic_machine=c38-convex
|
basic_machine=c38-convex
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
cray | j90)
|
core-*)
|
||||||
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
|
cray | j90)
|
||||||
basic_machine=j90-cray
|
basic_machine=j90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
@ -796,9 +803,6 @@ case $basic_machine in
|
|||||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
;;
|
;;
|
||||||
pentium4)
|
|
||||||
basic_machine=i786-pc
|
|
||||||
;;
|
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
@ -808,13 +812,6 @@ case $basic_machine in
|
|||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium4-*)
|
|
||||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
|
||||||
;;
|
|
||||||
pentiumD-*)
|
|
||||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
|
||||||
;;
|
|
||||||
|
|
||||||
pn)
|
pn)
|
||||||
basic_machine=pn-gould
|
basic_machine=pn-gould
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user