Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Feb 7, 2025
1 parent 09013bc commit bf9a07b
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 180 deletions.
70 changes: 37 additions & 33 deletions tests/compiler/issues/2873.debug.wat
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,12 @@
end
unreachable
)
(func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (param $isSinglePrecision i32) (result i32)
(func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (param $isSingle i32) (result i32)
(local $sign i32)
(local $value|4 f64)
(local $buffer|5 i32)
(local $sign|6 i32)
(local $isSinglePrecision|7 i32)
(local $isSingle|7 i32)
(local $frc i64)
(local $exp i32)
(local $uv i32)
Expand All @@ -1126,7 +1126,7 @@
(local $sid|13 i64)
(local $f i64)
(local $e i32)
(local $isSinglePrecision|16 i32)
(local $isSingle|16 i32)
(local $frc|17 i64)
(local $exp|18 i32)
(local $off i32)
Expand Down Expand Up @@ -1196,9 +1196,9 @@
local.set $buffer|5
local.get $sign
local.set $sign|6
local.get $isSinglePrecision
local.set $isSinglePrecision|7
local.get $isSinglePrecision|7
local.get $isSingle
local.set $isSingle|7
local.get $isSingle|7
if
local.get $value|4
f32.demote_f64
Expand All @@ -1225,9 +1225,11 @@
i64.add
local.set $frc
local.get $exp
i32.const 1
local.get $exp
select
if (result i32)
local.get $exp
else
i32.const 1
end
i32.const 127
i32.const 23
i32.add
Expand Down Expand Up @@ -1258,9 +1260,11 @@
i64.add
local.set $frc
local.get $exp
i32.const 1
local.get $exp
select
if (result i32)
local.get $exp
else
i32.const 1
end
i32.const 1023
i32.const 52
i32.add
Expand All @@ -1271,8 +1275,8 @@
local.set $f
local.get $exp
local.set $e
local.get $isSinglePrecision|7
local.set $isSinglePrecision|16
local.get $isSingle|7
local.set $isSingle|16
local.get $f
i64.const 1
i64.shl
Expand All @@ -1298,7 +1302,7 @@
local.set $exp|18
i32.const 1
local.get $f
local.get $isSinglePrecision|16
local.get $isSingle|16
if (result i64)
i64.const 8388608
else
Expand Down Expand Up @@ -3977,7 +3981,7 @@
(func $~lib/util/number/dtoa_buffered<f32> (param $buffer i32) (param $value f32) (result i32)
(local $buffer|2 i32)
(local $value|3 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $sign i32)
i32.const 4
i32.const 4
Expand All @@ -3990,7 +3994,7 @@
f64.promote_f32
local.set $value|3
i32.const 1
local.set $isSinglePrecision
local.set $isSingle
local.get $value|3
f64.const 0
f64.eq
Expand Down Expand Up @@ -4059,7 +4063,7 @@
end
local.get $buffer|2
local.get $value|3
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
br $~lib/util/number/dtoa_buffered_impl|inlined.0
end
Expand All @@ -4076,7 +4080,7 @@
(func $~lib/util/number/dtoa_buffered<f64> (param $buffer i32) (param $value f64) (result i32)
(local $buffer|2 i32)
(local $value|3 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $sign i32)
i32.const 8
i32.const 4
Expand All @@ -4088,7 +4092,7 @@
local.get $value
local.set $value|3
i32.const 0
local.set $isSinglePrecision
local.set $isSingle
local.get $value|3
f64.const 0
f64.eq
Expand Down Expand Up @@ -4157,7 +4161,7 @@
end
local.get $buffer|2
local.get $value|3
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
br $~lib/util/number/dtoa_buffered_impl|inlined.1
end
Expand Down Expand Up @@ -5173,7 +5177,7 @@
)
(func $~lib/util/number/dtoa32 (param $value f32) (result i32)
(local $value|1 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $size i32)
(local $result i32)
(local $5 i32)
Expand All @@ -5190,7 +5194,7 @@
f64.promote_f32
local.set $value|1
i32.const 1
local.set $isSinglePrecision
local.set $isSingle
local.get $value|1
f64.const 0
f64.eq
Expand Down Expand Up @@ -5222,7 +5226,7 @@
end
i32.const 176
local.get $value|1
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
i32.const 1
i32.shl
Expand Down Expand Up @@ -5250,7 +5254,7 @@
)
(func $~lib/util/number/dtoa64 (param $value f64) (result i32)
(local $value|1 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $size i32)
(local $result i32)
(local $5 i32)
Expand All @@ -5266,7 +5270,7 @@
local.get $value
local.set $value|1
i32.const 0
local.set $isSinglePrecision
local.set $isSingle
local.get $value|1
f64.const 0
f64.eq
Expand Down Expand Up @@ -5298,7 +5302,7 @@
end
i32.const 176
local.get $value|1
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
i32.const 1
i32.shl
Expand Down Expand Up @@ -5326,7 +5330,7 @@
)
(func $~lib/util/number/dtoa<f32> (param $value f32) (result i32)
(local $value|1 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $size i32)
(local $result i32)
(local $5 i32)
Expand All @@ -5347,7 +5351,7 @@
f64.promote_f32
local.set $value|1
i32.const 1
local.set $isSinglePrecision
local.set $isSingle
local.get $value|1
f64.const 0
f64.eq
Expand Down Expand Up @@ -5379,7 +5383,7 @@
end
i32.const 176
local.get $value|1
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
i32.const 1
i32.shl
Expand Down Expand Up @@ -5407,7 +5411,7 @@
)
(func $~lib/util/number/dtoa<f64> (param $value f64) (result i32)
(local $value|1 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $size i32)
(local $result i32)
(local $5 i32)
Expand All @@ -5427,7 +5431,7 @@
local.get $value
local.set $value|1
i32.const 0
local.set $isSinglePrecision
local.set $isSingle
local.get $value|1
f64.const 0
f64.eq
Expand Down Expand Up @@ -5459,7 +5463,7 @@
end
i32.const 176
local.get $value|1
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
i32.const 1
i32.shl
Expand Down
40 changes: 22 additions & 18 deletions tests/compiler/resolve-binary.debug.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4727,12 +4727,12 @@
end
unreachable
)
(func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (param $isSinglePrecision i32) (result i32)
(func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (param $isSingle i32) (result i32)
(local $sign i32)
(local $value|4 f64)
(local $buffer|5 i32)
(local $sign|6 i32)
(local $isSinglePrecision|7 i32)
(local $isSingle|7 i32)
(local $frc i64)
(local $exp i32)
(local $uv i32)
Expand All @@ -4741,7 +4741,7 @@
(local $sid|13 i64)
(local $f i64)
(local $e i32)
(local $isSinglePrecision|16 i32)
(local $isSingle|16 i32)
(local $frc|17 i64)
(local $exp|18 i32)
(local $off i32)
Expand Down Expand Up @@ -4811,9 +4811,9 @@
local.set $buffer|5
local.get $sign
local.set $sign|6
local.get $isSinglePrecision
local.set $isSinglePrecision|7
local.get $isSinglePrecision|7
local.get $isSingle
local.set $isSingle|7
local.get $isSingle|7
if
local.get $value|4
f32.demote_f64
Expand All @@ -4840,9 +4840,11 @@
i64.add
local.set $frc
local.get $exp
i32.const 1
local.get $exp
select
if (result i32)
local.get $exp
else
i32.const 1
end
i32.const 127
i32.const 23
i32.add
Expand Down Expand Up @@ -4873,9 +4875,11 @@
i64.add
local.set $frc
local.get $exp
i32.const 1
local.get $exp
select
if (result i32)
local.get $exp
else
i32.const 1
end
i32.const 1023
i32.const 52
i32.add
Expand All @@ -4886,8 +4890,8 @@
local.set $f
local.get $exp
local.set $e
local.get $isSinglePrecision|7
local.set $isSinglePrecision|16
local.get $isSingle|7
local.set $isSingle|16
local.get $f
i64.const 1
i64.shl
Expand All @@ -4913,7 +4917,7 @@
local.set $exp|18
i32.const 1
local.get $f
local.get $isSinglePrecision|16
local.get $isSingle|16
if (result i64)
i64.const 8388608
else
Expand Down Expand Up @@ -7703,7 +7707,7 @@
)
(func $~lib/util/number/dtoa64 (param $value f64) (result i32)
(local $value|1 f64)
(local $isSinglePrecision i32)
(local $isSingle i32)
(local $size i32)
(local $result i32)
(local $5 i32)
Expand All @@ -7719,7 +7723,7 @@
local.get $value
local.set $value|1
i32.const 0
local.set $isSinglePrecision
local.set $isSingle
local.get $value|1
f64.const 0
f64.eq
Expand Down Expand Up @@ -7751,7 +7755,7 @@
end
i32.const 8704
local.get $value|1
local.get $isSinglePrecision
local.get $isSingle
call $~lib/util/number/dtoa_core
i32.const 1
i32.shl
Expand Down
Loading

0 comments on commit bf9a07b

Please sign in to comment.