]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/i386/cpuinfo.h
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / i386 / cpuinfo.h
CommitLineData
31cfd832 1/* Get CPU type and Features for x86 processors.
a5544970 2 Copyright (C) 2012-2019 Free Software Foundation, Inc.
31cfd832
TK
3 Contributed by Sriraman Tallam (tmsriram@google.com)
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
20
21You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24<http://www.gnu.org/licenses/>. */
25
26/* Processor Vendor and Models. */
27
28enum 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
38enum 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,
cace2309 50 INTEL_KNM,
50e461df 51 INTEL_GOLDMONT,
74b2bb19 52 INTEL_GOLDMONT_PLUS,
a548a5a1 53 INTEL_TREMONT,
31cfd832
TK
54 CPU_TYPE_MAX
55};
56
57enum processor_subtypes
58{
59 INTEL_COREI7_NEHALEM = 1,
60 INTEL_COREI7_WESTMERE,
61 INTEL_COREI7_SANDYBRIDGE,
62 AMDFAM10H_BARCELONA,
63 AMDFAM10H_SHANGHAI,
64 AMDFAM10H_ISTANBUL,
65 AMDFAM15H_BDVER1,
66 AMDFAM15H_BDVER2,
67 AMDFAM15H_BDVER3,
68 AMDFAM15H_BDVER4,
69 AMDFAM17H_ZNVER1,
70 INTEL_COREI7_IVYBRIDGE,
71 INTEL_COREI7_HASWELL,
72 INTEL_COREI7_BROADWELL,
73 INTEL_COREI7_SKYLAKE,
74 INTEL_COREI7_SKYLAKE_AVX512,
c234d831 75 INTEL_COREI7_CANNONLAKE,
79ab5364
JK
76 INTEL_COREI7_ICELAKE_CLIENT,
77 INTEL_COREI7_ICELAKE_SERVER,
2901f42f 78 AMDFAM17H_ZNVER2,
5d54c798 79 INTEL_COREI7_CASCADELAKE,
31cfd832
TK
80 CPU_SUBTYPE_MAX
81};
82
83/* ISA Features supported. New features have to be inserted at the end. */
84
85enum processor_features
86{
87 FEATURE_CMOV = 0,
88 FEATURE_MMX,
89 FEATURE_POPCNT,
90 FEATURE_SSE,
91 FEATURE_SSE2,
92 FEATURE_SSE3,
93 FEATURE_SSSE3,
94 FEATURE_SSE4_1,
95 FEATURE_SSE4_2,
96 FEATURE_AVX,
97 FEATURE_AVX2,
98 FEATURE_SSE4_A,
99 FEATURE_FMA4,
100 FEATURE_XOP,
101 FEATURE_FMA,
102 FEATURE_AVX512F,
103 FEATURE_BMI,
104 FEATURE_BMI2,
105 FEATURE_AES,
106 FEATURE_PCLMUL,
107 FEATURE_AVX512VL,
108 FEATURE_AVX512BW,
109 FEATURE_AVX512DQ,
110 FEATURE_AVX512CD,
111 FEATURE_AVX512ER,
112 FEATURE_AVX512PF,
113 FEATURE_AVX512VBMI,
114 FEATURE_AVX512IFMA,
115 FEATURE_AVX5124VNNIW,
79fc8ffe 116 FEATURE_AVX5124FMAPS,
c36b04c1
JK
117 FEATURE_AVX512VPOPCNTDQ,
118 FEATURE_AVX512VBMI2,
119 FEATURE_GFNI,
120 FEATURE_VPCLMULQDQ,
121 FEATURE_AVX512VNNI,
122 FEATURE_AVX512BITALG
31cfd832
TK
123};
124
125extern struct __processor_model
126{
127 unsigned int __cpu_vendor;
128 unsigned int __cpu_type;
129 unsigned int __cpu_subtype;
130 unsigned int __cpu_features[1];
131} __cpu_model;
ae6dca8c 132extern unsigned int __cpu_features2;