Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined behavior in hint::spin_loop for x86 targets without SSE2
The pause instruction requires SSE2 but was being unconditionally used on targets without it, resulting in undefined behavior. This PR fixes that by only using the pause intrinsic if SSE2 is available. It also removes the inline assembly which was not required since these instructions are available in core::arch, and extends support of the spin_loop hint to arm targets with the v6 feature which also support the yield instruction. Closes #59237 .
- Loading branch information