Re: [PATCH 2/2] x86/irqflags: Use ASM_OUTPUT_RM in native_save_fl()

From: Andrew Cooper

Date: Mon Dec 22 2025 - 11:51:16 EST


>> But something like __builtin_ia32_readeflags_u64() is just entirely
>> pointless. What is the supposed advantage over just doing inline
>> assembly?
>
> Unless they are doing something like actually leaving it on the stack... yeah.

It's not just pointless, it's actively dangerous. 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104971

At least with inline assembly, it's the programmer's fault when making a
mistake like this.

~Andrew