| @@ -1,27 +1,29 @@ | | | @@ -1,27 +1,29 @@ |
1 | # $NetBSD: subr_x86,v 1.3 2008/12/10 23:27:17 abs Exp $ | | 1 | # $NetBSD: subr_x86,v 1.4 2008/12/18 00:57:12 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 | map_x86_brand_string() | | 6 | map_x86_brand_string() |
7 | { | | 7 | { |
8 | case "$1" in | | 8 | case "$1" in |
9 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; | | 9 | "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; |
10 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; | | 10 | "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; |
11 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; | | 11 | "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; |
| | | 12 | "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; |
12 | "Intel(R) Core(TM)2 CPU "*) echo '-march=core2' ;; | | 13 | "Intel(R) Core(TM)2 CPU "*) echo '-march=core2' ;; |
13 | "Intel(R) Core(TM)2 Duo CPU "*) echo '-march=core2' ;; | | 14 | "Intel(R) Core(TM)2 Duo CPU "*) echo '-march=core2' ;; |
14 | "Intel(R) Core(TM)2 Quad CPU"*) echo '-march=core2' ;; | | 15 | "Intel(R) Core(TM)2 Quad CPU"*) echo '-march=core2' ;; |
| | | 16 | "Intel(R) Pentium(R) 4 CPU 2.80GHz") echo '-march=pentium4' ;; |
15 | "Intel(R) Pentium(R) 4 CPU 3.00GHz") echo '-march=prescott' ;; | | 17 | "Intel(R) Pentium(R) 4 CPU 3.00GHz") echo '-march=prescott' ;; |
16 | "Intel(R) Pentium(R) D CPU "*) echo '-march=prescott' ;; | | 18 | "Intel(R) Pentium(R) D CPU "*) echo '-march=prescott' ;; |
17 | "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;; | | 19 | "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;; |
18 | "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;; | | 20 | "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;; |
19 | "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;; | | 21 | "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;; |
20 | | | 22 | |
21 | esac | | 23 | esac |
22 | } | | 24 | } |
23 | | | 25 | |
24 | flags_fixup_x86arch() | | 26 | flags_fixup_x86arch() |
25 | { | | 27 | { |
26 | arch=$1 | | 28 | arch=$1 |
27 | features=$2 | | 29 | features=$2 |