Stream: git-wasmtime

Topic: wasmtime / issue #2964 cranelift: Merge all run tests int...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2021 at 19:29):

bjorn3 commented on issue #2964:

We need someone with access to a s390x machine to check which ones of these should be commented out.

cc @uweigand

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2021 at 12:23):

uweigand commented on issue #2964:

On s390x, we currently do not support any SIMD or i128 operations, so all the simd-* and i128-* tests need to be commented out for now.

Also, the const.clif test case exposes a pre-existing endian bug with handling bool test case return values: those are written as integers of the same width by the trampoline, but are always read out as the Rust "bool" type. This happens to work on little-endian systems, but fails for any boolean type larger than 1 byte on big-endian systems. I was able to fix this using the following patch:

diff --git a/cranelift/filetests/src/function_runner.rs b/cranelift/filetests/src/function_runner.rs
index a41d5f286..e4dcfeff4 100644
--- a/cranelift/filetests/src/function_runner.rs
+++ b/cranelift/filetests/src/function_runner.rs
@@ -251,7 +251,13 @@ impl UnboxedValues {
             ir::types::I64 => DataValue::I64(ptr::read(p as *const i64)),
             ir::types::F32 => DataValue::F32(ptr::read(p as *const Ieee32)),
             ir::types::F64 => DataValue::F64(ptr::read(p as *const Ieee64)),
-            _ if ty.is_bool() => DataValue::B(ptr::read(p as *const bool)),
+            _ if ty.is_bool() => match ty.bytes() {
+                1 => DataValue::B(ptr::read(p as *const i8) != 0),
+                2 => DataValue::B(ptr::read(p as *const i16) != 0),
+                4 => DataValue::B(ptr::read(p as *const i32) != 0),
+                8 => DataValue::B(ptr::read(p as *const i64) != 0),
+                _ => unimplemented!(),
+            }
             _ if ty.is_vector() && ty.bytes() == 16 => {
                 DataValue::V128(ptr::read(p as *const [u8; 16]))
             }

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2021 at 13:57):

afonso360 commented on issue #2964:

@uweigand Thank you for taking a look at this! I've disabled simd & i128 tests, and applied your patch.


Last updated: Nov 22 2024 at 17:03 UTC