Re: [RFC 6/8] x86_64/bug: Implement __WARN_printf()

Linus Torvalds
2025-06-02T23:10:35Z

On Mon, 2 Jun 2025 at 14:57, Peter Zijlstra <peterz@infradead.org> wrote:
>
> So if I stuff the asm macro in a global asm() block then GCC ends up
> looking like so:

Better, but as then the clang thing looks like a horrendous disaster.

How about we simply make this all *code* instead of playing games with
register numbers?

Why not just push the arguments by hand on the stack, and make that be
the interface? A 'push %reg' is like a byte or two. And you'd do it in
the cold section, so nobody cares.

And the asm would look somewhat sane, instead of being crazy noise due
to crazy macros.

Or so I imagine, because I didn't actually try it.

Linus