From 727a15f296bce39383d0c08cd57e1575dea8950d Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 20 Jan 2019 11:44:11 +0000 Subject: [PATCH 1/3] Fix aarch64 typo --- src/libcore/ffi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs index 5cc9c25c21e0f..3daa2474c521b 100644 --- a/src/libcore/ffi.rs +++ b/src/libcore/ffi.rs @@ -47,7 +47,7 @@ impl fmt::Debug for c_void { /// Basic implementation of a `va_list`. #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"), not(target_arch = "x86_64")), - all(target_arch = "aarch4", target_os = "ios"), + all(target_arch = "aarch64", target_os = "ios"), windows))] #[unstable(feature = "c_variadic", reason = "the `c_variadic` feature has not been properly tested on \ @@ -193,7 +193,7 @@ impl<'a> VaList<'a> { where F: for<'copy> FnOnce(VaList<'copy>) -> R { #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"), not(target_arch = "x86_64")), - all(target_arch = "aarch4", target_os = "ios"), + all(target_arch = "aarch64", target_os = "ios"), windows))] let mut ap = va_copy(self); #[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"), From 8485f58abf48cf893aa1af73629d0684962e0732 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 20 Jan 2019 11:47:29 +0000 Subject: [PATCH 2/3] Fix AArch64 typo in comments --- src/libcore/ffi.rs | 2 +- src/librustc_codegen_llvm/va_arg.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs index 3daa2474c521b..96dbfdcb57de4 100644 --- a/src/libcore/ffi.rs +++ b/src/libcore/ffi.rs @@ -67,7 +67,7 @@ impl fmt::Debug for VaListImpl { } /// AArch64 ABI implementation of a `va_list`. See the -/// [Aarch64 Procedure Call Standard] for more details. +/// [AArch64 Procedure Call Standard] for more details. /// /// [AArch64 Procedure Call Standard]: /// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf diff --git a/src/librustc_codegen_llvm/va_arg.rs b/src/librustc_codegen_llvm/va_arg.rs index 7aceaea4510ce..7fc17d17f99df 100644 --- a/src/librustc_codegen_llvm/va_arg.rs +++ b/src/librustc_codegen_llvm/va_arg.rs @@ -108,12 +108,12 @@ pub(super) fn emit_va_arg( emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(4).unwrap(), true) } - // Windows Aarch64 + // Windows AArch64 ("aarch64", true) => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), false) } - // iOS Aarch64 + // iOS AArch64 ("aarch64", _) if target.target_os == "ios" => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), true) From 62c159e500dac61dd6f20c8a50f1b1570ed481ee Mon Sep 17 00:00:00 2001 From: James Duley Date: Mon, 25 Feb 2019 18:08:57 +0000 Subject: [PATCH 3/3] Fix missing cfg for aarch64 + ios in ffi.rs --- src/libcore/ffi.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs index 96dbfdcb57de4..231a1f199bdd6 100644 --- a/src/libcore/ffi.rs +++ b/src/libcore/ffi.rs @@ -59,6 +59,7 @@ extern { #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"), not(target_arch = "x86_64")), + all(target_arch = "aarch64", target_os = "ios"), windows))] impl fmt::Debug for VaListImpl { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -71,7 +72,7 @@ impl fmt::Debug for VaListImpl { /// /// [AArch64 Procedure Call Standard]: /// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf -#[cfg(all(target_arch = "aarch64", not(windows)))] +#[cfg(all(target_arch = "aarch64", not(target_os = "ios"), not(windows)))] #[repr(C)] #[derive(Debug)] #[unstable(feature = "c_variadic", @@ -197,10 +198,10 @@ impl<'a> VaList<'a> { windows))] let mut ap = va_copy(self); #[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"), - not(windows)))] + not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))] let mut ap_inner = va_copy(self); #[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"), - not(windows)))] + not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))] let mut ap = VaList(&mut ap_inner); let ret = f(VaList(ap.0)); va_end(&mut ap); @@ -216,10 +217,11 @@ extern "rust-intrinsic" { /// Copies the current location of arglist `src` to the arglist `dst`. #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"), not(target_arch = "x86_64")), + all(target_arch = "aarch64", target_os = "ios"), windows))] fn va_copy<'a>(src: &VaList<'a>) -> VaList<'a>; #[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"), - not(windows)))] + not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))] fn va_copy(src: &VaList) -> VaListImpl; /// Loads an argument of type `T` from the `va_list` `ap` and increment the