Re: [PATCH] x86: support i386 with Clang
From: Linus Torvalds
Date: Mon May 11 2020 - 14:30:33 EST
On Mon, May 11, 2020 at 11:12 AM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Would using "__builtin_choose_expr()" be able to avoid this whole issue?
We actually have a fair amount of "pick expression based on size", so
with a few helper macros we could make the code look better than the
case statements too.
Something (ENTIRELY UNTESTED!) like the attached patch, perhaps?
NOTE! I only converted one single use to that "pick_size_xyz()" model.
If this actually works for clang too, we could do the others.
I guess I should just test it, since I have that clang tree.
Linus
Attachment:
patch
Description: Binary data