#[non_exhaustive]pub enum Regs {
X86_64 {
rip: u64,
rsp: u64,
gprs: [u64; 16],
},
Aarch64 {
pc: u64,
sp_el1: u64,
gprs: [u64; 31],
pstate: u64,
},
}Expand description
Architecture-tagged register file.
Different backends own different register subsets — a KVM x86 vCPU exposes CR0/CR3/EFER/MSRs that don’t exist on aarch64 HVF, and vice versa. We model that with a sum type and let each backend convert to/from its native struct in its own crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
X86_64
x86_64 register file. Field set is intentionally minimal in squib-core; backend
crates carry richer typed structs for their own use.
Fields
Aarch64
aarch64 register file (EL1). PC + 31 GPRs (X0..X30) + SP_EL1 + PSTATE.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Regs
impl RefUnwindSafe for Regs
impl Send for Regs
impl Sync for Regs
impl Unpin for Regs
impl UnsafeUnpin for Regs
impl UnwindSafe for Regs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more