We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de9f500 commit 4cbb1a9Copy full SHA for 4cbb1a9
src/rtlib/x86/cpudetect.s
@@ -47,7 +47,7 @@ detect:
47
/* no CPUID; assume 386 and check if 486 (try toggling bit 18 (AC) of EFLAGS) */
48
mov ebx, 0x30000000
49
mov ecx, esp
50
- and esp, 0xFFFFFFFB /* round ESP down to a multiple of 4 (must be aligned if AC becomes enabled) */
+ and esp, 0xFFFFFFFC /* round ESP down to a multiple of 4 (must be aligned if AC becomes enabled) */
51
pushfd
52
pop eax
53
mov edx, eax
@@ -71,6 +71,7 @@ cpu486_not_found:
71
cpuid_ok:
72
mov eax, 1
73
cpuid
74
+ mov al, 0
75
shl eax, 20
76
and edx, 0x0FFFFFFF /* low 28 bits of feature flags */
77
or eax, edx
0 commit comments