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

Issue 1773513002: x87: fix the use of CheckFloatEq and CheckDoubleEq in test. (Closed)

Created:
4 years, 9 months ago by ahaas
Modified:
4 years, 9 months ago
Reviewers:
Weiliang, titzer
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: fix the use of CheckFloatEq and CheckDoubleEq in test. Instead of using CheckFloatEq and CheckDoubleEq directly, I introduced a macro which first stores the expected result in a volatile variable. Here are some comments of previous CLs: The reason is same as the CL #31808 (issue 1430943002, X87: Change the test case for X87 float operations), please refer: https://codereview.chromium.org/1430943002/. Here is the key comments from CL #31808 Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function, those inlined functions has different behavior comparing with GCC ia32 build and x87 build. The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value. The V8 turbofan JITTed has exactly same result in both X87 and IA32 port. So we add the following sentence to do type cast to keep the same precision for RunCallInt64ToFloat32/RunCallInt64ToFloat64. Such as: volatile double expect = static_cast<float>(*i). R=titzer@chromium.org, weiliang.lin@intel.com Committed: https://crrev.com/a5d41888493694e7fa49f5b9c1661936a54a6101 Cr-Commit-Position: refs/heads/master@{#34534}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use a do { .. } while(false) to be a good macro citizen. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -139 lines) Patch
M test/cctest/compiler/codegen-tester.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/compiler/test-changes-lowering.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/compiler/test-run-calls-to-external-references.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 52 chunks +55 lines, -109 lines 0 comments Download
M test/cctest/compiler/value-helper.h View 1 2 chunks +12 lines, -0 lines 0 comments Download
M test/cctest/wasm/test-run-wasm.cc View 8 chunks +15 lines, -18 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
ahaas
4 years, 9 months ago (2016-03-07 10:03:46 UTC) #1
titzer
https://codereview.chromium.org/1773513002/diff/1/test/cctest/compiler/value-helper.h File test/cctest/compiler/value-helper.h (right): https://codereview.chromium.org/1773513002/diff/1/test/cctest/compiler/value-helper.h#newcode324 test/cctest/compiler/value-helper.h:324: #define CHECK_FLOAT_EQ(lhs, rhs) \ You should use a do ...
4 years, 9 months ago (2016-03-07 10:38:12 UTC) #2
ahaas
On 2016/03/07 at 10:38:12, titzer wrote: > https://codereview.chromium.org/1773513002/diff/1/test/cctest/compiler/value-helper.h > File test/cctest/compiler/value-helper.h (right): > > https://codereview.chromium.org/1773513002/diff/1/test/cctest/compiler/value-helper.h#newcode324 ...
4 years, 9 months ago (2016-03-07 11:59:06 UTC) #3
ahaas
4 years, 9 months ago (2016-03-07 11:59:22 UTC) #4
titzer
lgtm
4 years, 9 months ago (2016-03-07 12:01:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1773513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1773513002/20001
4 years, 9 months ago (2016-03-07 12:13:50 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-07 12:29:13 UTC) #8
commit-bot: I haz the power
4 years, 9 months ago (2016-03-07 12:30:29 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a5d41888493694e7fa49f5b9c1661936a54a6101
Cr-Commit-Position: refs/heads/master@{#34534}

Powered by Google App Engine
This is Rietveld 408576698