add cpu model to architectures for rust bindings
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// ARM64 registers
|
||||
#[repr(C)]
|
||||
#[derive(PartialEq, Debug, Clone, Copy)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub enum RegisterARM64 {
|
||||
INVALID = 0,
|
||||
X29 = 1,
|
||||
@@ -324,3 +325,24 @@ impl From<RegisterARM64> for i32 {
|
||||
r as i32
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum Arm64CpuModel {
|
||||
UC_CPU_ARM64_A57 = 0,
|
||||
UC_CPU_ARM64_A53 = 1,
|
||||
UC_CPU_ARM64_A72 = 2,
|
||||
UC_CPU_ARM64_MAX = 3,
|
||||
}
|
||||
|
||||
impl From<Arm64CpuModel> for i32 {
|
||||
fn from(value: Arm64CpuModel) -> Self {
|
||||
value as i32
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&Arm64CpuModel> for i32 {
|
||||
fn from(value: &Arm64CpuModel) -> Self {
|
||||
(*value) as i32
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user