now I try to understand xv6 code. and I found below code.
I think this code is related to assembly, but I couldn't find what it means.
especially, I found the front part of asm volatile(:)
means assembly opeation set and what is the eflags, but I couldn't find what the back of this("=r" (eflags)) means.
So my question is.. what does the below code mean? If you can give me some answer or advice, I'll really thank you for your sharing. Thank you :)
static inline uint readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
return eflags;
}