mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 12:11:50 +00:00
Update internal ABI to zero/sign-extend where necessary only (#87)
This commit is contained in:
@ -428,24 +428,18 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $6
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1071284858)
|
||||
)
|
||||
)
|
||||
(get_local $6)
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
(i32.const 1)
|
||||
(if (result i32)
|
||||
(tee_local $6
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1071284858)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $6)
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
@ -780,24 +774,18 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
(i32.const 1)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $4)
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
@ -868,24 +856,21 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(return
|
||||
(f64.const 0)
|
||||
@ -1246,21 +1231,18 @@
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1045430272)
|
||||
)
|
||||
)
|
||||
(i32.ge_u
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
(i32.const 1045430272)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
@ -2107,19 +2089,16 @@
|
||||
(local $9 f64)
|
||||
(nop)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(call $isNaN<f64>
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(call $isNaN<f64>
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(call $isNaN<f64>
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f64.add
|
||||
@ -2432,27 +2411,24 @@
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(i32.const 64)
|
||||
(i32.const 20)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $2
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(i32.shl
|
||||
(i32.const 64)
|
||||
(i32.const 20)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.eq
|
||||
(get_local $6)
|
||||
(i32.const 2146435072)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $2)
|
||||
(i32.eq
|
||||
(get_local $6)
|
||||
(i32.const 2146435072)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(if (result f64)
|
||||
@ -3230,21 +3206,18 @@
|
||||
)
|
||||
(nop)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $15
|
||||
(i32.lt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $15)
|
||||
(i32.gt_s
|
||||
(if (result i32)
|
||||
(tee_local $15
|
||||
(i32.lt_s
|
||||
(get_local $3)
|
||||
(i32.const 56)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $15)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 56)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $14
|
||||
@ -3974,21 +3947,18 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $7
|
||||
(i32.eq
|
||||
(get_local $5)
|
||||
(i32.const 2047)
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
(i64.eq
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
(if (result i32)
|
||||
(tee_local $7
|
||||
(i32.eq
|
||||
(get_local $5)
|
||||
(i32.const 2047)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $7)
|
||||
(i64.eq
|
||||
(get_local $3)
|
||||
(i64.const 0)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
@ -4258,24 +4228,18 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
(i32.const 1)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $4)
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
@ -4346,24 +4310,21 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(return
|
||||
(f64.const 0)
|
||||
@ -4660,24 +4621,18 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
(i32.const 1)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
(i32.const 1048576)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $4)
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
@ -4748,24 +4703,21 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(if
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $4
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
(i32.const 1072693248)
|
||||
)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $1)
|
||||
(i64.const 32)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
(return
|
||||
(f64.const 0)
|
||||
@ -5133,63 +5085,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
|
||||
@ -5429,33 +5372,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
|
||||
|
Reference in New Issue
Block a user