Proper isNaN/isFinite without a temp. local

This commit is contained in:
dcodeIO 2018-04-12 20:40:00 +02:00
parent 1cea3c6f08
commit 748e811137
19 changed files with 3181 additions and 3052 deletions

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -184,18 +184,26 @@ export function compileCall(
switch (compiler.currentType.kind) {
case TypeKind.F32: {
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f32);
ret = module.createBinary(BinaryOp.NeF32,
module.createTeeLocal(tempLocal.index, arg0),
module.createGetLocal(tempLocal.index, NativeType.F32)
ret = module.createBinary(
BinaryOp.GtU32,
module.createBinary(
BinaryOp.AndI32,
module.createUnary(UnaryOp.ReinterpretF32, arg0),
module.createI32(0x7FFFFFFF)
),
module.createI32(0x7F800000)
);
break;
}
case TypeKind.F64: {
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f64);
ret = module.createBinary(BinaryOp.NeF64,
module.createTeeLocal(tempLocal.index, arg0),
module.createGetLocal(tempLocal.index, NativeType.F64)
ret = module.createBinary(
BinaryOp.GtU64,
module.createBinary(
BinaryOp.AndI64,
module.createUnary(UnaryOp.ReinterpretF64, arg0),
module.createI64(0xFFFFFFFF, 0x7FFFFFFF)
),
module.createI64(0, 0x7FF00000)
);
break;
}
@ -244,36 +252,26 @@ export function compileCall(
}
switch (compiler.currentType.kind) {
case TypeKind.F32: {
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f32);
ret = module.createSelect(
module.createBinary(BinaryOp.NeF32,
module.createUnary(UnaryOp.AbsF32,
module.createTeeLocal(tempLocal.index, arg0)
ret = module.createBinary(
BinaryOp.LtU32,
module.createBinary(
BinaryOp.AndI32,
module.createUnary(UnaryOp.ReinterpretF32, arg0),
module.createI32(0x7FFFFFFF)
),
module.createF32(Infinity)
),
module.createI32(0),
module.createBinary(BinaryOp.EqF32,
module.createGetLocal(tempLocal.index, NativeType.F32),
module.createGetLocal(tempLocal.index, NativeType.F32)
)
module.createI32(0x7F800000)
);
break;
}
case TypeKind.F64: {
let tempLocal = compiler.currentFunction.getAndFreeTempLocal(Type.f64);
ret = module.createSelect(
module.createBinary(BinaryOp.NeF64,
module.createUnary(UnaryOp.AbsF64,
module.createTeeLocal(tempLocal.index, arg0)
ret = module.createBinary(
BinaryOp.LtU64,
module.createBinary(
BinaryOp.AndI64,
module.createUnary(UnaryOp.ReinterpretF64, arg0),
module.createI64(0xFFFFFFFF, 0x7FFFFFFF)
),
module.createF64(Infinity)
),
module.createI32(0),
module.createBinary(BinaryOp.EqF64,
module.createGetLocal(tempLocal.index, NativeType.F64),
module.createGetLocal(tempLocal.index, NativeType.F64)
)
module.createI64(0, 0x7FF00000)
);
break;
}

View File

@ -2686,7 +2686,7 @@ export class FunctionPrototype extends Element {
var resolvedTypeArguments: Type[] | null = null;
if (this.is(CommonFlags.GENERIC)) {
assert(typeArgumentNodes != null && typeArgumentNodes.length != 0);
resolvedTypeArguments = this.program.resolveTypeArguments(
resolvedTypeArguments = this.program.resolveTypeArguments( // reports
assert(this.declaration.typeParameters),
typeArgumentNodes,
contextualTypeArguments,

View File

@ -1531,8 +1531,7 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $8 i32)
(local $7 i32)
(block $folding-inner0
(set_local $4
(i32.and
@ -1575,11 +1574,14 @@
)
)
(get_local $3)
(f32.ne
(tee_local $7
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -1635,7 +1637,7 @@
)
)
)
(set_local $8
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
@ -1867,7 +1869,7 @@
)
)
)
(get_local $8)
(get_local $7)
)
)
)
@ -3161,7 +3163,6 @@
(local $5 i64)
(local $6 i32)
(local $7 i32)
(local $8 f64)
(block $folding-inner0
(set_local $3
(i32.wrap/i64
@ -3209,11 +3210,14 @@
)
)
(get_local $7)
(f64.ne
(tee_local $8
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $8)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)

View File

@ -1721,9 +1721,8 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(set_local $2
(i32.reinterpret/f32
(get_local $0)
@ -1761,10 +1760,10 @@
(if
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.eq
(i32.shl
(get_local $3)
@ -1773,18 +1772,21 @@
(i32.const 0)
)
)
(get_local $8)
(f32.ne
(tee_local $7
(get_local $7)
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
)
)
(get_local $8)
(get_local $7)
(i32.eq
(get_local $4)
(i32.const 255)
@ -1847,7 +1849,7 @@
)
(block
(block $break|0
(set_local $9
(set_local $8
(i32.shl
(get_local $2)
(i32.const 9)
@ -1857,7 +1859,7 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
@ -1868,9 +1870,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i32.shl
(get_local $9)
(get_local $8)
(i32.const 1)
)
)
@ -1919,7 +1921,7 @@
)
(block
(block $break|1
(set_local $9
(set_local $8
(i32.shl
(get_local $3)
(i32.const 9)
@ -1929,7 +1931,7 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
@ -1940,9 +1942,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i32.shl
(get_local $9)
(get_local $8)
(i32.const 1)
)
)
@ -1995,7 +1997,7 @@
)
(block
(block
(set_local $9
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
@ -2004,14 +2006,14 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $9)
(get_local $8)
)
(return
(f32.mul
@ -2021,7 +2023,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -2043,7 +2045,7 @@
)
)
)
(set_local $9
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
@ -2052,14 +2054,14 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $9)
(get_local $8)
)
(return
(f32.mul
@ -2069,7 +2071,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -3607,9 +3609,8 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f64)
(local $8 i32)
(local $9 i64)
(local $7 i32)
(local $8 i64)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -3653,10 +3654,10 @@
(if
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i64.eq
(i64.shl
(get_local $3)
@ -3665,18 +3666,21 @@
(i64.const 0)
)
)
(get_local $8)
(f64.ne
(tee_local $7
(get_local $7)
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $7)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
)
)
(get_local $8)
(get_local $7)
(i32.eq
(get_local $4)
(i32.const 2047)
@ -3739,7 +3743,7 @@
)
(block
(block $break|0
(set_local $9
(set_local $8
(i64.shl
(get_local $2)
(i64.const 12)
@ -3749,7 +3753,7 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
@ -3760,9 +3764,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i64.shl
(get_local $9)
(get_local $8)
(i64.const 1)
)
)
@ -3813,7 +3817,7 @@
)
(block
(block $break|1
(set_local $9
(set_local $8
(i64.shl
(get_local $3)
(i64.const 12)
@ -3823,7 +3827,7 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
@ -3834,9 +3838,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i64.shl
(get_local $9)
(get_local $8)
(i64.const 1)
)
)
@ -3891,7 +3895,7 @@
)
(block
(block
(set_local $9
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
@ -3900,14 +3904,14 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $9)
(get_local $8)
)
(return
(f64.mul
@ -3917,7 +3921,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -3939,7 +3943,7 @@
)
)
)
(set_local $9
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
@ -3948,14 +3952,14 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $9)
(get_local $8)
)
(return
(f64.mul
@ -3965,7 +3969,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)

View File

@ -20,23 +20,21 @@
(nop)
)
(func $start (; 2 ;) (type $v)
(local $0 f32)
(local $1 f64)
(local $2 i32)
(local $3 i32)
(local $4 i64)
(local $5 i64)
(local $0 i32)
(local $1 i32)
(local $2 i64)
(local $3 i64)
(drop
(select
(tee_local $2
(tee_local $0
(i32.const 1)
)
(tee_local $3
(tee_local $1
(i32.const 2)
)
(i32.gt_s
(get_local $2)
(get_local $3)
(get_local $0)
(get_local $1)
)
)
)
@ -57,15 +55,15 @@
)
(set_global $builtins/i
(select
(tee_local $2
(tee_local $0
(i32.const -42)
)
(i32.sub
(i32.const 0)
(get_local $2)
(get_local $0)
)
(i32.gt_s
(get_local $2)
(get_local $0)
(i32.const 0)
)
)
@ -87,13 +85,13 @@
)
(set_global $builtins/i
(select
(tee_local $2
(tee_local $0
(i32.const 1)
)
(i32.const 2)
(i32.gt_s
(get_local $2)
(get_local $3)
(get_local $0)
(get_local $1)
)
)
)
@ -117,8 +115,8 @@
(i32.const 1)
(i32.const 2)
(i32.lt_s
(get_local $2)
(get_local $3)
(get_local $0)
(get_local $1)
)
)
)
@ -154,15 +152,15 @@
)
(set_global $builtins/I
(select
(tee_local $4
(tee_local $2
(i64.const -42)
)
(i64.sub
(i64.const 0)
(get_local $4)
(get_local $2)
)
(i64.gt_s
(get_local $4)
(get_local $2)
(i64.const 0)
)
)
@ -184,15 +182,15 @@
)
(set_global $builtins/I
(select
(tee_local $4
(tee_local $2
(i64.const 1)
)
(tee_local $5
(tee_local $3
(i64.const 2)
)
(i64.gt_s
(get_local $4)
(get_local $5)
(get_local $2)
(get_local $3)
)
)
)
@ -216,8 +214,8 @@
(i64.const 1)
(i64.const 2)
(i64.lt_s
(get_local $4)
(get_local $5)
(get_local $2)
(get_local $3)
)
)
)
@ -270,27 +268,10 @@
(f32.const 1)
)
(set_global $builtins/b
(f32.ne
(tee_local $0
(f32.const 1.25)
)
(get_local $0)
)
(i32.const 0)
)
(set_global $builtins/b
(select
(f32.ne
(f32.abs
(f32.const 1.25)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $0)
(get_local $0)
)
)
(i32.const 1)
)
(set_global $builtins/F
(f64.const nan:0x8000000000000)
@ -326,27 +307,10 @@
(f64.const 1)
)
(set_global $builtins/b
(f64.ne
(tee_local $1
(f64.const 1.25)
)
(get_local $1)
)
(i32.const 0)
)
(set_global $builtins/b
(select
(f64.ne
(f64.abs
(f64.const 1.25)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $1)
(get_local $1)
)
)
(i32.const 1)
)
(set_global $builtins/i
(i32.load
@ -646,199 +610,5 @@
)
(unreachable)
)
(if
(f32.eq
(tee_local $0
(f32.const nan:0x400000)
)
(get_local $0)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 253)
(i32.const 0)
)
(unreachable)
)
)
(if
(f64.eq
(tee_local $1
(f64.const nan:0x8000000000000)
)
(get_local $1)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 254)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f32.ne
(f32.abs
(tee_local $0
(f32.const nan:0x400000)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $0)
(get_local $0)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 255)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f32.ne
(f32.abs
(tee_local $0
(f32.const inf)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $0)
(get_local $0)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 256)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f64.ne
(f64.abs
(tee_local $1
(f64.const nan:0x8000000000000)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $1)
(get_local $1)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 257)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f64.ne
(f64.abs
(tee_local $1
(f64.const inf)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $1)
(get_local $1)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 258)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(select
(f32.ne
(f32.abs
(tee_local $0
(f32.const 0)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $0)
(get_local $0)
)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 259)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(select
(f64.ne
(f64.abs
(tee_local $1
(f64.const 0)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $1)
(get_local $1)
)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 260)
(i32.const 0)
)
(unreachable)
)
)
)
)

View File

@ -77,8 +77,12 @@ min<f32>(1.25, 2.5);
nearest<f32>(1.25);
sqrt<f32>(1.25);
trunc<f32>(1.25);
isNaN<f32>(1.25);
isFinite<f32>(1.25);
assert(isNaN<f32>(1.25) == false);
assert(isNaN<f32>(NaN) == true);
assert(isFinite<f32>(1.25) == true);
assert(isFinite<f32>(Infinity) == false);
assert(isFinite<f32>(-Infinity) == false);
assert(isFinite<f32>(NaN) == false);
f = NaN;
f = Infinity;
@ -109,8 +113,12 @@ min<f64>(1.25, 2.5);
nearest<f64>(1.25);
sqrt<f64>(1.25);
trunc<f64>(1.25);
isNaN<f64>(1.25);
isFinite<f64>(1.25);
assert(isNaN<f64>(1.25) == false);
assert(isNaN<f64>(NaN) == true);
assert(isFinite<f64>(1.25) == true);
assert(isFinite<f64>(Infinity) == false);
assert(isFinite<f64>(-Infinity) == false);
assert(isFinite<f64>(NaN) == false);
F = NaN;
F = Infinity;

File diff suppressed because it is too large Load Diff

View File

@ -1580,8 +1580,7 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $8 i32)
(local $7 i32)
(block $folding-inner0
(set_local $4
(i32.and
@ -1624,11 +1623,14 @@
)
)
(get_local $3)
(f32.ne
(tee_local $7
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -1684,7 +1686,7 @@
)
)
)
(set_local $8
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
@ -1916,7 +1918,7 @@
)
)
)
(get_local $8)
(get_local $7)
)
)
)
@ -3210,7 +3212,6 @@
(local $5 i64)
(local $6 i32)
(local $7 i32)
(local $8 f64)
(block $folding-inner0
(set_local $3
(i32.wrap/i64
@ -3258,11 +3259,14 @@
)
)
(get_local $7)
(f64.ne
(tee_local $8
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $8)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -5194,11 +5198,11 @@
)
)
(func $start (; 15 ;) (type $v)
(local $0 f64)
(local $1 f32)
(local $0 i32)
(local $1 i64)
(local $2 i32)
(local $3 i64)
(local $4 i32)
(local $3 f64)
(local $4 f32)
(local $5 i64)
(set_global $unary/i
(i32.add
@ -5279,26 +5283,26 @@
(block (result i32)
(set_global $unary/i
(i32.add
(tee_local $2
(tee_local $0
(get_global $unary/i)
)
(i32.const 1)
)
)
(get_local $2)
(get_local $0)
)
)
(set_global $unary/i
(block (result i32)
(set_global $unary/i
(i32.sub
(tee_local $2
(tee_local $0
(get_global $unary/i)
)
(i32.const 1)
)
)
(get_local $2)
(get_local $0)
)
)
(set_global $unary/I
@ -5382,26 +5386,26 @@
(block (result i64)
(set_global $unary/I
(i64.add
(tee_local $3
(tee_local $1
(get_global $unary/I)
)
(i64.const 1)
)
)
(get_local $3)
(get_local $1)
)
)
(set_global $unary/I
(block (result i64)
(set_global $unary/I
(i64.sub
(tee_local $3
(tee_local $1
(get_global $unary/I)
)
(i64.const 1)
)
)
(get_local $3)
(get_local $1)
)
)
(set_global $unary/f
@ -5474,26 +5478,26 @@
(block (result f32)
(set_global $unary/f
(f32.add
(tee_local $1
(tee_local $4
(get_global $unary/f)
)
(f32.const 1)
)
)
(get_local $1)
(get_local $4)
)
)
(set_global $unary/f
(block (result f32)
(set_global $unary/f
(f32.sub
(tee_local $1
(tee_local $4
(get_global $unary/f)
)
(f32.const 1)
)
)
(get_local $1)
(get_local $4)
)
)
(set_global $unary/F
@ -5568,26 +5572,26 @@
(block (result f64)
(set_global $unary/F
(f64.add
(tee_local $0
(tee_local $3
(get_global $unary/F)
)
(f64.const 1)
)
)
(get_local $0)
(get_local $3)
)
)
(set_global $unary/F
(block (result f64)
(set_global $unary/F
(f64.sub
(tee_local $0
(tee_local $3
(get_global $unary/F)
)
(f64.const 1)
)
)
(get_local $0)
(get_local $3)
)
)
(drop
@ -6192,7 +6196,7 @@
)
(if
(i32.eqz
(tee_local $2
(tee_local $0
(i32.const 2)
)
)
@ -6200,7 +6204,7 @@
)
(if
(f64.eq
(tee_local $0
(tee_local $3
(f64.const 2)
)
(f64.const 0)
@ -6353,15 +6357,15 @@
)
(drop
(select
(tee_local $2
(tee_local $0
(i32.const 1)
)
(tee_local $4
(tee_local $2
(i32.const 2)
)
(i32.gt_s
(get_local $0)
(get_local $2)
(get_local $4)
)
)
)
@ -6382,15 +6386,15 @@
)
(set_global $builtins/i
(select
(tee_local $2
(tee_local $0
(i32.const -42)
)
(i32.sub
(i32.const 0)
(get_local $2)
(get_local $0)
)
(i32.gt_s
(get_local $2)
(get_local $0)
(i32.const 0)
)
)
@ -6412,13 +6416,13 @@
)
(set_global $builtins/i
(select
(tee_local $2
(tee_local $0
(i32.const 1)
)
(i32.const 2)
(i32.gt_s
(get_local $0)
(get_local $2)
(get_local $4)
)
)
)
@ -6442,8 +6446,8 @@
(i32.const 1)
(i32.const 2)
(i32.lt_s
(get_local $0)
(get_local $2)
(get_local $4)
)
)
)
@ -6479,15 +6483,15 @@
)
(set_global $builtins/I
(select
(tee_local $3
(tee_local $1
(i64.const -42)
)
(i64.sub
(i64.const 0)
(get_local $3)
(get_local $1)
)
(i64.gt_s
(get_local $3)
(get_local $1)
(i64.const 0)
)
)
@ -6509,14 +6513,14 @@
)
(set_global $builtins/I
(select
(tee_local $3
(tee_local $1
(i64.const 1)
)
(tee_local $5
(i64.const 2)
)
(i64.gt_s
(get_local $3)
(get_local $1)
(get_local $5)
)
)
@ -6541,7 +6545,7 @@
(i64.const 1)
(i64.const 2)
(i64.lt_s
(get_local $3)
(get_local $1)
(get_local $5)
)
)
@ -6595,27 +6599,10 @@
(f32.const 1)
)
(set_global $builtins/b
(f32.ne
(tee_local $1
(f32.const 1.25)
)
(get_local $1)
)
(i32.const 0)
)
(set_global $builtins/b
(select
(f32.ne
(f32.abs
(f32.const 1.25)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $1)
(get_local $1)
)
)
(i32.const 1)
)
(set_global $builtins/F
(f64.const nan:0x8000000000000)
@ -6651,27 +6638,10 @@
(f64.const 1)
)
(set_global $builtins/b
(f64.ne
(tee_local $0
(f64.const 1.25)
)
(get_local $0)
)
(i32.const 0)
)
(set_global $builtins/b
(select
(f64.ne
(f64.abs
(f64.const 1.25)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $0)
(get_local $0)
)
)
(i32.const 1)
)
(set_global $builtins/i
(i32.load
@ -6971,200 +6941,6 @@
)
(unreachable)
)
(if
(f32.eq
(tee_local $1
(f32.const nan:0x400000)
)
(get_local $1)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 253)
(i32.const 0)
)
(unreachable)
)
)
(if
(f64.eq
(tee_local $0
(f64.const nan:0x8000000000000)
)
(get_local $0)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 254)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f32.ne
(f32.abs
(tee_local $1
(f32.const nan:0x400000)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $1)
(get_local $1)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 255)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f32.ne
(f32.abs
(tee_local $1
(f32.const inf)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $1)
(get_local $1)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 256)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f64.ne
(f64.abs
(tee_local $0
(f64.const nan:0x8000000000000)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $0)
(get_local $0)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 257)
(i32.const 0)
)
(unreachable)
)
)
(if
(select
(f64.ne
(f64.abs
(tee_local $0
(f64.const inf)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $0)
(get_local $0)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 258)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(select
(f32.ne
(f32.abs
(tee_local $1
(f32.const 0)
)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $1)
(get_local $1)
)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 259)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.eqz
(select
(f64.ne
(f64.abs
(tee_local $0
(f64.const 0)
)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $0)
(get_local $0)
)
)
)
(block
(call $abort
(i32.const 0)
(i32.const 28)
(i32.const 260)
(i32.const 0)
)
(unreachable)
)
)
(if
(i32.ne
(call $showcase/ANamespace.aNamespacedFunction

File diff suppressed because it is too large Load Diff

View File

@ -1338,11 +1338,14 @@
)
(block
(if
(f64.ne
(tee_local $1
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $1)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -1778,27 +1781,32 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 f64)
(local $7 i64)
(local $8 i32)
(local $6 i64)
(local $7 i32)
(block $folding-inner0
(if
(i32.and
(if (result i32)
(tee_local $2
(f64.ne
(tee_local $6
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $6)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(get_local $2)
(f64.ne
(tee_local $6
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $6)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -1813,7 +1821,7 @@
(set_local $3
(i32.wrap/i64
(i64.shr_u
(tee_local $7
(tee_local $6
(i64.reinterpret/f64
(get_local $1)
)
@ -1822,15 +1830,15 @@
)
)
)
(set_local $8
(set_local $7
(i32.wrap/i64
(get_local $7)
(get_local $6)
)
)
(set_local $4
(i32.wrap/i64
(i64.shr_u
(tee_local $7
(tee_local $6
(i64.reinterpret/f64
(get_local $0)
)
@ -1846,7 +1854,7 @@
(get_local $3)
(i32.const 1072693248)
)
(get_local $8)
(get_local $7)
)
)
(return
@ -1886,7 +1894,7 @@
)
)
(i32.wrap/i64
(get_local $7)
(get_local $6)
)
)
)
@ -1940,7 +1948,7 @@
(i32.eqz
(i32.or
(get_local $3)
(get_local $8)
(get_local $7)
)
)
)
@ -2335,16 +2343,16 @@
(local $1 f64)
(local $2 i32)
(local $3 f64)
(local $4 f64)
(local $5 i32)
(local $6 i64)
(local $7 i32)
(local $4 i32)
(local $5 i64)
(local $6 i32)
(local $7 f64)
(local $8 f64)
(set_local $7
(set_local $4
(i32.wrap/i64
(i64.and
(i64.shr_u
(tee_local $6
(tee_local $5
(i64.reinterpret/f64
(get_local $0)
)
@ -2355,33 +2363,36 @@
)
)
)
(set_local $5
(set_local $6
(i32.wrap/i64
(i64.shr_u
(get_local $6)
(get_local $5)
(i64.const 63)
)
)
)
(if
(i32.ge_u
(get_local $7)
(get_local $4)
(i32.const 1078159482)
)
(block
(if
(f64.ne
(tee_local $3
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $3)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
)
)
(if
(get_local $5)
(get_local $6)
(return
(f64.const -1)
)
@ -2402,18 +2413,18 @@
)
(if
(i32.gt_u
(get_local $7)
(get_local $4)
(i32.const 1071001154)
)
(block
(if
(i32.lt_u
(get_local $7)
(get_local $4)
(i32.const 1072734898)
)
(set_local $3
(set_local $0
(if (result f64)
(get_local $5)
(get_local $6)
(block (result f64)
(set_local $1
(f64.const -1.9082149292705877e-10)
@ -2441,7 +2452,7 @@
)
)
(block
(set_local $3
(set_local $0
(f64.sub
(get_local $0)
(f64.mul
@ -2457,7 +2468,7 @@
(select
(f64.const -0.5)
(f64.const 0.5)
(get_local $5)
(get_local $6)
)
)
)
@ -2476,13 +2487,13 @@
)
)
)
(set_local $8
(set_local $7
(f64.sub
(f64.sub
(get_local $3)
(get_local $0)
(tee_local $0
(f64.sub
(get_local $3)
(get_local $0)
(get_local $1)
)
)
@ -2493,7 +2504,7 @@
)
(if
(i32.lt_u
(get_local $7)
(get_local $4)
(i32.const 1016070144)
)
(return
@ -2505,11 +2516,11 @@
(f64.sub
(f64.const 3)
(f64.mul
(tee_local $3
(tee_local $8
(f64.add
(f64.const 1)
(f64.mul
(tee_local $4
(tee_local $3
(f64.mul
(get_local $0)
(tee_local $1
@ -2523,19 +2534,19 @@
(f64.add
(f64.const -0.03333333333333313)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const 1.5873015872548146e-03)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const -7.93650757867488e-05)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const 4.008217827329362e-06)
(f64.mul
(get_local $4)
(get_local $3)
(f64.const -2.0109921818362437e-07)
)
)
@ -2554,10 +2565,10 @@
)
(set_local $1
(f64.mul
(get_local $4)
(get_local $3)
(f64.div
(f64.sub
(get_local $3)
(get_local $8)
(get_local $1)
)
(f64.sub
@ -2582,7 +2593,7 @@
(get_local $0)
(get_local $1)
)
(get_local $4)
(get_local $3)
)
)
)
@ -2594,12 +2605,12 @@
(get_local $0)
(f64.sub
(get_local $1)
(get_local $8)
(get_local $7)
)
)
(get_local $8)
(get_local $7)
)
(get_local $4)
(get_local $3)
)
)
(if
@ -2674,13 +2685,13 @@
(if
(i32.and
(if (result i32)
(tee_local $5
(tee_local $4
(i32.lt_s
(get_local $2)
(i32.const 0)
)
)
(get_local $5)
(get_local $4)
(i32.gt_s
(get_local $2)
(i32.const 56)
@ -2724,7 +2735,7 @@
)
)
)
(set_local $6
(set_local $5
(i64.shl
(i64.sub
(i64.const 1023)
@ -2746,7 +2757,7 @@
(f64.sub
(f64.const 1)
(f64.reinterpret/i64
(get_local $6)
(get_local $5)
)
)
)
@ -2759,7 +2770,7 @@
(f64.add
(get_local $1)
(f64.reinterpret/i64
(get_local $6)
(get_local $5)
)
)
)
@ -2890,11 +2901,11 @@
)
(func $~lib/math/NativeMath.exp (; 26 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32)
(local $2 f64)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $4 f64)
(local $5 f64)
(set_local $4
(set_local $3
(i32.shr_u
(tee_local $1
(i32.wrap/i64
@ -2921,11 +2932,14 @@
)
(block
(if
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -2961,12 +2975,12 @@
)
(set_local $0
(f64.sub
(tee_local $2
(tee_local $5
(f64.sub
(get_local $0)
(f64.mul
(f64.convert_s/i32
(tee_local $3
(tee_local $2
(if (result i32)
(i32.ge_u
(get_local $1)
@ -2987,9 +3001,9 @@
(i32.sub
(i32.sub
(i32.const 1)
(get_local $4)
(get_local $3)
)
(get_local $4)
(get_local $3)
)
)
)
@ -2998,10 +3012,10 @@
)
)
)
(tee_local $5
(tee_local $4
(f64.mul
(f64.convert_s/i32
(get_local $3)
(get_local $2)
)
(f64.const 1.9082149292705877e-10)
)
@ -3013,7 +3027,7 @@
(get_local $1)
(i32.const 1043333120)
)
(set_local $2
(set_local $5
(get_local $0)
)
(return
@ -3076,15 +3090,15 @@
(get_local $0)
)
)
(get_local $5)
(get_local $4)
)
(get_local $2)
(get_local $5)
)
)
)
(if
(i32.eqz
(get_local $3)
(get_local $2)
)
(return
(get_local $0)
@ -3092,7 +3106,7 @@
)
(call $~lib/math/NativeMath.scalbn
(get_local $0)
(get_local $3)
(get_local $2)
)
)
(func $~lib/math/expo2 (; 27 ;) (type $FF) (param $0 f64) (result f64)

View File

@ -1557,12 +1557,11 @@
(local $1 i32)
(local $2 i32)
(local $3 f64)
(local $4 f64)
(local $5 i32)
(local $4 i32)
(local $5 f64)
(local $6 f64)
(local $7 f64)
(local $8 f64)
(local $9 i32)
(local $8 i32)
(nop)
(set_local $1
(i32.wrap/i64
@ -1594,11 +1593,14 @@
)
(block
(if
(f64.ne
(tee_local $4
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $4)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -1639,7 +1641,7 @@
(get_local $0)
)
)
(set_local $5
(set_local $4
(i32.const -1)
)
)
@ -1660,7 +1662,7 @@
(i32.const 1072037888)
)
(block
(set_local $5
(set_local $4
(i32.const 0)
)
(set_local $0
@ -1680,7 +1682,7 @@
)
)
(block
(set_local $5
(set_local $4
(i32.const 1)
)
(set_local $0
@ -1703,7 +1705,7 @@
(i32.const 1073971200)
)
(block
(set_local $5
(set_local $4
(i32.const 2)
)
(set_local $0
@ -1723,7 +1725,7 @@
)
)
(block
(set_local $5
(set_local $4
(i32.const 3)
)
(set_local $0
@ -1743,35 +1745,35 @@
(get_local $0)
)
)
(set_local $6
(set_local $5
(f64.mul
(get_local $3)
(get_local $3)
)
)
(set_local $7
(set_local $6
(f64.mul
(get_local $3)
(f64.add
(f64.const 0.3333333333333293)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const 0.14285714272503466)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const 0.09090887133436507)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const 0.06661073137387531)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const 0.049768779946159324)
(f64.mul
(get_local $6)
(get_local $5)
(f64.const 0.016285820115365782)
)
)
@ -1785,25 +1787,25 @@
)
)
)
(set_local $8
(set_local $7
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const -0.19999999999876483)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const -0.11111110405462356)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const -0.0769187620504483)
(f64.mul
(get_local $6)
(get_local $5)
(f64.add
(f64.const -0.058335701337905735)
(f64.mul
(get_local $6)
(get_local $5)
(f64.const -0.036531572744216916)
)
)
@ -1817,7 +1819,7 @@
)
(if
(i32.lt_s
(get_local $5)
(get_local $4)
(i32.const 0)
)
(return
@ -1826,8 +1828,8 @@
(f64.mul
(get_local $0)
(f64.add
(get_local $6)
(get_local $7)
(get_local $8)
)
)
)
@ -1839,30 +1841,30 @@
(block $case2|0
(block $case1|0
(block $case0|0
(set_local $9
(get_local $5)
(set_local $8
(get_local $4)
)
(br_if $case0|0
(i32.eq
(get_local $9)
(get_local $8)
(i32.const 0)
)
)
(br_if $case1|0
(i32.eq
(get_local $9)
(get_local $8)
(i32.const 1)
)
)
(br_if $case2|0
(i32.eq
(get_local $9)
(get_local $8)
(i32.const 2)
)
)
(br_if $case3|0
(i32.eq
(get_local $9)
(get_local $8)
(i32.const 3)
)
)
@ -1877,8 +1879,8 @@
(f64.mul
(get_local $0)
(f64.add
(get_local $6)
(get_local $7)
(get_local $8)
)
)
(f64.const 2.2698777452961687e-17)
@ -1899,8 +1901,8 @@
(f64.mul
(get_local $0)
(f64.add
(get_local $6)
(get_local $7)
(get_local $8)
)
)
(f64.const 3.061616997868383e-17)
@ -1921,8 +1923,8 @@
(f64.mul
(get_local $0)
(f64.add
(get_local $6)
(get_local $7)
(get_local $8)
)
)
(f64.const 1.3903311031230998e-17)
@ -1943,8 +1945,8 @@
(f64.mul
(get_local $0)
(f64.add
(get_local $6)
(get_local $7)
(get_local $8)
)
)
(f64.const 6.123233995736766e-17)
@ -2093,33 +2095,38 @@
)
)
(func $~lib/math/NativeMath.atan2 (; 16 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
(local $2 f64)
(local $3 i32)
(local $4 i64)
(local $2 i32)
(local $3 i64)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 f64)
(local $9 f64)
(nop)
(if
(i32.and
(if (result i32)
(tee_local $3
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(get_local $2)
)
)
(get_local $3)
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -2131,50 +2138,50 @@
)
)
)
(set_local $4
(set_local $3
(i64.reinterpret/f64
(get_local $1)
)
)
(set_local $5
(set_local $4
(i32.wrap/i64
(i64.shr_u
(get_local $4)
(get_local $3)
(i64.const 32)
)
)
)
(set_local $6
(set_local $5
(i32.wrap/i64
(get_local $4)
(get_local $3)
)
)
(set_local $4
(set_local $3
(i64.reinterpret/f64
(get_local $0)
)
)
(set_local $7
(set_local $6
(i32.wrap/i64
(i64.shr_u
(get_local $4)
(get_local $3)
(i64.const 32)
)
)
)
(set_local $8
(set_local $7
(i32.wrap/i64
(get_local $4)
(get_local $3)
)
)
(if
(i32.eq
(i32.or
(i32.sub
(get_local $5)
(get_local $4)
(i32.const 1072693248)
)
(get_local $6)
(get_local $5)
)
(i32.const 0)
)
@ -2184,41 +2191,41 @@
)
)
)
(set_local $9
(set_local $8
(i32.or
(i32.and
(i32.shr_u
(get_local $7)
(get_local $6)
(i32.const 31)
)
(i32.const 1)
)
(i32.and
(i32.shr_u
(get_local $5)
(get_local $4)
(i32.const 30)
)
(i32.const 2)
)
)
)
(set_local $5
(set_local $4
(i32.and
(get_local $5)
(get_local $4)
(i32.const 2147483647)
)
)
(set_local $7
(set_local $6
(i32.and
(get_local $7)
(get_local $6)
(i32.const 2147483647)
)
)
(if
(i32.eq
(i32.or
(get_local $6)
(get_local $7)
(get_local $8)
)
(i32.const 0)
)
@ -2227,30 +2234,30 @@
(block $case2|0
(block $case1|0
(block $case0|0
(set_local $3
(get_local $9)
(set_local $2
(get_local $8)
)
(br_if $case0|0
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 0)
)
)
(br_if $case1|0
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 1)
)
)
(br_if $case2|0
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 2)
)
)
(br_if $case3|0
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 3)
)
)
@ -2275,15 +2282,15 @@
(if
(i32.eq
(i32.or
(get_local $4)
(get_local $5)
(get_local $6)
)
(i32.const 0)
)
(return
(if (result f64)
(i32.and
(get_local $9)
(get_local $8)
(i32.const 1)
)
(f64.div
@ -2301,12 +2308,12 @@
)
(if
(i32.eq
(get_local $5)
(get_local $4)
(i32.const 2146435072)
)
(if
(i32.eq
(get_local $7)
(get_local $6)
(i32.const 2146435072)
)
(block $break|1
@ -2314,30 +2321,30 @@
(block $case2|1
(block $case1|1
(block $case0|1
(set_local $3
(get_local $9)
(set_local $2
(get_local $8)
)
(br_if $case0|1
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 0)
)
)
(br_if $case1|1
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 1)
)
)
(br_if $case2|1
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 2)
)
)
(br_if $case3|1
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 3)
)
)
@ -2384,30 +2391,30 @@
(block $case2|2
(block $case1|2
(block $case0|2
(set_local $3
(get_local $9)
(set_local $2
(get_local $8)
)
(br_if $case0|2
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 0)
)
)
(br_if $case1|2
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 1)
)
)
(br_if $case2|2
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 2)
)
)
(br_if $case3|2
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 3)
)
)
@ -2437,21 +2444,21 @@
(if
(i32.and
(if (result i32)
(tee_local $3
(tee_local $2
(i32.lt_u
(i32.add
(get_local $5)
(get_local $4)
(i32.shl
(i32.const 64)
(i32.const 20)
)
)
(get_local $7)
(get_local $6)
)
)
(get_local $3)
(get_local $2)
(i32.eq
(get_local $7)
(get_local $6)
(i32.const 2146435072)
)
)
@ -2460,7 +2467,7 @@
(return
(if (result f64)
(i32.and
(get_local $9)
(get_local $8)
(i32.const 1)
)
(f64.div
@ -2478,28 +2485,28 @@
)
(if
(if (result i32)
(tee_local $3
(tee_local $2
(i32.and
(get_local $9)
(get_local $8)
(i32.const 2)
)
)
(i32.lt_u
(i32.add
(get_local $7)
(get_local $6)
(i32.shl
(i32.const 64)
(i32.const 20)
)
)
(get_local $5)
(get_local $4)
)
(get_local $3)
(get_local $2)
)
(set_local $10
(set_local $9
(f64.const 0)
)
(set_local $10
(set_local $9
(call $~lib/math/NativeMath.atan
(f64.abs
(f64.div
@ -2515,42 +2522,42 @@
(block $case2|3
(block $case1|3
(block $case0|3
(set_local $3
(get_local $9)
(set_local $2
(get_local $8)
)
(br_if $case0|3
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 0)
)
)
(br_if $case1|3
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 1)
)
)
(br_if $case2|3
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 2)
)
)
(br_if $case3|3
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 3)
)
)
(br $break|3)
)
(return
(get_local $10)
(get_local $9)
)
)
(return
(f64.neg
(get_local $10)
(get_local $9)
)
)
)
@ -2558,7 +2565,7 @@
(f64.sub
(f64.const 3.141592653589793)
(f64.sub
(get_local $10)
(get_local $9)
(f64.const 1.2246467991473532e-16)
)
)
@ -2567,7 +2574,7 @@
(return
(f64.sub
(f64.sub
(get_local $10)
(get_local $9)
(f64.const 1.2246467991473532e-16)
)
(f64.const 3.141592653589793)
@ -2913,11 +2920,14 @@
)
(block
(if
(f64.ne
(tee_local $5
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $5)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -2948,7 +2958,7 @@
)
)
)
(set_local $6
(set_local $5
(f64.const 0)
)
(if
@ -2968,7 +2978,7 @@
(get_local $4)
)
(block
(set_local $5
(set_local $7
(f64.sub
(get_local $0)
(f64.const 0.6931471803691238)
@ -2982,7 +2992,7 @@
)
)
(block
(set_local $5
(set_local $7
(f64.add
(get_local $0)
(f64.const 0.6931471803691238)
@ -3014,23 +3024,23 @@
)
)
)
(set_local $7
(set_local $6
(f64.convert_s/i32
(get_local $3)
)
)
(set_local $5
(set_local $7
(f64.sub
(get_local $0)
(f64.mul
(get_local $7)
(get_local $6)
(f64.const 0.6931471803691238)
)
)
)
(set_local $8
(f64.mul
(get_local $7)
(get_local $6)
(f64.const 1.9082149292705877e-10)
)
)
@ -3038,14 +3048,14 @@
)
(set_local $0
(f64.sub
(get_local $5)
(get_local $7)
(get_local $8)
)
)
(set_local $6
(set_local $5
(f64.sub
(f64.sub
(get_local $5)
(get_local $7)
(get_local $0)
)
(get_local $8)
@ -3107,7 +3117,7 @@
)
)
)
(set_local $7
(set_local $6
(f64.sub
(f64.const 3)
(f64.mul
@ -3122,13 +3132,13 @@
(f64.div
(f64.sub
(get_local $11)
(get_local $7)
(get_local $6)
)
(f64.sub
(f64.const 6)
(f64.mul
(get_local $0)
(get_local $7)
(get_local $6)
)
)
)
@ -3158,10 +3168,10 @@
(get_local $0)
(f64.sub
(get_local $12)
(get_local $6)
(get_local $5)
)
)
(get_local $6)
(get_local $5)
)
)
(set_local $12
@ -3480,11 +3490,10 @@
(local $2 i32)
(local $3 f64)
(local $4 f64)
(local $5 f64)
(local $6 i32)
(local $5 i32)
(local $6 f64)
(local $7 f64)
(local $8 f64)
(local $9 f64)
(nop)
(set_local $1
(i32.wrap/i64
@ -3515,11 +3524,14 @@
)
(block
(if
(f64.ne
(tee_local $3
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $3)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -3553,10 +3565,10 @@
)
)
)
(set_local $5
(set_local $4
(f64.const 0)
)
(set_local $6
(set_local $5
(i32.const 0)
)
(if
@ -3570,7 +3582,7 @@
(get_local $1)
(i32.const 1072734898)
)
(set_local $6
(set_local $5
(i32.trunc_s/f64
(f64.add
(f64.mul
@ -3584,7 +3596,7 @@
)
)
)
(set_local $6
(set_local $5
(i32.sub
(i32.sub
(i32.const 1)
@ -3594,29 +3606,29 @@
)
)
)
(set_local $4
(set_local $3
(f64.sub
(get_local $0)
(f64.mul
(f64.convert_s/i32
(get_local $6)
(get_local $5)
)
(f64.const 0.6931471803691238)
)
)
)
(set_local $5
(set_local $4
(f64.mul
(f64.convert_s/i32
(get_local $6)
(get_local $5)
)
(f64.const 1.9082149292705877e-10)
)
)
(set_local $0
(f64.sub
(get_local $3)
(get_local $4)
(get_local $5)
)
)
)
@ -3625,7 +3637,7 @@
(get_local $1)
(i32.const 1043333120)
)
(set_local $4
(set_local $3
(get_local $0)
)
(return
@ -3636,33 +3648,33 @@
)
)
)
(set_local $7
(set_local $6
(f64.mul
(get_local $0)
(get_local $0)
)
)
(set_local $8
(set_local $7
(f64.sub
(get_local $0)
(f64.mul
(get_local $7)
(get_local $6)
(f64.add
(f64.const 0.16666666666666602)
(f64.mul
(get_local $7)
(get_local $6)
(f64.add
(f64.const -2.7777777777015593e-03)
(f64.mul
(get_local $7)
(get_local $6)
(f64.add
(f64.const 6.613756321437934e-05)
(f64.mul
(get_local $7)
(get_local $6)
(f64.add
(f64.const -1.6533902205465252e-06)
(f64.mul
(get_local $7)
(get_local $6)
(f64.const 4.1381367970572385e-08)
)
)
@ -3675,7 +3687,7 @@
)
)
)
(set_local $9
(set_local $8
(f64.add
(f64.const 1)
(f64.add
@ -3683,32 +3695,32 @@
(f64.div
(f64.mul
(get_local $0)
(get_local $8)
(get_local $7)
)
(f64.sub
(f64.const 2)
(get_local $8)
(get_local $7)
)
)
(get_local $5)
)
(get_local $4)
)
(get_local $3)
)
)
)
(if
(i32.eq
(get_local $6)
(get_local $5)
(i32.const 0)
)
(return
(get_local $9)
(get_local $8)
)
)
(return
(call $~lib/math/NativeMath.scalbn
(get_local $9)
(get_local $6)
(get_local $8)
(get_local $5)
)
)
)

View File

@ -223,26 +223,31 @@
)
)
(func $std/math/ulperr (; 34 ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64)
(local $3 f64)
(local $4 i32)
(local $3 i32)
(if
(i32.and
(if (result i32)
(tee_local $4
(f64.ne
(tee_local $3
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $3)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(f64.ne
(tee_local $3
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $3)
(i64.const 9223372036854775807)
)
(get_local $4)
(i64.const 9218868437227405312)
)
(get_local $3)
)
(i32.const 1)
)
@ -275,22 +280,14 @@
)
)
(if
(i32.eqz
(select
(f64.ne
(f64.abs
(tee_local $3
(i64.ge_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(i64.const 9223372036854775807)
)
(f64.const inf)
)
(i32.const 0)
(f64.eq
(get_local $3)
(get_local $3)
)
)
(i64.const 9218868437227405312)
)
(block
(set_local $0
@ -335,25 +332,31 @@
)
)
(if
(f64.ne
(tee_local $4
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $4)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(f64.ne
(tee_local $4
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $4)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
)
(if
(f64.ge
(f64.abs
(tee_local $0
(tee_local $4
(call $std/math/ulperr
(get_local $0)
(get_local $1)
@ -366,7 +369,7 @@
(block
(call $std/math/logf
(f64.abs
(get_local $0)
(get_local $4)
)
)
(return
@ -525,26 +528,31 @@
)
)
(func $std/math/ulperrf (; 39 ;) (type $ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32)
(local $3 f32)
(local $4 i32)
(local $3 i32)
(if
(i32.and
(if (result i32)
(tee_local $4
(f32.ne
(tee_local $3
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $3)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(f32.ne
(tee_local $3
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $3)
(i32.const 2147483647)
)
(get_local $4)
(i32.const 2139095040)
)
(get_local $3)
)
(i32.const 1)
)
@ -577,22 +585,14 @@
)
)
(if
(i32.eqz
(select
(f32.ne
(f32.abs
(tee_local $3
(i32.ge_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(i32.const 2147483647)
)
(f32.const inf)
)
(i32.const 0)
(f32.eq
(get_local $3)
(get_local $3)
)
)
(i32.const 2139095040)
)
(block
(set_local $0
@ -637,25 +637,31 @@
)
)
(if
(f32.ne
(tee_local $4
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $4)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
(return
(f32.ne
(tee_local $4
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $4)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
)
(if
(f32.ge
(f32.abs
(tee_local $0
(tee_local $4
(call $std/math/ulperrf
(get_local $0)
(get_local $1)
@ -669,7 +675,7 @@
(call $std/math/logf
(f64.promote/f32
(f32.abs
(get_local $0)
(get_local $4)
)
)
)
@ -3161,11 +3167,14 @@
)
(block
(if
(f64.ne
(tee_local $1
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $1)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -3549,11 +3558,14 @@
)
(block
(if
(f32.ne
(tee_local $1
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $1)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
(return
(get_local $0)
@ -4082,27 +4094,32 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 f64)
(local $7 i64)
(local $8 i32)
(local $6 i64)
(local $7 i32)
(block $folding-inner0
(if
(i32.and
(if (result i32)
(tee_local $2
(f64.ne
(tee_local $6
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $6)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(get_local $2)
(f64.ne
(tee_local $6
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $6)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -4117,7 +4134,7 @@
(set_local $3
(i32.wrap/i64
(i64.shr_u
(tee_local $7
(tee_local $6
(i64.reinterpret/f64
(get_local $1)
)
@ -4126,15 +4143,15 @@
)
)
)
(set_local $8
(set_local $7
(i32.wrap/i64
(get_local $7)
(get_local $6)
)
)
(set_local $4
(i32.wrap/i64
(i64.shr_u
(tee_local $7
(tee_local $6
(i64.reinterpret/f64
(get_local $0)
)
@ -4150,7 +4167,7 @@
(get_local $3)
(i32.const 1072693248)
)
(get_local $8)
(get_local $7)
)
)
(return
@ -4190,7 +4207,7 @@
)
)
(i32.wrap/i64
(get_local $7)
(get_local $6)
)
)
)
@ -4244,7 +4261,7 @@
(i32.eqz
(i32.or
(get_local $3)
(get_local $8)
(get_local $7)
)
)
)
@ -4459,25 +4476,30 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 f32)
(block $folding-inner0
(if
(i32.and
(if (result i32)
(tee_local $2
(f32.ne
(tee_local $6
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $6)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(get_local $2)
(f32.ne
(tee_local $6
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $6)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -5197,16 +5219,16 @@
(local $1 f64)
(local $2 i32)
(local $3 f64)
(local $4 f64)
(local $5 i32)
(local $6 i64)
(local $7 i32)
(local $4 i32)
(local $5 i64)
(local $6 i32)
(local $7 f64)
(local $8 f64)
(set_local $7
(set_local $4
(i32.wrap/i64
(i64.and
(i64.shr_u
(tee_local $6
(tee_local $5
(i64.reinterpret/f64
(get_local $0)
)
@ -5217,33 +5239,36 @@
)
)
)
(set_local $5
(set_local $6
(i32.wrap/i64
(i64.shr_u
(get_local $6)
(get_local $5)
(i64.const 63)
)
)
)
(if
(i32.ge_u
(get_local $7)
(get_local $4)
(i32.const 1078159482)
)
(block
(if
(f64.ne
(tee_local $3
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $3)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
)
)
(if
(get_local $5)
(get_local $6)
(return
(f64.const -1)
)
@ -5264,18 +5289,18 @@
)
(if
(i32.gt_u
(get_local $7)
(get_local $4)
(i32.const 1071001154)
)
(block
(if
(i32.lt_u
(get_local $7)
(get_local $4)
(i32.const 1072734898)
)
(set_local $3
(set_local $0
(if (result f64)
(get_local $5)
(get_local $6)
(block (result f64)
(set_local $1
(f64.const -1.9082149292705877e-10)
@ -5303,7 +5328,7 @@
)
)
(block
(set_local $3
(set_local $0
(f64.sub
(get_local $0)
(f64.mul
@ -5319,7 +5344,7 @@
(select
(f64.const -0.5)
(f64.const 0.5)
(get_local $5)
(get_local $6)
)
)
)
@ -5338,13 +5363,13 @@
)
)
)
(set_local $8
(set_local $7
(f64.sub
(f64.sub
(get_local $3)
(get_local $0)
(tee_local $0
(f64.sub
(get_local $3)
(get_local $0)
(get_local $1)
)
)
@ -5355,7 +5380,7 @@
)
(if
(i32.lt_u
(get_local $7)
(get_local $4)
(i32.const 1016070144)
)
(return
@ -5367,11 +5392,11 @@
(f64.sub
(f64.const 3)
(f64.mul
(tee_local $3
(tee_local $8
(f64.add
(f64.const 1)
(f64.mul
(tee_local $4
(tee_local $3
(f64.mul
(get_local $0)
(tee_local $1
@ -5385,19 +5410,19 @@
(f64.add
(f64.const -0.03333333333333313)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const 1.5873015872548146e-03)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const -7.93650757867488e-05)
(f64.mul
(get_local $4)
(get_local $3)
(f64.add
(f64.const 4.008217827329362e-06)
(f64.mul
(get_local $4)
(get_local $3)
(f64.const -2.0109921818362437e-07)
)
)
@ -5416,10 +5441,10 @@
)
(set_local $1
(f64.mul
(get_local $4)
(get_local $3)
(f64.div
(f64.sub
(get_local $3)
(get_local $8)
(get_local $1)
)
(f64.sub
@ -5444,7 +5469,7 @@
(get_local $0)
(get_local $1)
)
(get_local $4)
(get_local $3)
)
)
)
@ -5456,12 +5481,12 @@
(get_local $0)
(f64.sub
(get_local $1)
(get_local $8)
(get_local $7)
)
)
(get_local $8)
(get_local $7)
)
(get_local $4)
(get_local $3)
)
)
(if
@ -5536,13 +5561,13 @@
(if
(i32.and
(if (result i32)
(tee_local $5
(tee_local $4
(i32.lt_s
(get_local $2)
(i32.const 0)
)
)
(get_local $5)
(get_local $4)
(i32.gt_s
(get_local $2)
(i32.const 56)
@ -5586,7 +5611,7 @@
)
)
)
(set_local $6
(set_local $5
(i64.shl
(i64.sub
(i64.const 1023)
@ -5608,7 +5633,7 @@
(f64.sub
(f64.const 1)
(f64.reinterpret/i64
(get_local $6)
(get_local $5)
)
)
)
@ -5621,7 +5646,7 @@
(f64.add
(get_local $1)
(f64.reinterpret/i64
(get_local $6)
(get_local $5)
)
)
)
@ -5638,11 +5663,11 @@
)
(func $~lib/math/NativeMath.exp (; 86 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32)
(local $2 f64)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $4 f64)
(local $5 f64)
(set_local $4
(set_local $3
(i32.shr_u
(tee_local $1
(i32.wrap/i64
@ -5669,11 +5694,14 @@
)
(block
(if
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(get_local $0)
@ -5709,12 +5737,12 @@
)
(set_local $0
(f64.sub
(tee_local $2
(tee_local $5
(f64.sub
(get_local $0)
(f64.mul
(f64.convert_s/i32
(tee_local $3
(tee_local $2
(if (result i32)
(i32.ge_u
(get_local $1)
@ -5735,9 +5763,9 @@
(i32.sub
(i32.sub
(i32.const 1)
(get_local $4)
(get_local $3)
)
(get_local $4)
(get_local $3)
)
)
)
@ -5746,10 +5774,10 @@
)
)
)
(tee_local $5
(tee_local $4
(f64.mul
(f64.convert_s/i32
(get_local $3)
(get_local $2)
)
(f64.const 1.9082149292705877e-10)
)
@ -5761,7 +5789,7 @@
(get_local $1)
(i32.const 1043333120)
)
(set_local $2
(set_local $5
(get_local $0)
)
(return
@ -5824,15 +5852,15 @@
(get_local $0)
)
)
(get_local $5)
(get_local $4)
)
(get_local $2)
(get_local $5)
)
)
)
(if
(i32.eqz
(get_local $3)
(get_local $2)
)
(return
(get_local $0)
@ -5840,7 +5868,7 @@
)
(call $~lib/math/NativeMath.scalbn
(get_local $0)
(get_local $3)
(get_local $2)
)
)
(func $~lib/math/expo2 (; 87 ;) (type $FF) (param $0 f64) (result f64)
@ -8667,7 +8695,6 @@
(local $5 i64)
(local $6 i32)
(local $7 i32)
(local $8 f64)
(block $folding-inner0
(set_local $3
(i32.wrap/i64
@ -8715,11 +8742,14 @@
)
)
(get_local $7)
(f64.ne
(tee_local $8
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $8)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -9073,8 +9103,7 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $8 i32)
(local $7 i32)
(block $folding-inner0
(set_local $4
(i32.and
@ -9117,11 +9146,14 @@
)
)
(get_local $3)
(f32.ne
(tee_local $7
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -9177,7 +9209,7 @@
)
)
)
(set_local $8
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
@ -9409,7 +9441,7 @@
)
)
)
(get_local $8)
(get_local $7)
)
)
)
@ -12544,8 +12576,7 @@
(local $7 i64)
(local $8 i32)
(local $9 i64)
(local $10 f64)
(local $11 i32)
(local $10 i32)
(set_local $2
(i32.wrap/i64
(i64.and
@ -12592,11 +12623,14 @@
)
)
(get_local $4)
(f64.ne
(tee_local $10
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $10)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -12756,7 +12790,7 @@
)
)
)
(set_local $11
(set_local $10
(i32.wrap/i64
(i64.shr_u
(get_local $9)
@ -13008,7 +13042,7 @@
(get_local $0)
)
(get_local $0)
(get_local $11)
(get_local $10)
)
)
(func $std/math/test_rem (; 140 ;) (type $FFFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32)
@ -13029,9 +13063,8 @@
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 f32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(set_local $3
(i32.and
(i32.shr_u
@ -13076,11 +13109,14 @@
)
)
(get_local $2)
(f32.ne
(tee_local $8
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $8)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -13170,7 +13206,7 @@
)
)
)
(set_local $9
(set_local $8
(i32.shr_u
(get_local $7)
(i32.const 31)
@ -13228,7 +13264,7 @@
)
)
)
(set_local $10
(set_local $9
(i32.shr_u
(get_local $5)
(i32.const 31)
@ -13399,7 +13435,7 @@
)
)
(if
(get_local $9)
(get_local $8)
(set_local $1
(f32.neg
(get_local $1)
@ -13471,7 +13507,7 @@
(get_local $0)
)
(get_local $0)
(get_local $10)
(get_local $9)
)
)
(func $std/math/test_remf (; 142 ;) (type $ffffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32)

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,6 @@
(local $5 i64)
(local $6 i32)
(local $7 i32)
(local $8 f64)
(block $folding-inner0
(set_local $3
(i32.wrap/i64
@ -68,11 +67,14 @@
)
)
(get_local $7)
(f64.ne
(tee_local $8
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $8)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
@ -386,20 +388,25 @@
)
)
(func $std/mod/check<f64> (; 3 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
(local $2 f64)
(if
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
)
@ -463,8 +470,7 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $8 i32)
(local $7 i32)
(block $folding-inner0
(set_local $4
(i32.and
@ -507,11 +513,14 @@
)
)
(get_local $3)
(f32.ne
(tee_local $7
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
@ -567,7 +576,7 @@
)
)
)
(set_local $8
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
@ -799,7 +808,7 @@
)
)
)
(get_local $8)
(get_local $7)
)
)
)
@ -810,20 +819,25 @@
)
)
(func $std/mod/check<f32> (; 6 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
(local $2 f32)
(if
(f32.ne
(tee_local $2
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $2)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
(return
(f32.ne
(tee_local $2
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $2)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
)

View File

@ -22,9 +22,8 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f64)
(local $8 i32)
(local $9 i64)
(local $7 i32)
(local $8 i64)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -68,10 +67,10 @@
(if
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i64.eq
(i64.shl
(get_local $3)
@ -80,18 +79,21 @@
(i64.const 0)
)
)
(get_local $8)
(f64.ne
(tee_local $7
(get_local $7)
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $7)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
(i32.const 1)
)
)
(get_local $8)
(get_local $7)
(i32.eq
(get_local $4)
(i32.const 2047)
@ -154,7 +156,7 @@
)
(block
(block $break|0
(set_local $9
(set_local $8
(i64.shl
(get_local $2)
(i64.const 12)
@ -164,7 +166,7 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
@ -175,9 +177,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i64.shl
(get_local $9)
(get_local $8)
(i64.const 1)
)
)
@ -228,7 +230,7 @@
)
(block
(block $break|1
(set_local $9
(set_local $8
(i64.shl
(get_local $3)
(i64.const 12)
@ -238,7 +240,7 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
@ -249,9 +251,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i64.shl
(get_local $9)
(get_local $8)
(i64.const 1)
)
)
@ -306,7 +308,7 @@
)
(block
(block
(set_local $9
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
@ -315,14 +317,14 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $9)
(get_local $8)
)
(return
(f64.mul
@ -332,7 +334,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -354,7 +356,7 @@
)
)
)
(set_local $9
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
@ -363,14 +365,14 @@
(if
(i64.eqz
(i64.shr_u
(get_local $9)
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $9)
(get_local $8)
)
(return
(f64.mul
@ -380,7 +382,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -472,20 +474,25 @@
)
)
(func $std/mod/check<f64> (; 3 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
(local $2 f64)
(if
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $1)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
(return
(f64.ne
(tee_local $2
(i64.gt_u
(i64.and
(i64.reinterpret/f64
(get_local $0)
)
(get_local $2)
(i64.const 9223372036854775807)
)
(i64.const 9218868437227405312)
)
)
)
@ -557,9 +564,8 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 f32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(set_local $2
(i32.reinterpret/f32
(get_local $0)
@ -597,10 +603,10 @@
(if
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.and
(if (result i32)
(tee_local $8
(tee_local $7
(i32.eq
(i32.shl
(get_local $3)
@ -609,18 +615,21 @@
(i32.const 0)
)
)
(get_local $8)
(f32.ne
(tee_local $7
(get_local $7)
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $7)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
(i32.const 1)
)
)
(get_local $8)
(get_local $7)
(i32.eq
(get_local $4)
(i32.const 255)
@ -683,7 +692,7 @@
)
(block
(block $break|0
(set_local $9
(set_local $8
(i32.shl
(get_local $2)
(i32.const 9)
@ -693,7 +702,7 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
@ -704,9 +713,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i32.shl
(get_local $9)
(get_local $8)
(i32.const 1)
)
)
@ -755,7 +764,7 @@
)
(block
(block $break|1
(set_local $9
(set_local $8
(i32.shl
(get_local $3)
(i32.const 9)
@ -765,7 +774,7 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
@ -776,9 +785,9 @@
(i32.const 1)
)
)
(set_local $9
(set_local $8
(i32.shl
(get_local $9)
(get_local $8)
(i32.const 1)
)
)
@ -831,7 +840,7 @@
)
(block
(block
(set_local $9
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
@ -840,14 +849,14 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $9)
(get_local $8)
)
(return
(f32.mul
@ -857,7 +866,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -879,7 +888,7 @@
)
)
)
(set_local $9
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
@ -888,14 +897,14 @@
(if
(i32.eqz
(i32.shr_u
(get_local $9)
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $9)
(get_local $8)
)
(return
(f32.mul
@ -905,7 +914,7 @@
)
)
(set_local $2
(get_local $9)
(get_local $8)
)
)
)
@ -988,20 +997,25 @@
)
)
(func $std/mod/check<f32> (; 6 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
(local $2 f32)
(if
(f32.ne
(tee_local $2
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $1)
)
(get_local $2)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
(return
(f32.ne
(tee_local $2
(i32.gt_u
(i32.and
(i32.reinterpret/f32
(get_local $0)
)
(get_local $2)
(i32.const 2147483647)
)
(i32.const 2139095040)
)
)
)