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

Migrate llvm_asm! to asm! #36

Merged
merged 1 commit into from
Jan 19, 2022
Merged

Conversation

sirhcel
Copy link
Contributor

@sirhcel sirhcel commented Jan 18, 2022

According to rust-lang/rust#70173 (comment), asm! got stabilized in nightly and llvm_asm!

Migrating to asm! makes this crate compile again with nightly 2022-01-17 for me. Thank you @jessebraham for pointing me to the issue above!

@sirhcel sirhcel force-pushed the migrate-llvm-asm-to-asm branch 2 times, most recently from 566a7be to 6461cd6 Compare January 19, 2022 01:33
@sirhcel
Copy link
Contributor Author

sirhcel commented Jan 19, 2022

I did not know about how to build esp-idf-hal in the first place and found out about the issue by CI. I could build for ULP now and fixed asm!. Without a toolchain for Xtensa at hand I'm blindly committing the change in src/cpu.rs.

@sirhcel sirhcel force-pushed the migrate-llvm-asm-to-asm branch from 6461cd6 to 6bd2459 Compare January 19, 2022 01:47
The macro llvm_asm! finally got removed as 'asm!' got stabilized in
nightly. See
rust-lang/rust#70173 (comment)
and this gets shipped starting with nightly 2022-01-17.

According to
https://users.rust-lang.org/t/volatile-option-in-new-asm-macro/44289/2
assembly is volatile by default with asm!.
@sirhcel sirhcel force-pushed the migrate-llvm-asm-to-asm branch from 6bd2459 to a840865 Compare January 19, 2022 08:28
@ivmarkov ivmarkov merged commit 7fd2c5d into esp-rs:master Jan 19, 2022
@sirhcel sirhcel deleted the migrate-llvm-asm-to-asm branch January 24, 2022 00:15
sirhcel added a commit to sirhcel/esp-idf-hal that referenced this pull request Jan 24, 2022
This avoids a compiler warning on single-core targets which do not
perform an actual check. This fixes esp-rs#36.
usbalbin pushed a commit to usbalbin/esp-idf-hal that referenced this pull request May 5, 2022
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.

2 participants