aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/long_mode/behavior.rs5
-rw-r--r--test/protected_mode/behavior.rs4
-rw-r--r--test/real_mode/behavior.rs4
3 files changed, 3 insertions, 10 deletions
diff --git a/test/long_mode/behavior.rs b/test/long_mode/behavior.rs
index b6bd8c2..e3d27aa 100644
--- a/test/long_mode/behavior.rs
+++ b/test/long_mode/behavior.rs
@@ -9,10 +9,7 @@ mod kvm {
use rand::prelude::*;
fn host_decoder() -> long_mode::InstDecoder {
- // Safety: it's cpuid, everything supports leaf eax=1.
- let leaf1 = unsafe {
- core::arch::x86_64::__cpuid(1)
- };
+ let leaf1 = core::arch::x86_64::__cpuid(1);
match leaf1.eax {
0x00b40f40 => {
// zen 5 (my 9950x)
diff --git a/test/protected_mode/behavior.rs b/test/protected_mode/behavior.rs
index 0fa8637..13c4c51 100644
--- a/test/protected_mode/behavior.rs
+++ b/test/protected_mode/behavior.rs
@@ -15,9 +15,7 @@ mod kvm {
fn host_decoder() -> protected_mode::InstDecoder {
// Safety: it's cpuid, everything supports leaf eax=1.
- let leaf1 = unsafe {
- core::arch::x86_64::__cpuid(1)
- };
+ let leaf1 = core::arch::x86_64::__cpuid(1);
match leaf1.eax {
0x00b40f40 => {
// zen 5 (my 9950x)
diff --git a/test/real_mode/behavior.rs b/test/real_mode/behavior.rs
index b2731da..6186c9d 100644
--- a/test/real_mode/behavior.rs
+++ b/test/real_mode/behavior.rs
@@ -15,9 +15,7 @@ mod kvm {
fn host_decoder() -> real_mode::InstDecoder {
// Safety: it's cpuid, everything supports leaf eax=1.
- let leaf1 = unsafe {
- core::arch::x86_64::__cpuid(1)
- };
+ let leaf1 = core::arch::x86_64::__cpuid(1);
match leaf1.eax {
0x00b40f40 => {
// zen 5 (my 9950x)