Switch signed/unsigned instructions when upcasting 32- to 64-bit integers, fixes #247

Matches C semantics now. Turns around some instructions in tests, especially libm, but doesn't break anything.
This commit is contained in:
dcodeIO
2018-09-10 14:25:33 +02:00
parent 9603c13fb7
commit 6949cf9f9e
17 changed files with 231 additions and 96 deletions

View File

@@ -224,7 +224,7 @@
(i64.const -1)
)
(set_global $unary/I
(i64.extend_s/i32
(i64.extend_u/i32
(i64.eqz
(i64.const 1)
)
@@ -246,7 +246,7 @@
)
)
(set_global $unary/I
(i64.extend_s/i32
(i64.extend_u/i32
(i64.eqz
(get_global $unary/I)
)
@@ -467,7 +467,7 @@
(f64.const -1.25)
)
(set_global $unary/I
(i64.extend_s/i32
(i64.extend_u/i32
(f64.eq
(f64.const 1.25)
(f64.const 0)
@@ -483,7 +483,7 @@
)
)
(set_global $unary/I
(i64.extend_s/i32
(i64.extend_u/i32
(f64.eq
(get_global $unary/F)
(f64.const 0)