Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsimd_x86.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 Intel Corporation.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// This is a generated file. DO NOT EDIT.
4// Please see util/x86simdgen/README.md
5// Qt-Security score:significant reason:default
6
7#include "qsimd_x86_p.h"
8
9static const char features_string[] =
10 " sse2\0"
11 " sse3\0"
12 " ssse3\0"
13 " fma\0"
14 " sse4.1\0"
15 " sse4.2\0"
16 " movbe\0"
17 " popcnt\0"
18 " aes\0"
19 " avx\0"
20 " f16c\0"
21 " bmi\0"
22 " avx2\0"
23 " bmi2\0"
24 " avx512f\0"
25 " avx512dq\0"
26 " avx512ifma\0"
27 " avx512cd\0"
28 " sha\0"
29 " avx512bw\0"
30 " avx512vl\0"
31 " avx512vbmi\0"
32 " waitpkg\0"
33 " avx512vbmi2\0"
34 " shstk\0"
35 " gfni\0"
36 " vaes\0"
37 " avx512bitalg\0"
38 " avx512vpopcntdq\0"
39 " hybrid\0"
40 " ibt\0"
41 " avx512fp16\0"
42 " raoint\0"
43 " cmpccxadd\0"
44 " avxifma\0"
45 " lam\0"
46 "\0";
47
48static const uint16_t features_indices[] = {
49 0, 6, 12, 19, 24, 32, 40, 47,
50 55, 60, 65, 71, 76, 82, 88, 97,
51 107, 119, 129, 134, 144, 154, 166, 175,
52 188, 195, 201, 207, 221, 238, 246, 251,
53 263, 271, 282, 291,
54};
55
69
70static const uint16_t x86_locators[] = {
71 Leaf01EDX*32 + 26, // sse2
72 Leaf01ECX*32 + 0, // sse3
73 Leaf01ECX*32 + 9, // ssse3
74 Leaf01ECX*32 + 12, // fma
75 Leaf01ECX*32 + 19, // sse4.1
76 Leaf01ECX*32 + 20, // sse4.2
77 Leaf01ECX*32 + 22, // movbe
78 Leaf01ECX*32 + 23, // popcnt
79 Leaf01ECX*32 + 25, // aes
80 Leaf01ECX*32 + 28, // avx
81 Leaf01ECX*32 + 29, // f16c
82 Leaf07_00EBX*32 + 3, // bmi
83 Leaf07_00EBX*32 + 5, // avx2
84 Leaf07_00EBX*32 + 8, // bmi2
85 Leaf07_00EBX*32 + 16, // avx512f
86 Leaf07_00EBX*32 + 17, // avx512dq
87 Leaf07_00EBX*32 + 21, // avx512ifma
88 Leaf07_00EBX*32 + 28, // avx512cd
89 Leaf07_00EBX*32 + 29, // sha
90 Leaf07_00EBX*32 + 30, // avx512bw
91 Leaf07_00EBX*32 + 31, // avx512vl
92 Leaf07_00ECX*32 + 1, // avx512vbmi
93 Leaf07_00ECX*32 + 5, // waitpkg
94 Leaf07_00ECX*32 + 6, // avx512vbmi2
95 Leaf07_00ECX*32 + 7, // shstk
96 Leaf07_00ECX*32 + 8, // gfni
97 Leaf07_00ECX*32 + 9, // vaes
98 Leaf07_00ECX*32 + 12, // avx512bitalg
99 Leaf07_00ECX*32 + 14, // avx512vpopcntdq
100 Leaf07_00EDX*32 + 15, // hybrid
101 Leaf07_00EDX*32 + 20, // ibt
102 Leaf07_00EDX*32 + 23, // avx512fp16
103 Leaf07_01EAX*32 + 3, // raoint
104 Leaf07_01EAX*32 + 6, // cmpccxadd
105 Leaf07_01EAX*32 + 23, // avxifma
106 Leaf07_01EAX*32 + 26, // lam
107};
108
110{
111 uint64_t features;
112 char name[17 + 1];
113};
114
115static const struct X86Architecture x86_architectures[] = {
116 { cpu_core2, "Core2" },
117 { cpu_westmere, "Westmere" },
118 { cpu_sandybridge, "Sandy Bridge" },
119 { cpu_silvermont, "Silvermont" },
120 { cpu_ivybridge, "Ivy Bridge" },
121 { cpu_goldmont, "Goldmont" },
122 { cpu_haswell, "Haswell" },
123 { cpu_broadwell, "Broadwell" },
124 { cpu_tremont, "Tremont" },
125 { cpu_skylake, "Skylake" },
126 { cpu_skylake_avx512, "Skylake (Avx512)" },
127 { cpu_cascadelake, "Cascade Lake" },
128 { cpu_cooperlake, "Cooper Lake" },
129 { cpu_cannonlake, "Cannon Lake" },
130 { cpu_gracemont, "Gracemont" },
131 { cpu_icelake_client, "Ice Lake (Client)" },
132 { cpu_icelake_server, "Ice Lake (Server)" },
133 { cpu_crestmont, "Crestmont" },
134 { cpu_tigerlake, "Tiger Lake" },
135 { cpu_clearwaterforest, "Clearwater Forest" },
136 { cpu_grandridge, "Grand Ridge" },
137 { cpu_raptorcove, "Raptor Cove" },
138 { cpu_redwoodcove, "Redwood Cove" },
139 { cpu_emeraldrapids, "Emerald Rapids" },
140 { cpu_graniterapids, "Granite Rapids" },
141};
142
144 XSave_X87 = 0x0001, // X87 and MMX state
145 XSave_SseState = 0x0002, // SSE: 128 bits of XMM registers
146 XSave_Ymm_Hi128 = 0x0004, // AVX: high 128 bits in YMM registers
147 XSave_Bndregs = 0x0008, // Memory Protection Extensions
148 XSave_Bndcsr = 0x0010, // Memory Protection Extensions
149 XSave_OpMask = 0x0020, // AVX512: k0 through k7
150 XSave_Zmm_Hi256 = 0x0040, // AVX512: high 256 bits of ZMM0-15
151 XSave_Hi16_Zmm = 0x0080, // AVX512: all 512 bits of ZMM16-31
152 XSave_PTState = 0x0100, // Processor Trace
153 XSave_PKRUState = 0x0200, // Protection Key
154 XSave_CetUState = 0x0800, // CET: user mode
155 XSave_CetSState = 0x1000, // CET: supervisor mode
156 XSave_HdcState = 0x2000, // Hardware Duty Cycle
157 XSave_UintrState = 0x4000, // User Interrupts
158 XSave_HwpState = 0x10000, // Hardware P-State
159 XSave_Xtilecfg = 0x20000, // AMX: XTILECFG register
160 XSave_Xtiledata = 0x40000, // AMX: data in the tiles
166};
167
168// List of features requiring XSave_AvxState
169static const uint64_t XSaveReq_AvxState = 0
187
188// List of features requiring XSave_Avx512State
189static const uint64_t XSaveReq_Avx512State = 0
201
202// List of features requiring XSave_CetState
203static const uint64_t XSaveReq_CetState = 0
205
207{
208 uint64_t cpu_features;
209 uint64_t xsave_state;
210};
211
XSaveBits
@ XSave_Bndcsr
@ XSave_X87
@ XSave_HwpState
@ XSave_AvxState
@ XSave_Xtilecfg
@ XSave_Xtiledata
@ XSave_Avx512State
@ XSave_AmxState
@ XSave_SseState
@ XSave_HdcState
@ XSave_PKRUState
@ XSave_OpMask
@ XSave_CetUState
@ XSave_Zmm_Hi256
@ XSave_CetState
@ XSave_Bndregs
@ XSave_UintrState
@ XSave_PTState
@ XSave_Ymm_Hi128
@ XSave_CetSState
@ XSave_Hi16_Zmm
@ XSave_MPXState
static const struct X86Architecture x86_architectures[]
X86CpuidLeaves
Definition qsimd_x86.cpp:56
@ Leaf01EDX
Definition qsimd_x86.cpp:57
@ Leaf07_01EAX
Definition qsimd_x86.cpp:62
@ Leaf07_00ECX
Definition qsimd_x86.cpp:60
@ Leaf80000008hEBX
Definition qsimd_x86.cpp:66
@ Leaf07_00EBX
Definition qsimd_x86.cpp:59
@ Leaf07_00EDX
Definition qsimd_x86.cpp:61
@ Leaf13_01EAX
Definition qsimd_x86.cpp:64
@ X86CpuidMaxLeaf
Definition qsimd_x86.cpp:67
@ Leaf07_01EDX
Definition qsimd_x86.cpp:63
@ Leaf01ECX
Definition qsimd_x86.cpp:58
@ Leaf80000001hECX
Definition qsimd_x86.cpp:65
static const uint16_t x86_locators[]
Definition qsimd_x86.cpp:70
static const uint64_t XSaveReq_AvxState
static const uint16_t features_indices[]
Definition qsimd_x86.cpp:48
static const char features_string[]
Definition qsimd_x86.cpp:9
static const uint64_t XSaveReq_CetState
static const struct XSaveRequirementMapping xsave_requirements[]
static const uint64_t XSaveReq_Avx512State
#define cpu_haswell
#define cpu_feature_avx
Definition qsimd_x86_p.h:37
#define cpu_westmere
#define cpu_redwoodcove
#define cpu_feature_fma
Definition qsimd_x86_p.h:31
#define cpu_skylake
#define cpu_feature_shstk
Definition qsimd_x86_p.h:56
#define cpu_icelake_server
#define cpu_feature_avx512ifma
Definition qsimd_x86_p.h:46
#define cpu_gracemont
#define cpu_feature_avx512vpopcntdq
Definition qsimd_x86_p.h:60
#define cpu_graniterapids
#define cpu_feature_avx512f
Definition qsimd_x86_p.h:44
#define cpu_clearwaterforest
#define cpu_icelake_client
#define cpu_cannonlake
#define cpu_feature_avx2
Definition qsimd_x86_p.h:42
#define cpu_feature_vaes
Definition qsimd_x86_p.h:58
#define cpu_core2
Definition qsimd_x86_p.h:76
#define cpu_feature_avx512vl
Definition qsimd_x86_p.h:50
#define cpu_cooperlake
#define cpu_feature_avx512bitalg
Definition qsimd_x86_p.h:59
#define cpu_ivybridge
#define cpu_feature_avx512dq
Definition qsimd_x86_p.h:45
#define cpu_grandridge
#define cpu_emeraldrapids
#define cpu_tigerlake
#define cpu_cascadelake
#define cpu_tremont
#define cpu_feature_f16c
Definition qsimd_x86_p.h:38
#define cpu_feature_avx512vbmi2
Definition qsimd_x86_p.h:55
#define cpu_skylake_avx512
#define cpu_feature_avx512fp16
Definition qsimd_x86_p.h:65
#define cpu_feature_avxifma
Definition qsimd_x86_p.h:70
#define cpu_feature_avx512bw
Definition qsimd_x86_p.h:49
#define cpu_sandybridge
#define cpu_crestmont
#define cpu_goldmont
#define cpu_silvermont
#define cpu_broadwell
#define cpu_raptorcove
#define cpu_feature_avx512vbmi
Definition qsimd_x86_p.h:53
#define cpu_feature_avx512cd
Definition qsimd_x86_p.h:47
uint64_t features
char name[17+1]