* Cranellift: remove Baldrdash support and related features.
As noted in Mozilla's bugzilla bug 1781425 [1], the SpiderMonkey team
has recently determined that their current form of integration with
Cranelift is too hard to maintain, and they have chosen to remove it
from their codebase. If and when they decide to build updated support
for Cranelift, they will adopt different approaches to several details
of the integration.
In the meantime, after discussion with the SpiderMonkey folks, they
agree that it makes sense to remove the bits of Cranelift that exist
to support the integration ("Baldrdash"), as they will not need
them. Many of these bits are difficult-to-maintain special cases that
are not actually tested in Cranelift proper: for example, the
Baldrdash integration required Cranelift to emit function bodies
without prologues/epilogues, and instead communicate very precise
information about the expected frame size and layout, then stitched
together something post-facto. This was brittle and caused a lot of
incidental complexity ("fallthrough returns", the resulting special
logic in block-ordering); this is just one example. As another
example, one particular Baldrdash ABI variant processed stack args in
reverse order, so our ABI code had to support both traversal
orders. We had a number of other Baldrdash-specific settings as well
that did various special things.
This PR removes Baldrdash ABI support, the `fallthrough_return`
instruction, and pulls some threads to remove now-unused bits as a
result of those two, with the understanding that the SpiderMonkey folks
will build new functionality as needed in the future and we can perhaps
find cleaner abstractions to make it all work.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1781425
* Review feedback.
* Fix (?) DWARF debug tests: add `--disable-cache` to wasmtime invocations.
The debugger tests invoke `wasmtime` from within each test case under
the control of a debugger (gdb or lldb). Some of these tests started to
inexplicably fail in CI with unrelated changes, and the failures were
only inconsistently reproducible locally. It seems to be cache related:
if we disable cached compilation on the nested `wasmtime` invocations,
the tests consistently pass.
* Review feedback.
95 lines
2.0 KiB
Plaintext
95 lines
2.0 KiB
Plaintext
; Parser tests for call and return syntax.
|
|
test cat
|
|
|
|
function %mini() {
|
|
block1:
|
|
return
|
|
}
|
|
; sameln: function %mini() fast {
|
|
; nextln: block1:
|
|
; nextln: return
|
|
; nextln: }
|
|
|
|
function %r1() -> i32, f32 {
|
|
block1:
|
|
v1 = iconst.i32 3
|
|
v2 = f32const 0.0
|
|
return v1, v2
|
|
}
|
|
; sameln: function %r1() -> i32, f32
|
|
; nextln: block1:
|
|
; nextln: v1 = iconst.i32 3
|
|
; nextln: v2 = f32const 0.0
|
|
; nextln: return v1, v2
|
|
; nextln: }
|
|
|
|
function %signatures() {
|
|
sig10 = ()
|
|
sig11 = (i32, f64) -> i32, b1
|
|
fn5 = %foo sig11
|
|
fn8 = %bar(i32) -> b1
|
|
}
|
|
; sameln: function %signatures() fast {
|
|
; check: sig10 = () fast
|
|
; check: sig11 = (i32, f64) -> i32, b1
|
|
; check: sig12 = (i32) -> b1 fast
|
|
; not: fn0
|
|
; check: fn5 = %foo sig11
|
|
; check: fn8 = %bar sig12
|
|
; check: }
|
|
|
|
function %direct() {
|
|
fn0 = %none()
|
|
fn1 = %one() -> i32
|
|
fn2 = %two() -> i32, f32
|
|
|
|
block0:
|
|
call fn0()
|
|
v1 = call fn1()
|
|
v2, v3 = call fn2()
|
|
return
|
|
}
|
|
; check: call fn0()
|
|
; check: v1 = call fn1()
|
|
; check: v2, v3 = call fn2()
|
|
; check: return
|
|
|
|
function %indirect(i64) {
|
|
sig0 = (i64)
|
|
sig1 = () -> i32
|
|
sig2 = () -> i32, f32
|
|
|
|
block0(v0: i64):
|
|
v1 = call_indirect sig1, v0()
|
|
call_indirect sig0, v1(v0)
|
|
v3, v4 = call_indirect sig2, v1()
|
|
return
|
|
}
|
|
; check: v1 = call_indirect sig1, v0()
|
|
; check: call_indirect sig0, v1(v0)
|
|
; check: v3, v4 = call_indirect sig2, v1()
|
|
; check: return
|
|
|
|
function %long_call() {
|
|
sig0 = ()
|
|
fn0 = %none sig0
|
|
|
|
block0:
|
|
v0 = func_addr.i32 fn0
|
|
call_indirect sig0, v0()
|
|
return
|
|
}
|
|
; check: v0 = func_addr.i32 fn0
|
|
; check: call_indirect sig0, v0()
|
|
; check: return
|
|
|
|
; Special purpose function arguments
|
|
function %special1(i32 sret, i32 fp, i32 csr, i32 link) -> i32 link, i32 fp, i32 csr, i32 sret {
|
|
block0(v1: i32, v2: i32, v3: i32, v4: i32):
|
|
return v4, v2, v3, v1
|
|
}
|
|
; check: function %special1(i32 sret, i32 fp, i32 csr, i32 link) -> i32 link, i32 fp, i32 csr, i32 sret fast {
|
|
; check: block0(v1: i32, v2: i32, v3: i32, v4: i32):
|
|
; check: return v4, v2, v3, v1
|
|
; check: }
|