diff --git a/src/instructions/segmentation.rs b/src/instructions/segmentation.rs index 334c42237..96b625323 100644 --- a/src/instructions/segmentation.rs +++ b/src/instructions/segmentation.rs @@ -103,92 +103,3 @@ impl GS { } } } - -/// Alias for [`CS::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `CS::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn set_cs(sel: SegmentSelector) { - unsafe { CS::set_reg(sel) } -} -/// Alias for [`SS::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `SS::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn load_ss(sel: SegmentSelector) { - unsafe { SS::set_reg(sel) } -} -/// Alias for [`DS::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `DS::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn load_ds(sel: SegmentSelector) { - unsafe { DS::set_reg(sel) } -} -/// Alias for [`ES::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `ES::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn load_es(sel: SegmentSelector) { - unsafe { ES::set_reg(sel) } -} -/// Alias for [`FS::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `FS::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn load_fs(sel: SegmentSelector) { - unsafe { FS::set_reg(sel) } -} -/// Alias for [`GS::set_reg()`] -#[deprecated(since = "0.14.4", note = "use `GS::set_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn load_gs(sel: SegmentSelector) { - unsafe { GS::set_reg(sel) } -} -/// Alias for [`GS::swap()`] -#[deprecated(since = "0.14.4", note = "use `GS::swap()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn swap_gs() { - unsafe { GS::swap() } -} -/// Alias for [`CS::get_reg()`] -#[deprecated(since = "0.14.4", note = "use `CS::get_reg()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub fn cs() -> SegmentSelector { - CS::get_reg() -} -/// Alias for [`FS::write_base()`]. -/// -/// Panics if the provided address is non-canonical. -#[deprecated(since = "0.14.4", note = "use `FS::write_base()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn wrfsbase(val: u64) { - unsafe { FS::write_base(VirtAddr::new(val)) } -} -/// Alias for [`FS::read_base()`] -#[deprecated(since = "0.14.4", note = "use `FS::read_base()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn rdfsbase() -> u64 { - FS::read_base().as_u64() -} -/// Alias for [`GS::write_base()`]. -/// -/// Panics if the provided address is non-canonical. -#[deprecated(since = "0.14.4", note = "use `GS::write_base()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn wrgsbase(val: u64) { - unsafe { GS::write_base(VirtAddr::new(val)) } -} -/// Alias for [`GS::read_base()`] -#[deprecated(since = "0.14.4", note = "use `GS::read_base()` instead")] -#[allow(clippy::missing_safety_doc)] -#[inline] -pub unsafe fn rdgsbase() -> u64 { - GS::read_base().as_u64() -} diff --git a/src/registers/control.rs b/src/registers/control.rs index 791671129..1f270f779 100644 --- a/src/registers/control.rs +++ b/src/registers/control.rs @@ -141,9 +141,6 @@ bitflags! { /// Also enables access to the PKRU register (via the `RDPKRU`/`WRPKRU` /// instructions) to set user-mode protection key access controls. const PROTECTION_KEY_USER = 1 << 22; - /// Alias for [`PROTECTION_KEY_USER`](Cr4Flags::PROTECTION_KEY_USER) - #[deprecated(since = "0.14.5", note = "use `PROTECTION_KEY_USER` instead")] - const PROTECTION_KEY = 1 << 22; /// Enables Control-flow Enforcement Technology (CET) /// /// This enables the shadow stack feature, ensuring return addresses read diff --git a/src/registers/mod.rs b/src/registers/mod.rs index dfde2439a..4357e750b 100644 --- a/src/registers/mod.rs +++ b/src/registers/mod.rs @@ -7,9 +7,5 @@ pub mod rflags; pub mod segmentation; pub mod xcontrol; -#[cfg(feature = "instructions")] -#[allow(deprecated)] -pub use crate::instructions::segmentation::{rdfsbase, rdgsbase, wrfsbase, wrgsbase}; - #[cfg(feature = "instructions")] pub use crate::instructions::read_rip; diff --git a/src/registers/xcontrol.rs b/src/registers/xcontrol.rs index 655e4ea9d..95699ddef 100644 --- a/src/registers/xcontrol.rs +++ b/src/registers/xcontrol.rs @@ -24,9 +24,6 @@ bitflags! { /// Enables AVX instructions and using the upper halves of the AVX registers /// with `XSAVE`/`XRSTOR`. const AVX = 1 << 2; - /// Alias for [`AVX`](XCr0Flags::AVX) - #[deprecated(since = "0.14.5", note = "use `AVX` instead")] - const YMM = 1<<2; /// Enables MPX instructions and using the BND0-BND3 bound registers /// with `XSAVE`/`XRSTOR` (Intel Only). const BNDREG = 1 << 3;