diff options
| author | bors <bors@rust-lang.org> | 2020-10-26 04:34:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-26 04:34:46 +0000 |
| commit | 1cd97cad6e5f85bed455f505f330ead1d5cd8432 (patch) | |
| tree | 7713c2e1b72df2e80cebedfacf98a4d85aab2720 /compiler/rustc_codegen_llvm/src | |
| parent | 16e9ed0b1c58e0327eb37eb6f70e9b9ef1844591 (diff) | |
| parent | c8e0f4d90b474492485e869be81b0d452dbe1926 (diff) | |
| download | rust-1cd97cad6e5f85bed455f505f330ead1d5cd8432.tar.gz rust-1cd97cad6e5f85bed455f505f330ead1d5cd8432.zip | |
Auto merge of #78387 - Dylan-DPC:rollup-ch0st6z, r=Dylan-DPC
Rollup of 10 pull requests Successful merges: - #74477 (`#[deny(unsafe_op_in_unsafe_fn)]` in sys/wasm) - #77836 (transmute_copy: explain that alignment is handled correctly) - #78126 (Properly define va_arg and va_list for aarch64-apple-darwin) - #78137 (Initialize tracing subscriber in compiletest tool) - #78161 (Add issue template link to IRLO) - #78214 (Tweak match arm semicolon removal suggestion to account for futures) - #78247 (Fix #78192) - #78252 (Add codegen test for #45964) - #78268 (Do not try to report on closures to avoid ICE) - #78295 (Add some regression tests) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/va_arg.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_llvm/src/va_arg.rs b/compiler/rustc_codegen_llvm/src/va_arg.rs index 5f820f83a94..b6a0516b8bc 100644 --- a/compiler/rustc_codegen_llvm/src/va_arg.rs +++ b/compiler/rustc_codegen_llvm/src/va_arg.rs @@ -173,26 +173,24 @@ pub(super) fn emit_va_arg( // is lacking in some instances, so we should only use it as a fallback. let target = &bx.cx.tcx.sess.target; let arch = &bx.cx.tcx.sess.target.arch; - match (&**arch, target.options.is_like_windows) { + match &**arch { // Windows x86 - ("x86", true) => { + "x86" if target.options.is_like_windows => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(4).unwrap(), false) } // Generic x86 - ("x86", _) => { - emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(4).unwrap(), true) - } + "x86" => emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(4).unwrap(), true), // Windows AArch64 - ("aarch64", true) => { + "aarch64" if target.options.is_like_windows => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), false) } - // iOS AArch64 - ("aarch64", _) if target.target_os == "ios" => { + // macOS / iOS AArch64 + "aarch64" if target.options.is_like_osx => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), true) } - ("aarch64", _) => emit_aapcs_va_arg(bx, addr, target_ty), + "aarch64" => emit_aapcs_va_arg(bx, addr, target_ty), // Windows x86_64 - ("x86_64", true) => { + "x86_64" if target.options.is_like_windows => { let target_ty_size = bx.cx.size_of(target_ty).bytes(); let indirect: bool = target_ty_size > 8 || !target_ty_size.is_power_of_two(); emit_ptr_va_arg(bx, addr, target_ty, indirect, Align::from_bytes(8).unwrap(), false) |
