From d468f713270386f9fa5a5bb4404229219141c80e Mon Sep 17 00:00:00 2001 From: bdbai Date: Wed, 25 Dec 2024 16:23:11 +0800 Subject: [PATCH] Match arm definitions with winsdk --- src/windows_sys.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/windows_sys.rs b/src/windows_sys.rs index bf26dd2e..eabaf9be 100644 --- a/src/windows_sys.rs +++ b/src/windows_sys.rs @@ -253,7 +253,18 @@ cfg_if::cfg_if! { #[repr(C)] #[derive(Clone, Copy)] - pub struct CONTEXT_u([u64; 32]); + pub struct NEON128 { + pub Low: u64, + pub High: i64, + } + + #[repr(C)] + #[derive(Clone, Copy)] + pub union CONTEXT_FloatRegs{ + pub Q: [NEON128; 16], + pub D: [u64; 32], + pub S: [u32; 32], + } #[repr(C)] #[derive(Clone, Copy)] @@ -272,13 +283,16 @@ cfg_if::cfg_if! { pub R10: u32, pub R11: u32, pub R12: u32, + // Control registers pub Sp: u32, pub Lr: u32, pub Pc: u32, pub Cpsr: u32, + // Floating-point registers pub Fpsrc: u32, pub Padding: u32, - pub u: CONTEXT_u, + pub u: CONTEXT_FloatRegs, + // Debug registers pub Bvr: [u32; ARM_MAX_BREAKPOINTS], pub Bcr: [u32; ARM_MAX_BREAKPOINTS], pub Wvr: [u32; ARM_MAX_WATCHPOINTS],