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:
parent
8289b76cf9
commit
0366ac8496
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue