Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/rtlib/x86/cpudetect.s
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ detect:
/* no CPUID; assume 386 and check if 486 (try toggling bit 18 (AC) of EFLAGS) */
mov ebx, 0x30000000
mov ecx, esp
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) */
pushfd
pop eax
mov edx, eax
Expand All @@ -71,6 +71,7 @@ cpu486_not_found:
cpuid_ok:
mov eax, 1
cpuid
mov al, 0
shl eax, 20
and edx, 0x0FFFFFFF /* low 28 bits of feature flags */
or eax, edx
Expand Down