valarauca / amd64_timer Goto Github PK
View Code? Open in Web Editor NEWCount CPU cycles
License: MIT License
Count CPU cycles
License: MIT License
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
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 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.