Giter Club home page Giter Club logo

amd64_timer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

amd64_timer's Issues

Error compiling with latest nightly

error: the legacy LLVM-style asm! syntax is no longer supported
  --> \amd64_timer-1.2.0\src\lib.rs:12:9
   |
12 |           asm!("lfence;rdtsc"
   |           ^---
   |           |
   |  _________help: replace with: `llvm_asm!`
   | |
13 | |             : "={edx}"(high), "={eax}"(low)
14 | |             :
15 | |             : "rdx", "rax"
16 | |             : "volatile"
17 | |         );
   | |__________^
   |
   = note: consider migrating to the new asm! syntax specified in RFC 2873
   = note: alternatively, switch to llvm_asm! to keep your code working as it is

Latest compiler dropped llvm_asm macro

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.

The crates.io version is incorrect

The version of this on crates.io is wrong, but the repository is correct. It seems like you may have forgotten to push it to crates.io?

Specifically, the line ((mask&high)<<32) | (mask&low) is missing the <<32 bitshifting part, resulting in an incorrect value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.