Skip to content

Commit

Permalink
Migrate llvm_asm! to asm!
Browse files Browse the repository at this point in the history
See
rust-lang/rust#70173 (comment).
This gets shipped starting with nightly 2022-01-17.
  • Loading branch information
sirhcel committed Jan 18, 2022
1 parent 5b9d7ad commit 5c66284
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn core() -> u32 {
#[cfg(any(esp32, esp32s3))]
#[allow(deprecated)]
unsafe {
llvm_asm!("rsr.prid $0\nextui $0,$0,13,1" : "=r"(core) : : : "volatile");
asm!("rsr.prid $0\nextui $0,$0,13,1" : "=r"(core) : : : "volatile");
}

core
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(llvm_asm)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(generic_associated_types)] // For mutex

Expand Down
2 changes: 1 addition & 1 deletion src/ulp/sys/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn get_ccount() -> u32 {

#[allow(deprecated)]
unsafe {
llvm_asm!("rdcycle $0" : "=r"(ccount) : : : "volatile");
asm!("rdcycle $0" : "=r"(ccount) : : : "volatile");
}

ccount
Expand Down

0 comments on commit 5c66284

Please sign in to comment.