Fix indent

This commit is contained in:
Christian Semmler 2025-05-07 15:39:32 -07:00
parent af393e6247
commit 5b82c80588

View File

@ -252,15 +252,15 @@ int LegoDeviceEnumerate::SupportsCPUID()
#ifdef _MSC_VER #ifdef _MSC_VER
#if defined(_M_IX86) #if defined(_M_IX86)
__asm { __asm {
xor eax, eax ; Zero EAX register xor eax, eax ; Zero EAX register
pushfd ; Push EFLAGS register value on the stack pushfd ; Push EFLAGS register value on the stack
or dword ptr[esp], 0x200000 ; Set bit 0x200000: Able to use CPUID instruction (Pentium+) or dword ptr[esp], 0x200000 ; Set bit 0x200000: Able to use CPUID instruction (Pentium+)
popfd ; Write the updated value into the EFLAGS register popfd ; Write the updated value into the EFLAGS register
pushfd ; Push EFLAGS register value on the stack (again) pushfd ; Push EFLAGS register value on the stack (again)
btr dword ptr[esp], 0x15 ; Test bit 0x15 (21) and reset (set CF) btr dword ptr[esp], 0x15 ; Test bit 0x15 (21) and reset (set CF)
adc eax, eax ; Add with carry: EAX = EAX + EAX + CF = CF adc eax, eax ; Add with carry: EAX = EAX + EAX + CF = CF
popfd ; Push EFLAGS register value on the stack (again, and makes sure the stack remains the same) popfd ; Push EFLAGS register value on the stack (again, and makes sure the stack remains the same)
mov has_cpuid, eax ; Save eax into C variable mov has_cpuid, eax ; Save eax into C variable
} }
#elif defined(_M_X64) #elif defined(_M_X64)
has_cpuid = 1; has_cpuid = 1;