Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cranelift/filetests/filetests/runtests/call.clif
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,22 @@ block0(v0: b1):
}
; run: %call_b1(true) == false
; run: %call_b1(false) == true



; Tests calling across different calling conventions

function %callee_wasm_i64(i64) -> i64 wasmtime_system_v {
block0(v0: i64):
v1 = iadd_imm.i64 v0, 10
return v1
}

function %call_sysv_i64(i64) -> i64 system_v {
fn0 = %callee_wasm_i64(i64) -> i64 wasmtime_system_v

block0(v0: i64):
v1 = call fn0(v0)
return v1
}
; run: %call_sysv_i64(10) == 20
4 changes: 0 additions & 4 deletions cranelift/filetests/src/function_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,6 @@ impl<'a> Trampoline<'a> {
/// Compilation Error when compiling a function.
#[derive(Error, Debug)]
pub enum CompilationError {
/// This Target ISA is invalid for the current host.
#[error("Cross-compilation not currently supported; use the host's default calling convention \
or remove the specified calling convention in the function signature to use the host's default.")]
InvalidTargetIsa,
/// Cranelift codegen error.
#[error("Cranelift codegen error")]
CodegenError(#[from] CodegenError),
Expand Down