Re: [PATCH RFC 4/5] x86/alternative: Improve code generation readability
From: Josh Poimboeuf
Date: Wed Apr 09 2025 - 17:27:55 EST
On Wed, Apr 09, 2025 at 02:20:55PM -0700, Linus Torvalds wrote:
> On Wed, 9 Apr 2025 at 12:51, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> >
> > What if we were to use a global asm() to define an alternative .macro
> > whenever "alternative.h" gets included?
>
> Yeah, I wouldn't mind that, but I have this dim memory of us having
> tried it at some point and it didn't work.
>
> I think the issue was that the in-compiler assembler was not as
> complete as the external one (ie not doing macros at all or something
> like that).
It seems to work with GCC 14 and Clang 18 at least. I can try to find
some old toolchains to test with.
--
Josh