Merge pull request #1670 from teapotd/win64-pass-by-ref

Implement passing arguments by ref for win64 ABI
This commit is contained in:
Nick Fitzgerald
2020-06-01 11:13:30 -07:00
committed by GitHub
6 changed files with 128 additions and 10 deletions

View File

@@ -117,6 +117,20 @@ block0(v0: i64, v1: i64):
}
; check: function %ret_val_i128(i64 [%rdx], i64 [%r8], i64 sret [%rcx], i64 fp [%rbp]) -> i64 sret [%rax], i64 fp [%rbp] windows_fastcall {
; check if i128 is passed by reference
function %i128_arg(i128) windows_fastcall {
block0(v0: i128):
return
}
; check: function %i128_arg(i64 ptr [%rcx], i64 fp [%rbp]) -> i64 fp [%rbp] windows_fastcall {
; check if vector types are passed by reference
function %i32x4_arg(i32x4) windows_fastcall {
block0(v0: i32x4):
return
}
; check: function %i32x4_arg(i64 ptr [%rcx], i64 fp [%rbp]) -> i64 fp [%rbp] windows_fastcall {
function %internal_stack_arg_function_call(i64) -> i64 windows_fastcall {
fn0 = %foo(i64, i64, i64, i64) -> i64 windows_fastcall
fn1 = %foo2(i64, i64, i64, i64) -> i64 windows_fastcall