cranelift: Register all functions in test file for interpreter (#4817)

* cranelift: Implement `bnot` in interpreter

* cranelift: Register all functions in test file for interpreter

* cranelift: Relax signature checking for bools and vectors
This commit is contained in:
Afonso Bordado
2022-08-30 23:45:21 +01:00
committed by GitHub
parent da0d8781b5
commit 3ce3eeb668
7 changed files with 150 additions and 39 deletions

View File

@@ -0,0 +1,45 @@
test interpret
test run
target x86_64
target aarch64
target s390x
function %bnot_b1(b1) -> b1 {
block0(v0: b1):
v1 = bnot.b1 v0
return v1
}
; run: %bnot_b1(false) == true
; run: %bnot_b1(true) == false
function %bnot_b8(b8) -> b8 {
block0(v0: b8):
v1 = bnot.b8 v0
return v1
}
; run: %bnot_b8(false) == true
; run: %bnot_b8(true) == false
function %bnot_b16(b16) -> b16 {
block0(v0: b16):
v1 = bnot.b16 v0
return v1
}
; run: %bnot_b16(false) == true
; run: %bnot_b16(true) == false
function %bnot_b32(b32) -> b32 {
block0(v0: b32):
v1 = bnot.b32 v0
return v1
}
; run: %bnot_b32(false) == true
; run: %bnot_b32(true) == false
function %bnot_b64(b64) -> b64 {
block0(v0: b64):
v1 = bnot.b64 v0
return v1
}
; run: %bnot_b64(false) == true
; run: %bnot_b64(true) == false

View File

@@ -1,3 +1,4 @@
test interpret
test run
target x86_64
target aarch64

View File

@@ -0,0 +1,11 @@
test interpret
test run
target s390x
function %bnot_b128(b128) -> b128 {
block0(v0: b128):
v1 = bnot.b128 v0
return v1
}
; run: %bnot_b128(false) == true
; run: %bnot_b128(true) == false

View File

@@ -1,3 +1,4 @@
test interpret
test run
set enable_llvm_abi_extensions=true
target x86_64