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.
37 lines
645 B
Plaintext
37 lines
645 B
Plaintext
test regalloc
|
|
set is_64bit
|
|
isa x86 haswell
|
|
|
|
function %value_aliases(i32, f32, i64 vmctx) baldrdash {
|
|
gv0 = vmctx
|
|
heap0 = static gv0, min 0x0001_0000, bound 0x0001_0000_0000, guard 0x8000_0000
|
|
|
|
ebb0(v0: i32, v1: f32, v2: i64):
|
|
v3 = iconst.i32 0
|
|
jump ebb3(v3)
|
|
|
|
ebb3(v4: i32):
|
|
v5 = heap_addr.i64 heap0, v4, 1
|
|
v6 = load.f32 v5
|
|
v7 -> v1
|
|
v8 = fdiv v6, v7
|
|
v9 = heap_addr.i64 heap0, v4, 1
|
|
store v8, v9
|
|
v10 = iconst.i32 4
|
|
v11 = iadd v4, v10
|
|
v12 -> v0
|
|
v13 = icmp ult v11, v12
|
|
v14 = bint.i32 v13
|
|
brnz v14, ebb3(v11)
|
|
jump ebb4
|
|
|
|
ebb4:
|
|
jump ebb2
|
|
|
|
ebb2:
|
|
jump ebb1
|
|
|
|
ebb1:
|
|
return
|
|
}
|