Files
wasmtime/cranelift/filetests/filetests/legalizer/pass_by_ref.clif

32 lines
807 B
Plaintext

test legalizer
target x86_64
function %legalize_entry(i128) -> i64 windows_fastcall {
block0(v0: i128):
v1, v2 = isplit v0
return v2
}
; check: function %legalize_entry(i64 ptr [%rcx]) -> i64 [%rax] windows_fastcall {
; nextln: block0(v3: i64):
; nextln: v4 = load.i64 v3
; nextln: v1 -> v4
; nextln: v5 = load.i64 v3+8
; nextln: v2 -> v5
; nextln: v0 = iconcat v4, v5
; nextln: return v2
function %legalize_call() {
fn0 = %foo(i32x4) windows_fastcall
block0:
v0 = vconst.i32x4 [1 2 3 4]
call fn0(v0)
return
}
; check: ss0 = explicit_slot 16
; check: sig0 = (i64 ptr [%rcx]) windows_fastcall
; check: v0 = vconst.i32x4 const0
; nextln: v1 = stack_addr.i64 ss0
; nextln: store v0, v1
; nextln: v2 = func_addr.i64 fn0
; nextln: call_indirect sig0, v2(v1)