Update internal ABI to zero/sign-extend where necessary only (#87)

This commit is contained in:
Daniel Wirtz
2018-05-06 00:00:54 +02:00
committed by GitHub
parent ce2bf00d62
commit 50f6c1c460
72 changed files with 8846 additions and 9459 deletions

View File

@ -549,63 +549,54 @@
)
)
(if
(i32.and
(if (result i32)
(tee_local $9
(i32.and
(if (result i32)
(tee_local $9
(if (result i32)
(tee_local $9
(if (result i32)
(tee_local $9
(i32.and
(if (result i32)
(tee_local $9
(i32.gt_s
(get_local $7)
(i32.const 2146435072)
)
)
(get_local $9)
(if (result i32)
(tee_local $9
(i32.eq
(get_local $7)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $4)
(i32.const 0)
)
(get_local $9)
)
)
(i32.const 1)
(i32.gt_s
(get_local $7)
(i32.const 2146435072)
)
)
(get_local $9)
(i32.gt_s
(get_local $8)
(i32.const 2146435072)
(if (result i32)
(tee_local $9
(i32.eq
(get_local $7)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $4)
(i32.const 0)
)
(get_local $9)
)
)
(i32.const 1)
)
)
(get_local $9)
(if (result i32)
(tee_local $9
(i32.eq
(get_local $8)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $6)
(i32.const 0)
)
(get_local $9)
(i32.gt_s
(get_local $8)
(i32.const 2146435072)
)
)
)
(i32.const 1)
(get_local $9)
(if (result i32)
(tee_local $9
(i32.eq
(get_local $8)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $6)
(i32.const 0)
)
(get_local $9)
)
)
(return
(f64.add
@ -845,33 +836,27 @@
(i32.const 0)
)
(if
(i32.and
(if (result i32)
(tee_local $15
(i32.and
(if (result i32)
(tee_local $15
(i32.eq
(get_local $7)
(i32.const 2146435072)
)
)
(get_local $15)
(i32.eq
(get_local $7)
(i32.const 0)
)
(if (result i32)
(tee_local $15
(if (result i32)
(tee_local $15
(i32.eq
(get_local $7)
(i32.const 2146435072)
)
(i32.const 1)
)
(get_local $15)
(i32.eq
(get_local $7)
(i32.const 0)
)
)
(get_local $15)
(i32.eq
(get_local $7)
(i32.const 1072693248)
)
)
(i32.const 1)
(get_local $15)
(i32.eq
(get_local $7)
(i32.const 1072693248)
)
)
(block
(set_local $14
@ -2135,174 +2120,156 @@
(func $std/operator-overloading/Tester.equals (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.eq
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.eq
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
(func $std/operator-overloading/Tester.notEquals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.ne
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.ne
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.ne
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
(func $std/operator-overloading/Tester.greater (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.gt_s
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.gt_s
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.gt_s
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
(func $std/operator-overloading/Tester.greaterEquals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.ge_s
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.ge_s
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.ge_s
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
(func $std/operator-overloading/Tester.less (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.lt_s
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.lt_s
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.lt_s
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
(func $std/operator-overloading/Tester.lessEquals (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(return
(i32.and
(if (result i32)
(tee_local $2
(i32.le_s
(i32.load
(get_local $0)
)
(i32.load
(get_local $1)
)
)
)
(if (result i32)
(tee_local $2
(i32.le_s
(i32.load offset=4
(i32.load
(get_local $0)
)
(i32.load offset=4
(i32.load
(get_local $1)
)
)
(get_local $2)
)
(i32.const 1)
(i32.le_s
(i32.load offset=4
(get_local $0)
)
(i32.load offset=4
(get_local $1)
)
)
(get_local $2)
)
)
)
@ -2407,25 +2374,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/a)
)
(i32.const 3)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/a)
)
(i32.const 5)
(i32.const 3)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/a)
)
(i32.const 5)
)
(get_local $0)
)
)
(block
@ -2460,25 +2424,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/s)
)
(i32.const 0)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/s)
)
(i32.const 6)
(i32.const 0)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/s)
)
(i32.const 6)
)
(get_local $0)
)
)
(block
@ -2513,25 +2474,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/m)
)
(i32.const 6)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/m)
)
(i32.const 10)
(i32.const 6)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/m)
)
(i32.const 10)
)
(get_local $0)
)
)
(block
@ -2566,25 +2524,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/d)
)
(i32.const 2)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/d)
)
(i32.const 5)
(i32.const 2)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/d)
)
(i32.const 5)
)
(get_local $0)
)
)
(block
@ -2619,25 +2574,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/f)
)
(i32.const 4)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/f)
)
(i32.const 0)
(i32.const 4)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/f)
)
(i32.const 0)
)
(get_local $0)
)
)
(block
@ -2672,25 +2624,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/p)
)
(i32.const 16)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/p)
)
(i32.const 243)
(i32.const 16)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/p)
)
(i32.const 243)
)
(get_local $0)
)
)
(block
@ -2725,25 +2674,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/n)
)
(i32.const 15)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/n)
)
(i32.const 15)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/n)
)
(i32.const 15)
)
(get_local $0)
)
)
(block
@ -2778,25 +2724,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/o)
)
(i32.const 65535)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/o)
)
(i32.const 255)
(i32.const 65535)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/o)
)
(i32.const 255)
)
(get_local $0)
)
)
(block
@ -2831,25 +2774,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $0
(i32.eq
(i32.load
(get_global $std/operator-overloading/x)
)
(i32.const 65535)
)
)
(if (result i32)
(tee_local $0
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/x)
)
(i32.const 255)
(i32.const 65535)
)
(get_local $0)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/x)
)
(i32.const 255)
)
(get_local $0)
)
)
(block
@ -3177,25 +3117,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $2
(i32.eq
(i32.load
(get_global $std/operator-overloading/ais)
)
(i32.const 3)
)
)
(if (result i32)
(tee_local $2
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/ais)
)
(i32.const 5)
(i32.const 3)
)
(get_local $2)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/ais)
)
(i32.const 5)
)
(get_local $2)
)
)
(block
@ -3255,25 +3192,22 @@
)
(if
(i32.eqz
(i32.and
(if (result i32)
(tee_local $4
(i32.eq
(i32.load
(get_global $std/operator-overloading/aii)
)
(i32.const 3)
)
)
(if (result i32)
(tee_local $4
(i32.eq
(i32.load offset=4
(i32.load
(get_global $std/operator-overloading/aii)
)
(i32.const 5)
(i32.const 3)
)
(get_local $4)
)
(i32.const 1)
(i32.eq
(i32.load offset=4
(get_global $std/operator-overloading/aii)
)
(i32.const 5)
)
(get_local $4)
)
)
(block