This adds support for the IBM z/Architecture (s390x-ibm-linux). The status of the s390x backend in its current form is: - Wasmtime is fully functional and passes all tests on s390x. - All back-end features supported, with the exception of SIMD. - There is still a lot of potential for performance improvements. - Currently the only supported processor type is z15.
44 lines
795 B
Plaintext
44 lines
795 B
Plaintext
test compile
|
|
target s390x
|
|
|
|
function %f(i8, i64, i64) -> i64 {
|
|
block0(v0: i8, v1: i64, v2: i64):
|
|
v3 = iconst.i8 42
|
|
v4 = icmp eq v0, v3
|
|
v5 = select.i64 v4, v1, v2
|
|
return v5
|
|
}
|
|
|
|
; check: llcr %r2, %r2
|
|
; nextln: clfi %r2, 42
|
|
; nextln: locgre %r4, %r3
|
|
; nextln: lgr %r2, %r4
|
|
; nextln: br %r14
|
|
|
|
function %g(b1, i8, i8) -> i8 {
|
|
block0(v0: b1, v1: i8, v2: i8):
|
|
v3 = select.i8 v0, v1, v2
|
|
return v3
|
|
}
|
|
|
|
; FIXME: optimize i8/i16 compares
|
|
|
|
; check: llcr %r2, %r2
|
|
; nextln: chi %r2, 0
|
|
; nextln: locrlh %r4, %r3
|
|
; nextln: lr %r2, %r4
|
|
; nextln: br %r14
|
|
|
|
function %i(i32, i8, i8) -> i8 {
|
|
block0(v0: i32, v1: i8, v2: i8):
|
|
v3 = iconst.i32 42
|
|
v4 = icmp.i32 eq v0, v3
|
|
v5 = select.i8 v4, v1, v2
|
|
return v5
|
|
}
|
|
|
|
; check: clfi %r2, 42
|
|
; nextln: locre %r4, %r3
|
|
; nextln: lr %r2, %r4
|
|
; nextln: br %r14
|