Deduplicate definition of FLAG_SINGLESTEP between x86 and x86_64

This commit is contained in:
bjorn3
2026-04-06 15:05:24 +02:00
committed by Jeremy Soller
parent e98e12780e
commit b0b0ec2d71
3 changed files with 5 additions and 12 deletions
-6
View File
@@ -7,12 +7,6 @@ pub mod consts;
#[macro_use]
pub mod interrupt;
// Flags
pub mod flags {
pub const SHIFT_SINGLESTEP: usize = 8;
pub const FLAG_SINGLESTEP: usize = 1 << SHIFT_SINGLESTEP;
}
#[unsafe(naked)]
pub unsafe extern "C" fn arch_copy_to_user(dst: usize, src: usize, len: usize) -> u8 {
core::arch::naked_asm!(
-6
View File
@@ -15,12 +15,6 @@ pub mod interrupt;
/// Miscellaneous processor features
pub mod misc;
// Flags
pub mod flags {
pub const SHIFT_SINGLESTEP: usize = 8;
pub const FLAG_SINGLESTEP: usize = 1 << SHIFT_SINGLESTEP;
}
// TODO: Maybe support rewriting relocations (using LD's --emit-relocs) when working with entire
// functions?
#[unsafe(naked)]
+5
View File
@@ -38,3 +38,8 @@ pub use ::rmm::x86::X86Arch as CurrentRmmArch;
#[cfg(target_arch = "x86_64")]
pub use ::rmm::x86_64::X8664Arch as CurrentRmmArch;
// Flags
pub mod flags {
pub const FLAG_SINGLESTEP: usize = 1 << 8;
}