Skip to content

Commit c313647

Browse files
authored
Rollup merge of rust-lang#57987 - parched:va-args, r=joshtriplett
Fix some AArch64 typos cc @dlrobertson
2 parents d20e000 + 62c159e commit c313647

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/libcore/ffi.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl fmt::Debug for c_void {
4747
/// Basic implementation of a `va_list`.
4848
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
4949
not(target_arch = "x86_64")),
50-
all(target_arch = "aarch4", target_os = "ios"),
50+
all(target_arch = "aarch64", target_os = "ios"),
5151
windows))]
5252
#[unstable(feature = "c_variadic",
5353
reason = "the `c_variadic` feature has not been properly tested on \
@@ -59,6 +59,7 @@ extern {
5959

6060
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
6161
not(target_arch = "x86_64")),
62+
all(target_arch = "aarch64", target_os = "ios"),
6263
windows))]
6364
impl fmt::Debug for VaListImpl {
6465
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -67,11 +68,11 @@ impl fmt::Debug for VaListImpl {
6768
}
6869

6970
/// AArch64 ABI implementation of a `va_list`. See the
70-
/// [Aarch64 Procedure Call Standard] for more details.
71+
/// [AArch64 Procedure Call Standard] for more details.
7172
///
7273
/// [AArch64 Procedure Call Standard]:
7374
/// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
74-
#[cfg(all(target_arch = "aarch64", not(windows)))]
75+
#[cfg(all(target_arch = "aarch64", not(target_os = "ios"), not(windows)))]
7576
#[repr(C)]
7677
#[derive(Debug)]
7778
#[unstable(feature = "c_variadic",
@@ -193,14 +194,14 @@ impl<'a> VaList<'a> {
193194
where F: for<'copy> FnOnce(VaList<'copy>) -> R {
194195
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
195196
not(target_arch = "x86_64")),
196-
all(target_arch = "aarch4", target_os = "ios"),
197+
all(target_arch = "aarch64", target_os = "ios"),
197198
windows))]
198199
let mut ap = va_copy(self);
199200
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
200-
not(windows)))]
201+
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
201202
let mut ap_inner = va_copy(self);
202203
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
203-
not(windows)))]
204+
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
204205
let mut ap = VaList(&mut ap_inner);
205206
let ret = f(VaList(ap.0));
206207
va_end(&mut ap);
@@ -216,10 +217,11 @@ extern "rust-intrinsic" {
216217
/// Copies the current location of arglist `src` to the arglist `dst`.
217218
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
218219
not(target_arch = "x86_64")),
220+
all(target_arch = "aarch64", target_os = "ios"),
219221
windows))]
220222
fn va_copy<'a>(src: &VaList<'a>) -> VaList<'a>;
221223
#[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),
222-
not(windows)))]
224+
not(windows), not(all(target_arch = "aarch64", target_os = "ios"))))]
223225
fn va_copy(src: &VaList) -> VaListImpl;
224226

225227
/// Loads an argument of type `T` from the `va_list` `ap` and increment the

src/librustc_codegen_llvm/va_arg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ pub(super) fn emit_va_arg(
108108
emit_ptr_va_arg(bx, addr, target_ty, false,
109109
Align::from_bytes(4).unwrap(), true)
110110
}
111-
// Windows Aarch64
111+
// Windows AArch64
112112
("aarch64", true) => {
113113
emit_ptr_va_arg(bx, addr, target_ty, false,
114114
Align::from_bytes(8).unwrap(), false)
115115
}
116-
// iOS Aarch64
116+
// iOS AArch64
117117
("aarch64", _) if target.target_os == "ios" => {
118118
emit_ptr_va_arg(bx, addr, target_ty, false,
119119
Align::from_bytes(8).unwrap(), true)

0 commit comments

Comments
 (0)