Files
packages/lang/rust
Josef Schlehofer 860798e4f6 rust: fix compare_exchange_weak never succeeding on mpc85xx
LLVM places the release fence of a cmpxchg between the load-linked and the
store-conditional. On e500v2 that clears the reservation, so the
store-conditional always fails. The strong form retries and re-reserves; the
weak form has no retry and can never succeed.

fetch_update in core is a weak retry loop, so it spins forever and anything
using it hangs. A tokio reactor livelocks on its first I/O event, burning
CPU without issuing a syscall, which makes async Rust unusable on the
subtarget.

Carry the fix as a patch until it reaches a rustc release. It adds a
TargetLowering hook, defaulting to false, so only PowerPC changes.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2026-08-16 09:40:07 +02:00
..
2023-10-11 15:50:24 +08:00