3 ; foo_ are watcom functions, _foo are djgpp functions
14 jnc read_cpuid_nocheck
22 jnc read_cpuid_nocheck
26 ; determine if cpuid is available. avail: cf=0, not avail: cf=1
30 mov edx, eax ; keep a copy of the original eflags in edx
42 ; enter with the cpuid_info structure pointer in eax
49 push eax ; save the original struct pointer
51 mov edi, eax ; struct pointer -> edi
62 mov [esp], eax ; current index
65 mov [edi], eax ; maxidx
66 ; clamp to the size of our cpuid_info structure
71 mov [esp + 4], eax ; maximum index
73 mov [edi + 4], ebx ; vendor name
91 ; try to retrieve the brand string (avail on P4 or newer)
95 jz .done ; no extended cpuid functions
97 jb .done ; no brand string available
99 ; brand string available
100 mov esi, esp ; save esp to esi
101 mov esp, [esp + 8] ; esp <- original struct pointer
102 add esp, 32+48 ; offset to end of brandstr
121 mov esp, esi ; done restore esp