Skip to content

Commit 820d140

Browse files
committed
parse L7
1 parent 8019f09 commit 820d140

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Python/cpuinfo.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,31 @@
9999
#if defined(SIMD_SSE_INSTRUCTIONS_DETECTION_GUARD) \
100100
|| defined(SIMD_AVX_INSTRUCTIONS_DETECTION_GUARD)
101101
/* Indicate that cpuid should be called once with EAX=1 and ECX=0. */
102+
# ifndef HAS_CPUID_SUPPORT
103+
# error "HAS_CPUID_SUPPORT must be set"
104+
# endif
102105
# define SHOULD_PARSE_CPUID_L1
103106
#endif
104107

105108
#if defined(SIMD_AVX2_INSTRUCTIONS_DETECTION_GUARD) \
106109
|| defined(SIMD_AVX512_INSTRUCTIONS_DETECTION_GUARD)
107110
/* Indicate that cpuid should be called once with EAX=7 and ECX=0. */
111+
# ifndef HAS_CPUID_SUPPORT
112+
# error "HAS_CPUID_SUPPORT must be set"
113+
# endif
108114
# define SHOULD_PARSE_CPUID_L7
109115
# define SHOULD_PARSE_CPUID_L7S0
110116
#endif
111117

112118
#if defined(SIMD_AVX_INSTRUCTIONS_DETECTION_GUARD)
113119
/* Indicate that cpuid should be called once with EAX=7 and ECX=1. */
120+
# ifndef HAS_CPUID_SUPPORT
121+
# error "HAS_CPUID_SUPPORT must be set"
122+
# endif
114123
# define SHOULD_PARSE_CPUID_L7
115124
# define SHOULD_PARSE_CPUID_L7S1
116125
#endif
117126

118-
#undef SHOULD_PARSE_CPUID_L7
119-
#undef SHOULD_PARSE_CPUID_L7S0
120-
#undef SHOULD_PARSE_CPUID_L7S1
121-
122127
#if defined(SHOULD_PARSE_CPUID_L7S0) && !defined(SHOULD_PARSE_CPUID_L7)
123128
#error "SHOULD_PARSE_CPUID_L7S0 requires SHOULD_PARSE_CPUID_L7"
124129
#endif

0 commit comments

Comments
 (0)