Closed IsaacWoods closed 4 years ago
I suspect this is probably due to the LLVM upgrade, but would be good to confirm. Regardless I believe we're in "not supporting llvm_asm" mode right now, right @Amanieu?
This has never worked since foo
is a ZST function type. You need to cast foo
to a usize
before passing it to the asm.
Oh wait I see you're casting it to a function pointer first, so that's not the issue.
Yes this is probably due to the LLVM upgrade. You need to use the P
or c
modifier (${0:c}
) to prevent LLVM from adding offset
in front of the function name. I believe this change came from LLVM 10.
However as @Mark-Simulacrum said, we're not really planning on supporting llvm_asm!
any more, you should migrate to the new asm!
.
Closing as WONTFIX.
In recent nightlies (first detected in
rustc 1.45.0-nightly (4bd32c980 2020-05-29)
, but likely before that but went untested due to unavailable components), this no longer compiles:with the error:
Worse, this incorrect version seems to outright crash LLVM:
with the output (complete):
@rustbot modify labels: +A-inline-assembly and +A-LLVM