Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Issue 2130763002: MIPS: [wasm] Detect unrepresentability in the float32-to-int32 conversion correctly on arm (Closed)

Created:
4 years, 5 months ago by ivica.bogosavljevic
Modified:
4 years, 5 months ago
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

MIPS: [wasm] Detect unrepresentability in the float32-to-int32 conversion correctly on arm Port de369129d272c9cbd2a6282f4097a5d0ce264e85 Original commit message: In the current implementation of wasm an unrepresentable input of the float32-to-int32 conversion is detected by first truncating the input, then converting the truncated input to int32 and back to float32, and then checking whether the result is the same as the truncated input. This input check does not work on arm and arm64 for an input of (INT32_MAX + 1) because on these platforms the float32-to-int32 conversion results in INT32_MAX if the input is greater than INT32_MAX. When INT32_MAX is converted back to float32, then the result is (INT32_MAX + 1) again because INT32_MAX cannot be represented precisely as float32, and rounding-to-nearest results in (INT32_MAX + 1). Since (INT32_MAX + 1) equals the truncated input value, the input appears to be representable. With the changes in this CL, the result of the float32-to-int32 conversion is incremented by 1 if the original result was INT32_MAX. Thereby the detection of unrepresenable inputs in wasm works. Note that since INT32_MAX cannot be represented precisely in float32, it can also never be a valid result of the float32-to-int32 conversion. BUG=cctest/test-run-wasm/RunWasmCompiled_I32SConvertF32,cctest/test-run-wasm/RunWasmCompiled_I32UConvertF32 Committed: https://crrev.com/db6d8e2a5afc96209ec4dd99e6933b9c7e864f69 Cr-Commit-Position: refs/heads/master@{#37586}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M src/compiler/mips/code-generator-mips.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
ivica.bogosavljevic
PTAL Although it may seems strange, this is exactly what is done at ARM. The ...
4 years, 5 months ago (2016-07-07 11:01:39 UTC) #2
ivica.bogosavljevic
4 years, 5 months ago (2016-07-07 12:00:36 UTC) #4
balazs.kilvady
lgtm
4 years, 5 months ago (2016-07-07 12:01:24 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2130763002/1
4 years, 5 months ago (2016-07-07 12:05:54 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-07 12:33:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2130763002/1
4 years, 5 months ago (2016-07-07 12:37:30 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-07 12:39:26 UTC) #13
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 12:41:38 UTC) #15
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/db6d8e2a5afc96209ec4dd99e6933b9c7e864f69
Cr-Commit-Position: refs/heads/master@{#37586}

Powered by Google App Engine
This is Rietveld 408576698