mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 03:01:55 +00:00
Update internal ABI to zero/sign-extend where necessary only (#87)
This commit is contained in:
@ -60,35 +60,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
|
||||
@ -425,33 +419,30 @@
|
||||
)
|
||||
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
|
||||
(local $3 i32)
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $~lib/math/NativeMath.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $~lib/math/NativeMath.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $3)
|
||||
(call $std/mod/check<f64>
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $3)
|
||||
(call $std/mod/check<f64>
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
|
||||
@ -495,34 +486,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
|
||||
|
Reference in New Issue
Block a user