Files
wasmtime/cranelift/filetests/regalloc/reload.cton
Dan Gohman 9e4ab7dc86 Rename CallConv::Native to CallConv::SystemV. (#291)
To keep cross-compiling straightforward, Cretonne shouldn't have any
behavior that depends on the host. This renames the "Native" calling
convention to "SystemV", which has a defined meaning for each target,
so that it's clear that the calling convention doesn't change
depending on what host Cretonne is running on.
2018-03-30 12:32:14 -07:00

20 lines
413 B
Plaintext

test regalloc
isa riscv enable_e
; regex: V=v\d+
; Check that we can handle a function return value that got spilled.
function %spill_return() -> i32 {
fn0 = function %foo() -> i32 system_v
ebb0:
v0 = call fn0()
; check: $(reg=$V) = call fn0
; check: v0 = spill $reg
v2 = call fn0()
; check: v2 = call fn0
return v0
; check: $(reload=$V) = fill v0
; check: return $reload
}