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

Add a function for the nop instruction #174

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Add a function for the nop instruction #174

merged 1 commit into from
Sep 1, 2020

Conversation

phil-opp
Copy link
Member

@phil-opp phil-opp commented Aug 30, 2020

Executes the nop instructions, which performs no operation (i.e. does nothing).

This operation is useful to work around the LLVM bug that endless loops are illegally optimized away (see rust-lang/rust#28728). By invoking this instruction (which is marked as volatile) in the endless loop, the compiler should no longer optimize it away.

@phil-opp phil-opp merged commit b8213a7 into master Sep 1, 2020
@phil-opp phil-opp deleted the nop branch September 1, 2020 08:37
phil-opp added a commit that referenced this pull request Sep 1, 2020
@phil-opp
Copy link
Member Author

phil-opp commented Sep 1, 2020

Published as v0.11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant