| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: subr_x86,v 1.12 2009/03/04 00:32:44 abs Exp $ | | 1 | # $NetBSD: subr_x86,v 1.13 2009/03/30 21:02:25 abs Exp $ |
2 | | | 2 | |
3 | # Apparently the only way to reliably determine the architecture of a recent | | 3 | # Apparently the only way to reliably determine the architecture of a recent |
4 | # Intel CPU is to use the cpu brand string - as they reused family and | | 4 | # Intel CPU is to use the cpu brand string - as they reused family and |
5 | # extended family bitflags... annoying | | 5 | # extended family bitflags... annoying |
6 | # Even better, they appear to have reused brand strings between Northwood | | 6 | # Even better, they appear to have reused brand strings between Northwood |
7 | # and Prescott pentium4s. Thats just... special. | | 7 | # and Prescott pentium4s. Thats just... special. |
8 | | | 8 | |
9 | # AMD, in contrast decided to keep things simple: | | 9 | # AMD, in contrast decided to keep things simple: |
10 | # (thanks to Christoph Egger for this list) | | 10 | # (thanks to Christoph Egger for this list) |
11 | # Family 0x6: AMD K7 | | 11 | # Family 0x6: AMD K7 |
12 | # Family 0xf: AMD K8 | | 12 | # Family 0xf: AMD K8 |
13 | # Family 0x10: AMD Barcelona/Phenom | | 13 | # Family 0x10: AMD Barcelona/Phenom |
14 | # Family 0x11: AMD Turion Ultra | | 14 | # Family 0x11: AMD Turion Ultra |
| @@ -20,27 +20,27 @@ map_x86_brand_string() | | | @@ -20,27 +20,27 @@ map_x86_brand_string() |
20 | case "$cpu_family-$cpu_model" in | | 20 | case "$cpu_family-$cpu_model" in |
21 | 5-6 | 5-7 ) echo '-march=k6' ;; | | 21 | 5-6 | 5-7 ) echo '-march=k6' ;; |
22 | 5-8 ) echo '-march=k6-2' ;; | | 22 | 5-8 ) echo '-march=k6-2' ;; |
23 | 5-9 ) echo '-march=k6-3' ;; | | 23 | 5-9 ) echo '-march=k6-3' ;; |
24 | 6-1 | 6-2 | 6-3 ) echo '-march=athlon' ;; | | 24 | 6-1 | 6-2 | 6-3 ) echo '-march=athlon' ;; |
25 | 6-4 | 6-6 | 6-7 | 6-8 | 6-a ) echo '-march=athlon-4' ;; | | 25 | 6-4 | 6-6 | 6-7 | 6-8 | 6-a ) echo '-march=athlon-4' ;; |
26 | esac | | 26 | esac |
27 | ;; | | 27 | ;; |
28 | | | 28 | |
29 | "VIA Nehemiah"*) echo '-march=c3' ;; | | 29 | "VIA Nehemiah"*) echo '-march=c3' ;; |
30 | | | 30 | |
31 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; | | 31 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; |
32 | "Genuine Intel(R) CPU T2500"*) echo '-march=core2' ;; | | 32 | "Genuine Intel(R) CPU T2500"*) echo '-march=core2' ;; |
33 | "Intel(R) Atom(TM) CPU N270 "*) echo '-march=prescott' ;;#So far | | 33 | "Intel(R) Atom(TM) CPU "*) echo '-march=core2 -mtune=pentium' ;;#So far |
34 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; | | 34 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; |
35 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; | | 35 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; |
36 | "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;; | | 36 | "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;; |
37 | "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; | | 37 | "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; |
38 | "Intel(R) Core 2 "*) echo '-march=core2' ;; | | 38 | "Intel(R) Core 2 "*) echo '-march=core2' ;; |
39 | "Intel(R) Core(TM)2 "*) echo '-march=core2' ;; | | 39 | "Intel(R) Core(TM)2 "*) echo '-march=core2' ;; |
40 | "Intel(R) Pentium(R) 4 CPU"*) | | 40 | "Intel(R) Pentium(R) 4 CPU"*) |
41 | if [ -n "$cpu_feature_SSE3" ] ; then | | 41 | if [ -n "$cpu_feature_SSE3" ] ; then |
42 | echo '-march=prescott' | | 42 | echo '-march=prescott' |
43 | else | | 43 | else |
44 | echo '-march=pentium4' | | 44 | echo '-march=pentium4' |
45 | fi ;; | | 45 | fi ;; |
46 | "Intel(R) Pentium(R) M processor "*) echo '-march=pentium-m' ;; | | 46 | "Intel(R) Pentium(R) M processor "*) echo '-march=pentium-m' ;; |