From 7459e5af01fbe3a8e75e73783794b4cdffda34e9 Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Fri, 5 Feb 2016 05:11:50 -0800 Subject: Fix select The ordering changed in: https://github.com/WebAssembly/spec/pull/221 Which changed the spec tests, breaking sexpr-wasm because it pulls in the spec tests. This was then fixed: https://github.com/WebAssembly/sexpr-wasm-prototype/commit/23dc368148fc7827a603e3853f5a40287eb9effe Which in turn breaks when binaryen feeds sexpr-wasm .wast files with the old select operand ordering. Note that this PR has new failures when running the torture tests in binaryen-shell: the order of evaluation is correct in binaryen-shell but isn't emitted properly by LLVM in the .s files. This will require another patch to fix LLVM. --- test/unit.wast | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/unit.wast') diff --git a/test/unit.wast b/test/unit.wast index cde4722ef..928c30157 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -311,15 +311,15 @@ (i32.const 0) ) (i32.select - (i32.lt_s - (get_local $asm2wasm_i32_temp) - (i32.const 0) - ) (i32.sub (i32.const 0) (get_local $asm2wasm_i32_temp) ) (get_local $asm2wasm_i32_temp) + (i32.lt_s + (get_local $asm2wasm_i32_temp) + (i32.const 0) + ) ) ) ) -- cgit v1.2.3