-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Micro architecture parsing #177
base: master
Are you sure you want to change the base?
Changes from all commits
57db99a
6b1f9c9
a71e2ff
6219fa8
9792d3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
#[cfg(feature = "display")] | ||
pub mod display; | ||
mod extended; | ||
pub mod uarch; | ||
#[cfg(test)] | ||
mod tests; | ||
|
||
|
@@ -94,6 +95,7 @@ | |
edx: result.edx, | ||
} | ||
} | ||
|
||
/// The native reader uses the cpuid instruction to read the cpuid data from the | ||
/// CPU we're currently running on directly. | ||
#[derive(Clone, Copy)] | ||
|
@@ -114,8 +116,8 @@ | |
|
||
#[cfg(not(test))] | ||
mod std { | ||
pub use core::ops; | ||
Check warning on line 119 in src/lib.rs GitHub Actions / Coverage
Check warning on line 119 in src/lib.rs GitHub Actions / ci (stable)
Check warning on line 119 in src/lib.rs GitHub Actions / ci (stable)
Check warning on line 119 in src/lib.rs GitHub Actions / ci (nightly)
Check warning on line 119 in src/lib.rs GitHub Actions / ci (nightly)
Check warning on line 119 in src/lib.rs GitHub Actions / ci (nightly)
|
||
pub use core::option; | ||
Check warning on line 120 in src/lib.rs GitHub Actions / Coverage
Check warning on line 120 in src/lib.rs GitHub Actions / ci (stable)
Check warning on line 120 in src/lib.rs GitHub Actions / ci (stable)
Check warning on line 120 in src/lib.rs GitHub Actions / ci (nightly)
Check warning on line 120 in src/lib.rs GitHub Actions / ci (nightly)
Check warning on line 120 in src/lib.rs GitHub Actions / ci (nightly)
|
||
} | ||
|
||
/// Macro which queries cpuid directly. | ||
|
@@ -185,16 +187,17 @@ | |
} | ||
|
||
impl<F> CpuIdReader for F | ||
where | ||
F: Fn(u32, u32) -> CpuIdResult + Clone, | ||
where | ||
F: Fn(u32, u32) -> CpuIdResult + Clone, | ||
{ | ||
fn cpuid2(&self, eax: u32, ecx: u32) -> CpuIdResult { | ||
self(eax, ecx) | ||
} | ||
} | ||
|
||
#[non_exhaustive] | ||
#[derive(Debug, Eq, PartialEq, Clone, Copy)] | ||
enum Vendor { | ||
pub enum Vendor { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should try to have docs for all public types |
||
Intel, | ||
Amd, | ||
Unknown(u32, u32, u32), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this from cargo fmt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check, but I would bet on my IDE running rustfmt. (JetBrain’s Rust Rover)