mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 00:59:55 +00:00
Consolidate cpuid code.
This commit is contained in:
1 parent
c1bee64676
commit
c81acb7ff3
5 files changed
+22
-124
No files matched your search
@@ -69,9 +69,16 @@ grub_cpu_is_cpuid_supported (void)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __PIC__
|
||||
#define grub_cpuid(num,a,b,c,d) \
|
||||
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
|
||||
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
|
||||
: "0" (num))
|
||||
#else
|
||||
#define grub_cpuid(num,a,b,c,d) \
|
||||
asm volatile ("cpuid" \
|
||||
: "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
|
||||
: "0" (num))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user