Merge pull request #1510 from teapotd/abi-i128-fix

Always check if struct-return parameter is needed
This commit is contained in:
Nick Fitzgerald
2020-05-29 10:02:16 -07:00
committed by GitHub
6 changed files with 60 additions and 41 deletions

View File

@@ -14,6 +14,12 @@ function %f() {
sig2 = (f32, i64) -> f64 system_v
; check: sig2 = (f32 [%xmm0], i64 [%rdi]) -> f64 [%xmm0] system_v
sig3 = () -> i128 system_v
; check: sig3 = () -> i64 [%rax], i64 [%rdx] system_v
sig4 = (i128) -> i128 system_v
; check: sig4 = (i64 [%rdi], i64 [%rsi]) -> i64 [%rax], i64 [%rdx] system_v
block0:
return
}

View File

@@ -110,6 +110,13 @@ block0(v0: f32, v1: f64, v2: i64, v3: i64):
; nextln: return v1, v5
; nextln: }
function %ret_val_i128(i64, i64) -> i128 windows_fastcall {
block0(v0: i64, v1: i64):
v2 = iconcat v0, v1
return v2
}
; check: function %ret_val_i128(i64 [%rdx], i64 [%r8], i64 sret [%rcx], i64 fp [%rbp]) -> i64 sret [%rax], 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