Skip to content

Commit 6dc532d

Browse files
committed
use different variables!
1 parent 91effb4 commit 6dc532d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Python/cpuinfo.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@
113113
# define SHOULD_PARSE_CPUID_L7S1
114114
#endif
115115

116-
#undef SHOULD_PARSE_CPUID_L1
117-
#undef SHOULD_PARSE_CPUID_L7
118-
#undef SHOULD_PARSE_CPUID_L7S0
119-
#undef SHOULD_PARSE_CPUID_L7S1
120-
121116
#if defined(SHOULD_PARSE_CPUID_L7S0) && !defined(SHOULD_PARSE_CPUID_L7)
122117
#error "SHOULD_PARSE_CPUID_L7S0 requires SHOULD_PARSE_CPUID_L7"
123118
#endif
@@ -138,7 +133,9 @@ get_cpuid_info(uint32_t level /* input eax */,
138133
{
139134
*eax = *ebx = *ecx = *edx = 0; // ensure the output to be initialized
140135
#if defined(HAS_CPUID_SUPPORT) && defined(__x86_64__) && defined(__GNUC__)
141-
__cpuid_count(level, count, *eax, *ebx, *ecx, *edx);
136+
uint32_t r_eax = 0, r_ebx = 0, r_ecx = 0, r_edx = 0;
137+
__cpuid_count(level, count, r_eax, r_ebx, r_ecx, r_edx);
138+
*eax = r_eax, *ebx = r_ebx, *ecx = r_ecx, *edx = r_edx;
142139
#elif defined(HAS_CPUID_SUPPORT) && defined(_M_X64)
143140
uint32_t info[4] = {0};
144141
__cpuidex(info, level, count);

0 commit comments

Comments
 (0)