1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

use pushfq insteaf of push to determine RFLAGS

This commit is contained in:
Stefan Lankes 2015-07-22 20:20:49 +02:00
parent 8289b76cf9
commit 0366ac8496

View file

@ -519,10 +519,10 @@ inline static void cpuid(uint32_t code, uint32_t* a, uint32_t* b, uint32_t* c, u
*
* @return The EFLAGS value
*/
static inline uint32_t read_eflags(void)
static inline uint64_t read_rflags(void)
{
uint32_t result;
asm volatile ("pushf; pop %0" : "=r"(result));
uint64_t result;
asm volatile ("pushfq; pop %0" : "=r"(result));
return result;
}