| @@ -1,40 +1,41 @@ | | | @@ -1,40 +1,41 @@ |
1 | # $NetBSD: subr_x86,v 1.6 2008/12/21 15:49:27 abs Exp $ | | 1 | # $NetBSD: subr_x86,v 1.7 2008/12/23 09:48:38 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 | | | 6 | |
7 | # AMD, in contrast decided to keep things simple: | | 7 | # AMD, in contrast decided to keep things simple: |
8 | # (thanks to Christoph Egger for this list) | | 8 | # (thanks to Christoph Egger for this list) |
9 | # Family 0x6: AMD K7 | | 9 | # Family 0x6: AMD K7 |
10 | # Family 0xf: AMD K8 | | 10 | # Family 0xf: AMD K8 |
11 | # Family 0x10: AMD Barcelona/Phenom | | 11 | # Family 0x10: AMD Barcelona/Phenom |
12 | # Family 0x11: AMD Turion Ultra | | 12 | # Family 0x11: AMD Turion Ultra |
13 | | | 13 | |
14 | map_x86_brand_string() | | 14 | map_x86_brand_string() |
15 | { | | 15 | { |
16 | case "$1" in | | 16 | case "$1" in |
17 | "AMD-K6(tm)-III Processor"*) echo '-march=k6-3' ;; | | 17 | "AMD-K6(tm)-III Processor"*) echo '-march=k6-3' ;; |
18 | "VIA Nehemiah"*) echo '-march=c3' ;; | | 18 | "VIA Nehemiah"*) echo '-march=c3' ;; |
19 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; | | 19 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; |
20 | "Intel(R) Atom(TM) CPU N270 "*) echo '-march=prescott' ;;#So far | | 20 | "Intel(R) Atom(TM) CPU N270 "*) echo '-march=prescott' ;;#So far |
21 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; | | 21 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; |
22 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; | | 22 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; |
23 | "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;; | | 23 | "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;; |
24 | "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; | | 24 | "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; |
25 | "Intel(R) Core(TM)2 CPU "*) echo '-march=core2' ;; | | 25 | "Intel(R) Core(TM)2 CPU "*) echo '-march=core2' ;; |
26 | "Intel(R) Core(TM)2 Duo CPU "*) echo '-march=core2' ;; | | 26 | "Intel(R) Core(TM)2 Duo CPU "*) echo '-march=core2' ;; |
27 | "Intel(R) Core(TM)2 Quad CPU"*) echo '-march=core2' ;; | | 27 | "Intel(R) Core(TM)2 Quad CPU"*) echo '-march=core2' ;; |
| | | 28 | "Intel(R) Pentium(R) 4 CPU 2.00GHz") echo '-march=pentium4' ;; |
28 | "Intel(R) Pentium(R) 4 CPU 2.80GHz") echo '-march=pentium4' ;; | | 29 | "Intel(R) Pentium(R) 4 CPU 2.80GHz") echo '-march=pentium4' ;; |
29 | "Intel(R) Pentium(R) 4 CPU 3.00GHz") echo '-march=prescott' ;; | | 30 | "Intel(R) Pentium(R) 4 CPU 3.00GHz") echo '-march=prescott' ;; |
30 | "Intel(R) Pentium(R) 4 CPU 3.20GHz") echo '-march=prescott' ;; | | 31 | "Intel(R) Pentium(R) 4 CPU 3.20GHz") echo '-march=prescott' ;; |
31 | "Intel(R) Pentium(R) D CPU "*) echo '-march=prescott' ;; | | 32 | "Intel(R) Pentium(R) D CPU "*) echo '-march=prescott' ;; |
32 | "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;; | | 33 | "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;; |
33 | "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;; | | 34 | "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;; |
34 | "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;; | | 35 | "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;; |
35 | | | 36 | |
36 | esac | | 37 | esac |
37 | } | | 38 | } |
38 | | | 39 | |
39 | flags_fixup_x86arch() | | 40 | flags_fixup_x86arch() |
40 | { | | 41 | { |