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

Issue 1905883002: X87: Change the test case for X87 RunTruncateFloat32ToUint32. (Closed)

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

Description

X87: Change the test case for X87 RunTruncateFloat32ToUint32. The CL #35651 (https://codereview.chromium.org/1858323003) exposed one hiden issue in RunTruncateFloat32ToUint32 test cases and X87 failed at it. Here is the issue in RunTruncateFloat32ToUint32: For float input = static_cast<float>(*i), the x87 GCC would optimize the input viariable in float floating register for release build. The problem is: SSE float register has single precision rounding semantic While X87 register hasn't when directly use floating register value. It will cause the value of input viariable has different precision for IA32 and X87 port. So static_cast<uint32_t>(input) will be different for IA32 and X87 port too. This led to CHECK_EQ(static_cast<uint32_t>(input), m.Call(input)) fail although V8 turbofan JITTed code m.Call(input) has exactly same result in both X87 and IA32 port. So we add the following sentence to do type cast to keep the single precision for RunTruncateFloat32ToUint32 by forcing the input viariable get value from memory insread of floating register. Such as: volatile float input = static_cast<float>(*i). BUG= Committed: https://crrev.com/d5ffbfefd9b7e813588fe85579b5fef2dab79d29 Cr-Commit-Position: refs/heads/master@{#35689}

Patch Set 1 #

Total comments: 1

Patch Set 2 : re-format the CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M test/cctest/compiler/test-run-machops.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (4 generated)
zhengxing.li
PTAL, thanks!
4 years, 8 months ago (2016-04-21 07:03:40 UTC) #2
zhengxing.li
PTAL, thanks!
4 years, 8 months ago (2016-04-21 07:04:45 UTC) #4
titzer
lgtm https://codereview.chromium.org/1905883002/diff/1/test/cctest/compiler/test-run-machops.cc File test/cctest/compiler/test-run-machops.cc (right): https://codereview.chromium.org/1905883002/diff/1/test/cctest/compiler/test-run-machops.cc#newcode4020 test/cctest/compiler/test-run-machops.cc:4020: {FOR_UINT32_INPUTS(i){volatile float input = static_cast<float>(*i); This somehow got ...
4 years, 8 months ago (2016-04-21 07:09:00 UTC) #5
zhengxing.li
On 2016/04/21 07:09:00, titzer wrote: > lgtm > > https://codereview.chromium.org/1905883002/diff/1/test/cctest/compiler/test-run-machops.cc > File test/cctest/compiler/test-run-machops.cc (right): > ...
4 years, 8 months ago (2016-04-21 07:11:42 UTC) #6
titzer
On 2016/04/21 07:11:42, zhengxing.li wrote: > On 2016/04/21 07:09:00, titzer wrote: > > lgtm > ...
4 years, 8 months ago (2016-04-21 08:23:03 UTC) #7
zhengxing.li
On 2016/04/21 08:23:03, titzer wrote: > On 2016/04/21 07:11:42, zhengxing.li wrote: > > On 2016/04/21 ...
4 years, 8 months ago (2016-04-21 08:46:18 UTC) #8
titzer
lgtm
4 years, 8 months ago (2016-04-21 08:48:07 UTC) #9
zhengxing.li
On 2016/04/21 08:48:07, titzer wrote: > lgtm Got it, thanks!
4 years, 8 months ago (2016-04-21 08:48:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905883002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905883002/20001
4 years, 8 months ago (2016-04-21 08:48:53 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-21 09:10:24 UTC) #13
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:14:14 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d5ffbfefd9b7e813588fe85579b5fef2dab79d29
Cr-Commit-Position: refs/heads/master@{#35689}

Powered by Google App Engine
This is Rietveld 408576698