summaryrefslogtreecommitdiff
path: root/include/asm-ppc/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-01-16 15:44:34 -0700
committerPaul Walmsley <pjw@kernel.org>2026-01-16 18:05:47 -0700
commitbdce162f2e57a969803e5e9375999a3e0546905f (patch)
tree037bc5f4d0d1db197ba5d18c5aa20ef2c2aa8ad3 /include/asm-ppc/git@git.tavy.me:linux.git
parent8fdc61faa730e1213e925b8b2ea488d03e3510ac (diff)
riscv: Use 64-bit variable for output in __get_user_asm
After commit f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()"), which was the first commit that started using asm goto with outputs on RISC-V, builds of clang built with assertions enabled start crashing in certain files that use get_user() with: clang: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:12743: Register FollowCopyChain(MachineRegisterInfo &, Register): Assertion `MI->getOpcode() == TargetOpcode::COPY && "start of copy chain MUST be COPY"' failed. Internally, LLVM generates an addiw instruction when the output of the inline asm (which may be any scalar type) needs to be sign extended for ABI reasons, such as a later function call, so that basic block does not have to do it. Use a temporary 64-bit variable as the output of the inline assembly in __get_user_asm() and explicitly cast it to truncate it if necessary, avoiding the addiw that triggers the assertion. Link: https://github.com/ClangBuiltLinux/linux/issues/2092 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260116-riscv-wa-llvm-asm-goto-outputs-assertion-failure-v3-1-55b5775f989b@kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/asm-ppc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions