Skip to content

Commit

Permalink
Add support for Arm64EC (#2957)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaoliello authored Apr 5, 2024
1 parent 879c0cf commit ac4643e
Show file tree
Hide file tree
Showing 76 changed files with 2,565 additions and 2,524 deletions.
1 change: 1 addition & 0 deletions crates/libs/bindgen/src/rust/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ fn cfg_add_attributes<R: AsRow + Into<metadata::HasAttribute>>(cfg: &mut Cfg, ro
}
if value & 2 == 2 {
cfg.arches.insert("x86_64");
cfg.arches.insert("arm64ec");
}
if value & 4 == 4 {
cfg.arches.insert("aarch64");
Expand Down

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions crates/libs/sys/src/Windows/Win32/Devices/Display/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2315,16 +2315,16 @@ impl Clone for FD_LIGATURE {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct FD_XFORM {
pub eXX: f32,
pub eXY: f32,
pub eYX: f32,
pub eYY: f32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for FD_XFORM {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for FD_XFORM {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -2361,7 +2361,7 @@ impl Clone for FLOATOBJ {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct FLOATOBJ_XFORM {
pub eM11: f32,
pub eM12: f32,
Expand All @@ -2370,9 +2370,9 @@ pub struct FLOATOBJ_XFORM {
pub eDx: f32,
pub eDy: f32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for FLOATOBJ_XFORM {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for FLOATOBJ_XFORM {
fn clone(&self) -> Self {
*self
Expand All @@ -2397,14 +2397,14 @@ impl Clone for FLOATOBJ_XFORM {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub union FLOAT_LONG {
pub e: f32,
pub l: i32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for FLOAT_LONG {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for FLOAT_LONG {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -2773,7 +2773,7 @@ impl Clone for IFIEXTRA {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[cfg(feature = "Win32_Graphics_Gdi")]
pub struct IFIMETRICS {
pub cjThis: u32,
Expand Down Expand Up @@ -2837,10 +2837,10 @@ pub struct IFIMETRICS {
pub panose: super::super::Graphics::Gdi::PANOSE,
pub Align: *mut core::ffi::c_void,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Copy for IFIMETRICS {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Clone for IFIMETRICS {
fn clone(&self) -> Self {
Expand Down Expand Up @@ -2948,7 +2948,7 @@ impl Clone for LIGATURE {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct LINEATTRS {
pub fl: u32,
pub iJoin: u32,
Expand All @@ -2959,9 +2959,9 @@ pub struct LINEATTRS {
pub pstyle: *mut FLOAT_LONG,
pub elStyleState: FLOAT_LONG,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for LINEATTRS {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for LINEATTRS {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -3419,14 +3419,14 @@ impl Clone for PHYSICAL_MONITOR {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct POINTE {
pub x: f32,
pub y: f32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for POINTE {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for POINTE {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -4143,7 +4143,7 @@ impl Clone for WNDOBJ {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct XFORML {
pub eM11: f32,
pub eM12: f32,
Expand All @@ -4152,9 +4152,9 @@ pub struct XFORML {
pub eDx: f32,
pub eDy: f32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for XFORML {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for XFORML {
fn clone(&self) -> Self {
*self
Expand Down
6 changes: 3 additions & 3 deletions crates/libs/sys/src/Windows/Win32/Graphics/Printing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4955,13 +4955,13 @@ impl Clone for SPLCLIENT_INFO_2_W2K {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct SPLCLIENT_INFO_2_WINXP {
pub hSplPrinter: u64,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for SPLCLIENT_INFO_2_WINXP {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for SPLCLIENT_INFO_2_WINXP {
fn clone(&self) -> Self {
*self
Expand Down
6 changes: 3 additions & 3 deletions crates/libs/sys/src/Windows/Win32/Media/Audio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ impl Clone for ACMFORMATTAGDETAILSW {
}
}
#[repr(C, packed(1))]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct ACMSTREAMHEADER {
pub cbStruct: u32,
pub fdwStatus: u32,
Expand All @@ -1252,9 +1252,9 @@ pub struct ACMSTREAMHEADER {
pub dwDstUser: usize,
pub dwReservedDriver: [u32; 15],
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for ACMSTREAMHEADER {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for ACMSTREAMHEADER {
fn clone(&self) -> Self {
*self
Expand Down
18 changes: 9 additions & 9 deletions crates/libs/sys/src/Windows/Win32/Media/KernelStreaming/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3725,14 +3725,14 @@ impl Clone for KSNODEPROPERTY {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct KSNODEPROPERTY_AUDIO_3D_LISTENER {
pub NodeProperty: KSNODEPROPERTY,
pub ListenerId: *mut core::ffi::c_void,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for KSNODEPROPERTY_AUDIO_3D_LISTENER {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for KSNODEPROPERTY_AUDIO_3D_LISTENER {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -3779,15 +3779,15 @@ impl Clone for KSNODEPROPERTY_AUDIO_DEV_SPECIFIC {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct KSNODEPROPERTY_AUDIO_PROPERTY {
pub NodeProperty: KSNODEPROPERTY,
pub AppContext: *mut core::ffi::c_void,
pub Length: u32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for KSNODEPROPERTY_AUDIO_PROPERTY {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for KSNODEPROPERTY_AUDIO_PROPERTY {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -5578,7 +5578,7 @@ impl Clone for KSSTREAMALLOCATOR_STATUS_EX {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct KSSTREAM_HEADER {
pub Size: u32,
pub TypeSpecificFlags: u32,
Expand All @@ -5590,9 +5590,9 @@ pub struct KSSTREAM_HEADER {
pub OptionsFlags: u32,
pub Reserved: u32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for KSSTREAM_HEADER {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for KSSTREAM_HEADER {
fn clone(&self) -> Self {
*self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2006,16 +2006,16 @@ impl Clone for IP4_ARRAY {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub union IP6_ADDRESS {
pub IP6Qword: [u64; 2],
pub IP6Dword: [u32; 4],
pub IP6Word: [u16; 8],
pub IP6Byte: [u8; 16],
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for IP6_ADDRESS {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for IP6_ADDRESS {
fn clone(&self) -> Self {
*self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ impl Clone for ICMP_ECHO_REPLY {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct ICMP_ECHO_REPLY32 {
pub Address: u32,
pub Status: u32,
Expand All @@ -1128,9 +1128,9 @@ pub struct ICMP_ECHO_REPLY32 {
pub Data: *mut core::ffi::c_void,
pub Options: IP_OPTION_INFORMATION32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for ICMP_ECHO_REPLY32 {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for ICMP_ECHO_REPLY32 {
fn clone(&self) -> Self {
*self
Expand Down Expand Up @@ -1877,17 +1877,17 @@ impl Clone for IP_OPTION_INFORMATION {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct IP_OPTION_INFORMATION32 {
pub Ttl: u8,
pub Tos: u8,
pub Flags: u8,
pub OptionsSize: u8,
pub OptionsData: *mut u8,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for IP_OPTION_INFORMATION32 {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for IP_OPTION_INFORMATION32 {
fn clone(&self) -> Self {
*self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl Clone for NAME_BUFFER {
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
pub struct NCB {
pub ncb_command: u8,
pub ncb_retcode: u8,
Expand All @@ -200,9 +200,9 @@ pub struct NCB {
pub ncb_reserve: [u8; 18],
pub ncb_event: super::super::Foundation::HANDLE,
}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Copy for NCB {}
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Clone for NCB {
fn clone(&self) -> Self {
*self
Expand Down
Loading

0 comments on commit ac4643e

Please sign in to comment.