summaryrefslogtreecommitdiff
path: root/devel/cpuflags/files/subr_x86
blob: 6ad7fde7c3fed9b0c70d9994690a8dc0524a9dcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# $NetBSD: subr_x86,v 1.1 2007/08/27 10:08:30 abs Exp $

flags_fixup_x86arch()
    {
    arch=$1
    features=$2
    # Fixup ARCH for x86
    #
    # The format of table is
    # feature:lowend_arch:fix_arch
    #
    echo $AWK -v "arch=${arch#-march=}" -v "features=$features" >&2
    $AWK -v "arch=${arch#-march=}" -v "features=$features" '
	BEGIN { split(features,ar); FS=":" }
	{ for (af in ar)
	  { if ((ar[af] == $1) && (arch == $3)) { print $2; exit;} }
	}
	' <<EOD
-msse:pentium3:i386
-msse:pentium3:i486
-msse:pentium3:i586
-msse:pentium3:i686
-msse:pentium3:pentium
-msse:pentium3:pentium-mmx
-msse:pentium3:pentiumpro
-msse:pentium3:pentium2
-msse:athlon:k6
-msse:athlon:k6-2
-msse:athlon:k6-3
-msse2:pentium4:i386
-msse2:pentium4:i386
-msse2:pentium4:i486
-msse2:pentium4:i586
-msse2:pentium4:i686
-msse2:pentium4:pentium
-msse2:pentium4:pentium-mmx
-msse2:pentium4:pentiumpro
-msse2:pentium4:pentium2
-msse2:pentium4:pentium3
-msse2:pentium4:pentium3m
-msse2:k8:k6
-msse2:k8:k6-2
-msse2:k8:k6-3
-msse2:k8:athlon
-msse2:k8:athlon-tbird
-msse2:k8:athlon-4
-msse2:k8:athlon-xp
-msse2:k8:athlon-mp
-msse3:prescott:i386
-msse3:prescott:i386
-msse3:prescott:i486
-msse3:prescott:i586
-msse3:prescott:i686
-msse3:prescott:pentium
-msse3:prescott:pentium-mmx
-msse3:prescott:pentiumpro
-msse3:prescott:pentium2
-msse3:prescott:pentium3
-msse3:prescott:pentium3m
-msse3:prescott:pentium-m
-msse3:prescott:pentium4
-msse3:prescott:pentium4m
-msse3:k8:k6
-msse3:k8:k6-2
-msse3:k8:k6-3
-msse3:k8:athlon
-msse3:k8:athlon-tbird
-msse3:k8:athlon-4
-msse3:k8:athlon-xp
-msse3:k8:athlon-mp
-m3dnow:athlon:k6
-m3dnow:athlon:k6-2
-m3dnow:athlon:k6-3
EOD

## in future
#-mssse3:nocona:prescott ...
#-msse4:nehalem:nocona ...
    }