remove returns via arg pointer from the callconv interface

This commit is contained in:
Brendan Hansknecht 2022-02-17 21:21:07 -08:00
parent d65a971508
commit 8eb1b09ff9
3 changed files with 5 additions and 8 deletions

View file

@ -297,10 +297,6 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg, AArch64Assembler> for AArch64C
) {
todo!("Loading returned complex symbols for AArch64");
}
fn returns_via_arg_pointer(_ret_layout: &Layout) -> bool {
todo!("Returning via arg pointer for AArch64");
}
}
impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {

View file

@ -107,9 +107,6 @@ pub trait CallConv<GeneralReg: RegTrait, FloatReg: RegTrait, ASM: Assembler<Gene
sym: &Symbol,
layout: &Layout<'a>,
);
// returns true if the layout should be returned via an argument pointer.
fn returns_via_arg_pointer(ret_layout: &Layout) -> bool;
}
/// Assembler contains calls to the backend assembly generator.

View file

@ -496,9 +496,11 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Syste
x => todo!("receiving complex return type, {:?}", x),
}
}
}
impl X86_64SystemV {
fn returns_via_arg_pointer(ret_layout: &Layout) -> bool {
// TODO: This may need to be more complex/extended to fully support the calling convention.
// TODO: This will need to be more complex/extended to fully support the calling convention.
// details here: https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf
ret_layout.stack_size(TARGET_INFO) > 16
}
@ -840,7 +842,9 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Windo
) {
todo!("Loading returned complex symbols for X86_64");
}
}
impl X86_64WindowsFastcall {
fn returns_via_arg_pointer(ret_layout: &Layout) -> bool {
// TODO: This is not fully correct there are some exceptions for "vector" types.
// details here: https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-160#return-values