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

@ -204,63 +204,51 @@
)
)
(if
(i32.and
(if (result i32)
(if (result i32)
(tee_local $5
(i32.and
(if (result i32)
(tee_local $5
(i32.and
(if (result i32)
(tee_local $5
(i32.gt_s
(get_local $6)
(i32.const 2146435072)
)
)
(get_local $5)
(if (result i32)
(tee_local $5
(i32.eq
(get_local $6)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $7)
(i32.const 0)
)
(get_local $5)
)
)
(i32.const 1)
)
)
(get_local $5)
(i32.gt_s
(get_local $10)
(i32.const 2146435072)
)
)
(i32.const 1)
)
)
(get_local $5)
(if (result i32)
(tee_local $5
(i32.eq
(get_local $10)
(i32.gt_s
(get_local $6)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $4)
(i32.const 0)
)
(get_local $5)
(tee_local $5
(if (result i32)
(tee_local $5
(i32.eq
(get_local $6)
(i32.const 2146435072)
)
)
(i32.ne
(get_local $7)
(i32.const 0)
)
(get_local $5)
)
)
)
(get_local $5)
(tee_local $5
(i32.gt_s
(get_local $10)
(i32.const 2146435072)
)
)
)
(i32.const 1)
(get_local $5)
(if (result i32)
(tee_local $5
(i32.eq
(get_local $10)
(i32.const 2146435072)
)
)
(get_local $4)
(get_local $5)
)
)
(return
(f64.add
@ -482,32 +470,26 @@
(get_local $7)
)
(if
(i32.and
(if (result i32)
(if (result i32)
(tee_local $5
(i32.and
(if (result i32)
(tee_local $5
(i32.eq
(get_local $6)
(i32.const 2146435072)
)
)
(get_local $5)
(i32.eqz
(get_local $6)
)
)
(i32.const 1)
(i32.eq
(get_local $6)
(i32.const 2146435072)
)
)
(get_local $5)
(i32.eq
(get_local $6)
(i32.const 1072693248)
(tee_local $5
(i32.eqz
(get_local $6)
)
)
)
(i32.const 1)
(get_local $5)
(i32.eq
(get_local $6)
(i32.const 1072693248)
)
)
(block
(if
@ -1568,34 +1550,28 @@
)
)
(if
(i32.and
(if (result i32)
(if (result i32)
(tee_local $3
(i32.and
(if (result i32)
(tee_local $3
(i32.eqz
(i32.shl
(get_local $5)
(i32.const 1)
)
)
)
(get_local $3)
(call $isNaN<f32>
(get_local $1)
)
(i32.eqz
(i32.shl
(get_local $5)
(i32.const 1)
)
(i32.const 1)
)
)
(get_local $3)
(i32.eq
(get_local $4)
(i32.const 255)
(tee_local $3
(call $isNaN<f32>
(get_local $1)
)
)
)
(i32.const 1)
(get_local $3)
(i32.eq
(get_local $4)
(i32.const 255)
)
)
(return
(f32.div
@ -1999,21 +1975,22 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 f32)
(local $7 f32)
(local $8 i32)
(local $9 f32)
(local $10 i32)
(local $11 i32)
(local $12 f32)
(local $13 f32)
(local $13 i32)
(local $14 f32)
(local $15 i32)
(local $16 f32)
(local $15 f32)
(local $16 i32)
(local $17 f32)
(block $folding-inner1
(block $folding-inner0
(set_local $5
(i32.and
(tee_local $15
(tee_local $4
(i32.reinterpret/f32
(get_local $0)
)
@ -2039,21 +2016,18 @@
)
)
(if
(i32.and
(if (result i32)
(tee_local $6
(i32.gt_s
(get_local $5)
(i32.const 2139095040)
)
)
(get_local $6)
(if (result i32)
(tee_local $13
(i32.gt_s
(get_local $10)
(get_local $5)
(i32.const 2139095040)
)
)
(i32.const 1)
(get_local $13)
(i32.gt_s
(get_local $10)
(i32.const 2139095040)
)
)
(return
(f32.add
@ -2064,7 +2038,7 @@
)
(if
(i32.lt_s
(get_local $15)
(get_local $4)
(i32.const 0)
)
(if
@ -2072,7 +2046,7 @@
(get_local $10)
(i32.const 1266679808)
)
(set_local $4
(set_local $16
(i32.const 2)
)
(if
@ -2083,12 +2057,12 @@
(if
(i32.eq
(i32.shl
(tee_local $7
(tee_local $6
(i32.shr_s
(get_local $10)
(i32.sub
(i32.const 23)
(tee_local $6
(tee_local $8
(i32.sub
(i32.shr_s
(get_local $10)
@ -2102,16 +2076,16 @@
)
(i32.sub
(i32.const 23)
(get_local $6)
(get_local $8)
)
)
(get_local $10)
)
(set_local $4
(set_local $16
(i32.sub
(i32.const 2)
(i32.and
(get_local $7)
(get_local $6)
(i32.const 1)
)
)
@ -2201,7 +2175,7 @@
)
(if
(i32.ge_s
(get_local $15)
(get_local $4)
(i32.const 0)
)
(return
@ -2217,32 +2191,26 @@
)
)
(if
(i32.and
(if (result i32)
(if (result i32)
(tee_local $6
(i32.and
(if (result i32)
(tee_local $6
(i32.eq
(get_local $5)
(i32.const 2139095040)
)
)
(get_local $6)
(i32.eqz
(get_local $5)
)
)
(i32.const 1)
(tee_local $13
(i32.eq
(get_local $5)
(i32.const 2139095040)
)
)
(get_local $6)
(i32.eq
(get_local $5)
(i32.const 1065353216)
(get_local $13)
(tee_local $13
(i32.eqz
(get_local $5)
)
)
)
(i32.const 1)
(get_local $13)
(i32.eq
(get_local $5)
(i32.const 1065353216)
)
)
(block
(if
@ -2259,7 +2227,7 @@
)
(if
(i32.lt_s
(get_local $15)
(get_local $4)
(i32.const 0)
)
(if
@ -2268,11 +2236,11 @@
(get_local $5)
(i32.const 1065353216)
)
(get_local $4)
(get_local $16)
)
(if
(i32.eq
(get_local $4)
(get_local $16)
(i32.const 1)
)
(set_local $2
@ -2305,13 +2273,13 @@
)
(if
(i32.lt_s
(get_local $15)
(get_local $4)
(i32.const 0)
)
(block
(if
(i32.eqz
(get_local $4)
(get_local $16)
)
(return
(f32.div
@ -2328,7 +2296,7 @@
)
(if
(i32.eq
(get_local $4)
(get_local $16)
(i32.const 1)
)
(set_local $9
@ -2426,18 +2394,18 @@
)
)
)
(set_local $8
(set_local $7
(f32.reinterpret/i32
(i32.and
(i32.reinterpret/f32
(f32.add
(tee_local $13
(tee_local $14
(f32.mul
(f32.const 1.44268798828125)
(get_local $3)
)
)
(tee_local $14
(tee_local $15
(f32.sub
(f32.mul
(get_local $3)
@ -2456,10 +2424,10 @@
)
)
(f32.sub
(get_local $14)
(get_local $15)
(f32.sub
(get_local $8)
(get_local $13)
(get_local $7)
(get_local $14)
)
)
)
@ -2503,7 +2471,7 @@
)
(set_local $5
(i32.or
(tee_local $7
(tee_local $6
(i32.and
(get_local $5)
(i32.const 8388607)
@ -2512,16 +2480,16 @@
(i32.const 1065353216)
)
)
(set_local $6
(set_local $8
(if (result i32)
(i32.le_s
(get_local $7)
(get_local $6)
(i32.const 1885297)
)
(i32.const 0)
(if (result i32)
(i32.lt_s
(get_local $7)
(get_local $6)
(i32.const 6140887)
)
(i32.const 1)
@ -2547,9 +2515,9 @@
(f32.reinterpret/i32
(i32.and
(i32.reinterpret/f32
(tee_local $16
(tee_local $17
(f32.mul
(tee_local $13
(tee_local $14
(f32.sub
(tee_local $2
(f32.reinterpret/i32
@ -2560,12 +2528,12 @@
(select
(f32.const 1.5)
(f32.const 1)
(get_local $6)
(get_local $8)
)
)
)
)
(tee_local $14
(tee_local $15
(f32.div
(f32.const 1)
(f32.add
@ -2585,7 +2553,7 @@
(f32.sub
(get_local $2)
(f32.sub
(tee_local $8
(tee_local $7
(f32.reinterpret/i32
(i32.add
(i32.add
@ -2602,7 +2570,7 @@
(i32.const 4194304)
)
(i32.shl
(get_local $6)
(get_local $8)
(i32.const 21)
)
)
@ -2620,8 +2588,8 @@
(f32.mul
(tee_local $12
(f32.mul
(get_local $16)
(get_local $16)
(get_local $17)
(get_local $17)
)
)
(get_local $12)
@ -2661,13 +2629,13 @@
(f32.mul
(tee_local $0
(f32.mul
(get_local $14)
(get_local $15)
(f32.sub
(f32.sub
(get_local $13)
(get_local $14)
(f32.mul
(get_local $3)
(get_local $8)
(get_local $7)
)
)
(f32.mul
@ -2679,14 +2647,14 @@
)
(f32.add
(get_local $3)
(get_local $16)
(get_local $17)
)
)
)
)
(f32.sub
(f32.sub
(tee_local $8
(tee_local $7
(f32.reinterpret/i32
(i32.and
(i32.reinterpret/f32
@ -2713,14 +2681,14 @@
)
)
)
(set_local $8
(set_local $7
(f32.reinterpret/i32
(i32.and
(i32.reinterpret/f32
(f32.add
(f32.add
(f32.add
(tee_local $16
(tee_local $17
(f32.mul
(f32.const 0.9619140625)
(tee_local $0
@ -2728,21 +2696,21 @@
(i32.and
(i32.reinterpret/f32
(f32.add
(tee_local $13
(tee_local $14
(f32.mul
(get_local $3)
(get_local $8)
(get_local $7)
)
)
(tee_local $14
(tee_local $15
(f32.add
(f32.mul
(get_local $0)
(get_local $8)
(get_local $7)
)
(f32.mul
(get_local $2)
(get_local $16)
(get_local $17)
)
)
)
@ -2763,10 +2731,10 @@
)
(f32.mul
(f32.sub
(get_local $14)
(get_local $15)
(f32.sub
(get_local $0)
(get_local $13)
(get_local $14)
)
)
(f32.const 0.9617967009544373)
@ -2775,7 +2743,7 @@
(select
(f32.const 1.5632208487659227e-06)
(f32.const 0)
(get_local $6)
(get_local $8)
)
)
)
@ -2784,7 +2752,7 @@
(select
(f32.const 0.5849609375)
(f32.const 0)
(get_local $6)
(get_local $8)
)
)
)
@ -2804,12 +2772,12 @@
(f32.sub
(f32.sub
(f32.sub
(get_local $8)
(get_local $7)
(get_local $3)
)
(get_local $0)
)
(get_local $16)
(get_local $17)
)
)
)
@ -2817,7 +2785,7 @@
)
(br_if $folding-inner1
(i32.gt_s
(tee_local $7
(tee_local $6
(i32.reinterpret/f32
(tee_local $2
(f32.add
@ -2837,7 +2805,7 @@
)
)
)
(get_local $8)
(get_local $7)
)
(f32.mul
(get_local $1)
@ -2848,7 +2816,7 @@
(tee_local $0
(f32.mul
(get_local $0)
(get_local $8)
(get_local $7)
)
)
)
@ -2860,7 +2828,7 @@
)
(if
(i32.eq
(get_local $7)
(get_local $6)
(i32.const 1124073472)
)
(br_if $folding-inner1
@ -2878,7 +2846,7 @@
(if
(i32.gt_s
(i32.and
(get_local $7)
(get_local $6)
(i32.const 2147483647)
)
(i32.const 1125515264)
@ -2886,7 +2854,7 @@
(br $folding-inner0)
(if
(i32.eq
(get_local $7)
(get_local $6)
(i32.const -1021968384)
)
(br_if $folding-inner0
@ -2901,12 +2869,12 @@
)
)
)
(set_local $6
(set_local $8
(i32.sub
(i32.shr_s
(tee_local $15
(tee_local $13
(i32.and
(get_local $7)
(get_local $6)
(i32.const 2147483647)
)
)
@ -2920,21 +2888,21 @@
)
(if
(i32.gt_s
(get_local $15)
(get_local $13)
(i32.const 1056964608)
)
(block
(set_local $6
(set_local $8
(i32.sub
(i32.shr_s
(i32.and
(tee_local $4
(i32.add
(get_local $7)
(get_local $6)
(i32.shr_s
(i32.const 8388608)
(i32.add
(get_local $6)
(get_local $8)
(i32.const 1)
)
)
@ -2954,7 +2922,7 @@
(i32.xor
(i32.shr_s
(i32.const 8388607)
(get_local $6)
(get_local $8)
)
(i32.const -1)
)
@ -2972,13 +2940,13 @@
)
(i32.sub
(i32.const 23)
(get_local $6)
(get_local $8)
)
)
)
(if
(i32.lt_s
(get_local $7)
(get_local $6)
(i32.const 0)
)
(set_local $4
@ -3003,7 +2971,7 @@
(if (result f32)
(i32.le_s
(i32.shr_s
(tee_local $7
(tee_local $6
(i32.add
(i32.reinterpret/f32
(tee_local $2
@ -3015,7 +2983,7 @@
(f32.mul
(tee_local $2
(f32.add
(tee_local $13
(tee_local $14
(f32.mul
(tee_local $3
(f32.reinterpret/i32
@ -3033,7 +3001,7 @@
(f32.const 0.693145751953125)
)
)
(tee_local $14
(tee_local $15
(f32.add
(f32.mul
(f32.sub
@ -3053,7 +3021,7 @@
)
)
)
(tee_local $8
(tee_local $7
(f32.sub
(get_local $2)
(f32.mul
@ -3093,17 +3061,17 @@
)
)
(f32.sub
(get_local $8)
(get_local $7)
(f32.const 2)
)
)
(f32.add
(tee_local $0
(f32.sub
(get_local $14)
(get_local $15)
(f32.sub
(get_local $2)
(get_local $13)
(get_local $14)
)
)
)
@ -3133,7 +3101,7 @@
(get_local $4)
)
(f32.reinterpret/i32
(get_local $7)
(get_local $6)
)
)
)
@ -3203,35 +3171,29 @@
)
)
(if
(i32.and
(if (result i32)
(if (result i32)
(tee_local $7
(i32.and
(if (result i32)
(tee_local $7
(i64.eq
(i64.shl
(get_local $5)
(i64.const 1)
)
(i64.const 0)
)
)
(get_local $7)
(call $isNaN<f64>
(get_local $1)
)
(i64.eq
(i64.shl
(get_local $5)
(i64.const 1)
)
(i32.const 1)
(i64.const 0)
)
)
(get_local $7)
(i32.eq
(get_local $3)
(i32.const 2047)
(tee_local $7
(call $isNaN<f64>
(get_local $1)
)
)
)
(i32.const 1)
(get_local $7)
(i32.eq
(get_local $3)
(i32.const 2047)
)
)
(return
(f64.div