diff --git a/compiler/gen_dev/src/generic64/aarch64.rs b/compiler/gen_dev/src/generic64/aarch64.rs index 3410b0fb20..caa675617c 100644 --- a/compiler/gen_dev/src/generic64/aarch64.rs +++ b/compiler/gen_dev/src/generic64/aarch64.rs @@ -297,10 +297,6 @@ impl CallConv 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 for AArch64Assembler { diff --git a/compiler/gen_dev/src/generic64/mod.rs b/compiler/gen_dev/src/generic64/mod.rs index 66f7aa012c..7b31f0178f 100644 --- a/compiler/gen_dev/src/generic64/mod.rs +++ b/compiler/gen_dev/src/generic64/mod.rs @@ -107,9 +107,6 @@ pub trait CallConv, ); - - // 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. diff --git a/compiler/gen_dev/src/generic64/x86_64.rs b/compiler/gen_dev/src/generic64/x86_64.rs index 711f42da8f..2286cbd7fc 100644 --- a/compiler/gen_dev/src/generic64/x86_64.rs +++ b/compiler/gen_dev/src/generic64/x86_64.rs @@ -496,9 +496,11 @@ impl CallConv 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 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