1 /* SPDX-License-Identifier: GPL-2.0 */
7 cpuid(unsigned int op, unsigned int op2, unsigned int *a, unsigned int *b,
8 unsigned int *c, unsigned int *d)
11 * Preserve %ebx/%rbx register by either placing it in %rdi or saving it
12 * on the stack - x86-64 needs to avoid the stack red zone. In PIC
13 * compilations %ebx contains the address of the global offset
14 * table. %rbx is occasionally used to address stack variables in
15 * presence of dynamic allocas.
18 #if defined(__x86_64__)
28 : "=a"(*a), "=D"(*b), "=c"(*c), "=d"(*d)
32 void get_cpuid_0(char *vendor, unsigned int *lvl);