]> Cypherpunks repositories - gostls13.git/commit
runtime: use correct truncated constants for float conversion
authorAgniva De Sarker <agnivade@yahoo.co.in>
Mon, 4 May 2020 06:51:18 +0000 (12:21 +0530)
committerAgniva De Sarker <agniva.quicksilver@gmail.com>
Wed, 6 May 2020 13:55:00 +0000 (13:55 +0000)
commit4daf8719e7f4c71a620f650d73caab2a9d7ea499
treeabcfd92941eae651799b1632a9679b3a4603ffe9
parent0f47c12a29e6277c8139e8d4f5a45272e437fe6e
runtime: use correct truncated constants for float conversion

There is a range of numbers lower than 0x7fff_ffff_ffff_ffff which
cannot be represented by a 64 bit float. We set that to the correct
limit beyond which conversions can happen properly.

It appears that the negative bound check can indeed by correctly handled
by I64TruncF64S. But we use the same limit for consistency.

Fixes #38839

Change-Id: Ib783a22cb331fba7e6955459f41c67f9ceb53461
Reviewed-on: https://go-review.googlesource.com/c/go/+/231837
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/conv_wasm_test.go [new file with mode: 0644]
src/runtime/sys_wasm.s