2 * Copyright 2014, Paweł Dziepak, pdziepak@quarnos.org.
3 * Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
4 * Distributed under the terms of the MIT License.
8 #include <arch_system_info.h>
12 get_current_cpuid(cpuid_info
* info
, uint32 eax
, uint32 ecx
)
15 : "=a" (info
->regs
.eax
), "=b" (info
->regs
.ebx
), "=c" (info
->regs
.ecx
),
17 : "a" (eax
), "c" (ecx
));
26 __asm__("pushf; popq %0;" : "=r" (flags
));
32 set_eflags(uint32 value
)
34 uint64_t flags
= value
;
35 __asm__("pushq %0; popf;" : : "r" (flags
) : "cc");