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

* cranelift: Implement `bnot` in interpreter

* cranelift: Register all functions in test file for interpreter
This commit is contained in:
Afonso Bordado
2022-08-30 00:39:50 +01:00
committed by GitHub
parent 5392d7cdd7
commit 500a9f17be
6 changed files with 139 additions and 38 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