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

Issue 677433002: Add floor, ceil, round (truncate) instructions for ia32, x64 (if SSE4.1) and (Closed)

Created:
6 years, 2 months ago by sigurds
Modified:
6 years, 1 month ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Add floor, ceil, round (truncate) instructions for ia32, x64 (if SSE4.1) and add floor, ceil, round (truncate and away from zero) for arm64. R=bmeurer@chromium.org, dcarney@chromium.org, mstarzinger@chromium.org, rodolph.perfetta@arm.com TEST=test/mjsunit/asm/math-floor.js,test/mjsunit/asm/math-ceil.js,test/unittest/compiler/js-builtin-reducer-unittest.cc Committed: https://code.google.com/p/v8/source/detail?r=25018

Patch Set 1 #

Patch Set 2 : Add unit tests + fix typo. #

Patch Set 3 : Add cctest. #

Patch Set 4 : Rebase. #

Patch Set 5 : Fix integer overflow. #

Total comments: 14

Patch Set 6 : Addressing comments. #

Patch Set 7 : Recover a lost line. #

Patch Set 8 : ARMv8 32bit support. #

Patch Set 9 : Whitespace. #

Patch Set 10 : Rebase. #

Patch Set 11 : Fix merge glitch #

Patch Set 12 : Whitespace. #

Total comments: 25

Patch Set 13 : Address changes and fix compilation on mac. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+639 lines, -21 lines) Patch
M src/compiler/arm/code-generator-arm.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M src/compiler/arm/instruction-codes-arm.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +49 lines, -4 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M src/compiler/arm64/instruction-codes-arm64.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +33 lines, -5 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-codes-ia32.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +37 lines, -2 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +13 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +30 lines, -0 lines 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +16 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -1 line 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-codes-x64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +36 lines, -1 line 0 comments Download
M test/cctest/compiler/codegen-tester.h View 1 2 3 4 5 6 7 4 chunks +7 lines, -4 lines 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +168 lines, -0 lines 0 comments Download
A test/mjsunit/asm/math-ceil.js View 1 2 3 4 5 6 7 8 1 chunk +38 lines, -0 lines 0 comments Download
A test/mjsunit/asm/math-floor.js View 1 chunk +38 lines, -0 lines 0 comments Download
M test/unittests/compiler/js-builtin-reducer-unittest.cc View 1 2 chunks +76 lines, -2 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
sigurds
bmeurer, mstarzinger: please take a look. dcarney: Please look at code-generator-ia32 and x64. rodolph.perfetta: Please ...
6 years, 2 months ago (2014-10-23 14:32:34 UTC) #5
Rodolph Perfetta (ARM)
code-generator-arm64 is fine.
6 years, 2 months ago (2014-10-24 14:33:03 UTC) #6
sigurds
On 2014/10/24 14:33:03, Rodolph Perfetta (ARM) wrote: > code-generator-arm64 is fine. Thanks, have a good ...
6 years, 2 months ago (2014-10-24 14:45:52 UTC) #7
Benedikt Meurer
https://codereview.chromium.org/677433002/diff/110025/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/677433002/diff/110025/src/compiler/arm/instruction-selector-arm.cc#newcode830 src/compiler/arm/instruction-selector-arm.cc:830: UnsupportedOperator(node); Add TODO for ARMv8. https://codereview.chromium.org/677433002/diff/110025/src/compiler/arm/instruction-selector-arm.cc#newcode835 src/compiler/arm/instruction-selector-arm.cc:835: UnsupportedOperator(node); Add ...
6 years, 1 month ago (2014-10-26 12:48:05 UTC) #8
Benedikt Meurer
Also, how about removing either floor or ceil operator, and express i.e. floor via -ceil(-x)? ...
6 years, 1 month ago (2014-10-26 13:25:06 UTC) #9
dcarney
https://codereview.chromium.org/677433002/diff/110025/src/compiler/ia32/instruction-selector-ia32.cc File src/compiler/ia32/instruction-selector-ia32.cc (right): https://codereview.chromium.org/677433002/diff/110025/src/compiler/ia32/instruction-selector-ia32.cc#newcode599 src/compiler/ia32/instruction-selector-ia32.cc:599: void InstructionSelector::VisitFloat64Floor(Node* node) { should dcheck that sse4.1 is ...
6 years, 1 month ago (2014-10-27 08:15:08 UTC) #10
sigurds
Added ARMv8 32bit support (turbofan). Depends on https://codereview.chromium.org/682643002/ and https://codereview.chromium.org/678313002/ https://codereview.chromium.org/677433002/diff/110025/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/677433002/diff/110025/src/compiler/arm/instruction-selector-arm.cc#newcode830 ...
6 years, 1 month ago (2014-10-28 12:47:23 UTC) #11
Benedikt Meurer
https://codereview.chromium.org/677433002/diff/250001/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/677433002/diff/250001/src/compiler/arm/instruction-selector-arm.cc#newcode842 src/compiler/arm/instruction-selector-arm.cc:842: if (!CpuFeatures::IsSupported(ARMv8)) { I think this should be DCHECK(CpuFeatures::IsSupported(ARMv8)) ...
6 years, 1 month ago (2014-10-30 11:59:14 UTC) #12
Benedikt Meurer
And of course fix MAc compilation.
6 years, 1 month ago (2014-10-30 11:59:48 UTC) #13
sigurds
Thanks for the review, addressed comments, PTALA. https://codereview.chromium.org/677433002/diff/250001/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/677433002/diff/250001/src/compiler/arm/instruction-selector-arm.cc#newcode842 src/compiler/arm/instruction-selector-arm.cc:842: if (!CpuFeatures::IsSupported(ARMv8)) ...
6 years, 1 month ago (2014-10-30 12:18:27 UTC) #14
Benedikt Meurer
LGTM
6 years, 1 month ago (2014-10-30 12:21:30 UTC) #15
sigurds
6 years, 1 month ago (2014-10-30 14:15:51 UTC) #16
Message was sent while issue was closed.
Committed patchset #13 (id:270001) manually as 25018 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698