Skip to content

Latest compiler dropped llvm_asm macro #4

Description

@robertchristensen

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions