Add a calling-convention setting to the `Flags` used as part of the `TargetIsa`. This allows Cretonne code that generates calls to use the correct convention, such as when emitting libcalls during legalization or when the wasm frontend is decoding functions. This setting can be overridden per-function. This also adds "fast", "cold", and "fastcall" conventions, with "fast" as the new default. Note that "fast" and "cold" are not intended to be ABI-compatible across Cretonne versions. This will also ensure Windows users will get an `unimplemented!` rather than silent calling-convention mismatches, which reflects the fact that Windows calling conventions are not yet implemented. This also renames SpiderWASM, which isn't camel-case, to Baldrdash, which is, and which is also a more relevant name.
14 lines
292 B
Plaintext
14 lines
292 B
Plaintext
test verifier
|
|
|
|
function %add_members(i32) -> f32 baldrdash {
|
|
gv0 = vmctx+64
|
|
heap0 = static gv0, min 0x1000, bound 0x1_0000_0000, guard 0x8000_0000
|
|
|
|
ebb0(v0: i32):
|
|
v1 = heap_addr.i64 heap0, v0, 1
|
|
v2 = load.f32 v1+16
|
|
v3 = load.f32 v1+20
|
|
v4 = fadd v2, v3
|
|
return v4
|
|
}
|