]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgcc/config/i386/cpuinfo.h
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / i386 / cpuinfo.h
1 /* Get CPU type and Features for x86 processors.
2 Copyright (C) 2012-2017 Free Software Foundation, Inc.
3 Contributed by Sriraman Tallam (tmsriram@google.com)
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
20
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
25
26 /* Processor Vendor and Models. */
27
28 enum processor_vendor
29 {
30 VENDOR_INTEL = 1,
31 VENDOR_AMD,
32 VENDOR_OTHER,
33 VENDOR_MAX
34 };
35
36 /* Any new types or subtypes have to be inserted at the end. */
37
38 enum processor_types
39 {
40 INTEL_BONNELL = 1,
41 INTEL_CORE2,
42 INTEL_COREI7,
43 AMDFAM10H,
44 AMDFAM15H,
45 INTEL_SILVERMONT,
46 INTEL_KNL,
47 AMD_BTVER1,
48 AMD_BTVER2,
49 AMDFAM17H,
50 CPU_TYPE_MAX
51 };
52
53 enum processor_subtypes
54 {
55 INTEL_COREI7_NEHALEM = 1,
56 INTEL_COREI7_WESTMERE,
57 INTEL_COREI7_SANDYBRIDGE,
58 AMDFAM10H_BARCELONA,
59 AMDFAM10H_SHANGHAI,
60 AMDFAM10H_ISTANBUL,
61 AMDFAM15H_BDVER1,
62 AMDFAM15H_BDVER2,
63 AMDFAM15H_BDVER3,
64 AMDFAM15H_BDVER4,
65 AMDFAM17H_ZNVER1,
66 INTEL_COREI7_IVYBRIDGE,
67 INTEL_COREI7_HASWELL,
68 INTEL_COREI7_BROADWELL,
69 INTEL_COREI7_SKYLAKE,
70 INTEL_COREI7_SKYLAKE_AVX512,
71 CPU_SUBTYPE_MAX
72 };
73
74 /* ISA Features supported. New features have to be inserted at the end. */
75
76 enum processor_features
77 {
78 FEATURE_CMOV = 0,
79 FEATURE_MMX,
80 FEATURE_POPCNT,
81 FEATURE_SSE,
82 FEATURE_SSE2,
83 FEATURE_SSE3,
84 FEATURE_SSSE3,
85 FEATURE_SSE4_1,
86 FEATURE_SSE4_2,
87 FEATURE_AVX,
88 FEATURE_AVX2,
89 FEATURE_SSE4_A,
90 FEATURE_FMA4,
91 FEATURE_XOP,
92 FEATURE_FMA,
93 FEATURE_AVX512F,
94 FEATURE_BMI,
95 FEATURE_BMI2,
96 FEATURE_AES,
97 FEATURE_PCLMUL,
98 FEATURE_AVX512VL,
99 FEATURE_AVX512BW,
100 FEATURE_AVX512DQ,
101 FEATURE_AVX512CD,
102 FEATURE_AVX512ER,
103 FEATURE_AVX512PF,
104 FEATURE_AVX512VBMI,
105 FEATURE_AVX512IFMA,
106 FEATURE_AVX5124VNNIW,
107 FEATURE_AVX5124FMAPS
108 };
109
110 extern struct __processor_model
111 {
112 unsigned int __cpu_vendor;
113 unsigned int __cpu_type;
114 unsigned int __cpu_subtype;
115 unsigned int __cpu_features[1];
116 } __cpu_model;