]> Git Repo - J-linux.git/commit
clang: work around asm input constraint problems
authorLinus Torvalds <[email protected]>
Mon, 8 Apr 2024 18:38:30 +0000 (11:38 -0700)
committerLinus Torvalds <[email protected]>
Wed, 22 May 2024 21:12:11 +0000 (14:12 -0700)
commitdbaaabd60e1662d2659eaeab0a4fc521667737ed
treefe79efbe1efa9c9bb88b96a7735b49664b82d99a
parenta38297e3fb012ddfa7ce0321a7e5a8daeb1872b6
clang: work around asm input constraint problems

Work around clang problems with asm constraints that have multiple
possibilities, particularly "g" and "rm".

Clang seems to turn inputs like that into the most generic form, which
is the memory input - but to make matters worse, clang won't even use a
possible original memory location, but will spill the value to stack,
and use the stack for the asm input.

See

  https://github.com/llvm/llvm-project/issues/20571#issuecomment-980933442

for some explanation of why clang has this strange behavior, but the end
result is that "g" and "rm" really end up generating horrid code.

Link: https://github.com/llvm/llvm-project/issues/20571
Cc: Peter Zijlstra <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/compiler-clang.h
include/linux/compiler_types.h
This page took 0.047195 seconds and 4 git commands to generate.