Skip to content
New issue

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

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

Already on GitHub? # to your account

Latest compiler dropped llvm_asm macro #4

Open
robertchristensen opened this issue Apr 7, 2023 · 0 comments
Open

Latest compiler dropped llvm_asm macro #4

robertchristensen opened this issue Apr 7, 2023 · 0 comments

Comments

@robertchristensen
Copy link
Contributor

When trying to compile this package I am getting an error

error: cannot find macro `llvm_asm` in this scope
  --> src/lib.rs:14:13
   |
14 |             llvm_asm!("lfence;rdtsc"
   |             ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> src/lib.rs:57:13
   |
57 |             llvm_asm!("mfence;rdtsc"
   |             ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> src/lib.rs:96:13
   |
96 |             llvm_asm!("rdtscp"
   |             ^^^^^^^^

error[E0635]: unknown feature `llvm_asm`
 --> src/lib.rs:2:47
  |
2 | #![cfg_attr(not(feature = "OLD_ASM"), feature(llvm_asm))]
  |                                               ^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `amd64_timer` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `amd64_timer` (lib test) due to 4 previous errors

Digging through docs, it looks like llvm_asm has been removed and the stable asm! macro should be used in its place. rust-lang/rust#70173 (comment)

Compiling with the OLD_ASM feature enabled also produces an error on newer rust compilers because asm is now stable and will need some modifications to get working.

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

No branches or pull requests

1 participant