use crate::Register;
use crate::relocations::SimpleRelocation;
pub type X64Relocation = SimpleRelocation;
pub type Assembler = crate::Assembler<X64Relocation>;
pub type AssemblyModifier<'a> = crate::Modifier<'a, X64Relocation>;
pub type UncommittedModifier<'a> = crate::UncommittedModifier<'a>;
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Rq {
RAX = 0x0, RCX = 0x1, RDX = 0x2, RBX = 0x3,
RSP = 0x4, RBP = 0x5, RSI = 0x6, RDI = 0x7,
R8 = 0x8, R9 = 0x9, R10 = 0xA, R11 = 0xB,
R12 = 0xC, R13 = 0xD, R14 = 0xE, R15 = 0xF,
}
reg_impls!(Rq);
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Rx {
XMM0 = 0x0, XMM1 = 0x1, XMM2 = 0x2, XMM3 = 0x3,
XMM4 = 0x4, XMM5 = 0x5, XMM6 = 0x6, XMM7 = 0x7,
XMM8 = 0x8, XMM9 = 0x9, XMM10 = 0xA, XMM11 = 0xB,
XMM12 = 0xC, XMM13 = 0xD, XMM14 = 0xE, XMM15 = 0xF,
}
reg_impls!(Rx);
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum RC {
CR0 = 0x0, CR1 = 0x1, CR2 = 0x2, CR3 = 0x3,
CR4 = 0x4, CR5 = 0x5, CR6 = 0x6, CR7 = 0x7,
CR8 = 0x8, CR9 = 0x9, CR10 = 0xA, CR11 = 0xB,
CR12 = 0xC, CR13 = 0xD, CR14 = 0xE, CR15 = 0xF,
}
reg_impls!(RC);
pub use crate::x86::{Rh, Rf, Rm, Rs, RD, RB};
#[cfg(test)]
mod tests {
use super::Rq::*;
use crate::Register;
#[test]
fn reg_code() {
assert_eq!(RAX.code(), 0);
}
#[test]
fn reg_code_from() {
assert_eq!(u8::from(R11), 11);
}
}