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