Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline assembly from hint::spin_loop #59239

Merged
merged 1 commit into from
Mar 24, 2019

Commits on Mar 21, 2019

  1. 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 rust-lang#59237 .
    gnzlbg committed Mar 21, 2019
    Configuration menu
    Copy the full SHA
    830c98d View commit details
    Browse the repository at this point in the history