diff options
| author | beetrees <b@beetr.ee> | 2025-06-12 00:47:01 +0100 |
|---|---|---|
| committer | beetrees <b@beetr.ee> | 2025-06-12 00:47:01 +0100 |
| commit | eb472e77cd3eeb154d163c8d3d23afe5666d367e (patch) | |
| tree | dd4fd7cd0017e4a1c3053ae632d8a4e0304d730d /compiler/rustc_target/src | |
| parent | e703dff8fe220b78195c53478e83fb2f68d8499c (diff) | |
Apply ABI attributes on return types in `rustc_codegen_cranelift`
Diffstat (limited to 'compiler/rustc_target/src')
| -rw-r--r-- | compiler/rustc_target/src/callconv/x86_64.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_target/src/callconv/x86_64.rs b/compiler/rustc_target/src/callconv/x86_64.rs index 300b19f62e7..700ee73c8fd 100644 --- a/compiler/rustc_target/src/callconv/x86_64.rs +++ b/compiler/rustc_target/src/callconv/x86_64.rs @@ -7,6 +7,7 @@ use rustc_abi::{ }; use crate::callconv::{ArgAbi, CastTarget, FnAbi}; +use crate::spec::HasTargetSpec; /// Classification of "eightbyte" components. // N.B., the order of the variants is from general to specific, @@ -175,7 +176,7 @@ const MAX_SSE_REGS: usize = 8; // XMM0-7 pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>) where Ty: TyAbiInterface<'a, C> + Copy, - C: HasDataLayout, + C: HasDataLayout + HasTargetSpec, { let mut int_regs = MAX_INT_REGS; let mut sse_regs = MAX_SSE_REGS; @@ -236,7 +237,7 @@ where if arg.layout.is_aggregate() { let size = arg.layout.size; arg.cast_to(cast_target(cls, size)); - } else { + } else if is_arg || cx.target_spec().is_like_darwin { arg.extend_integer_width_to(32); } } |
