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

Issue 2391393003: MIPS64: Fix Word32Compare turbofan operator implementation when comparing signed with unsigned oper… (Closed)

Created:
4 years, 2 months ago by ivica.bogosavljevic
Modified:
4 years, 2 months ago
Reviewers:
Benedikt Meurer, titzer, miran.karic, miran.karic, ahaas
CC:
v8-ports-mips_googlegroups.com, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

MIPS64: Fix Word32Compare turbofan operator implementation when comparing signed with unsigned operand MIPS64 doesn't support Word32 compare instructions. Instead it relies that the values in registers are correctly sign-extended and uses Word64 comparison instead. This behavior is correct in most cases, but doesn't work when comparing signed with unsigned operands. The solution proposed here tries to match a comparison of signed with unsigned operand, and perform Word32Compare simulation only in those cases. Unfortunately, the solution is not complete because it might skip cases where Word32 compare simulation is needed, so basically it is a hack. BUG= TEST=mjsunit/compiler/uint32 Committed: https://crrev.com/7499d92d7f4074c3ad7461ea70cbf896e30e6866 Cr-Commit-Position: refs/heads/master@{#40398}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplify ToSimulateWord32Compare #

Total comments: 3

Patch Set 3 : Add runtime checks to make sure optimized compare always works #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -6 lines) Patch
M src/compiler/mips64/code-generator-mips64.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-codes-mips64.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 2 1 chunk +80 lines, -1 line 0 comments Download
M test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc View 1 2 1 chunk +34 lines, -4 lines 0 comments Download

Messages

Total messages: 34 (16 generated)
ivica.bogosavljevic
PTAL This is a workaround for implementation of Word32Compare for MIPS64. MIPS64 doesn't have a ...
4 years, 2 months ago (2016-10-06 09:24:28 UTC) #2
miran.karic
Looks like a good solution to me. https://codereview.chromium.org/2391393003/diff/1/src/compiler/mips64/instruction-selector-mips64.cc File src/compiler/mips64/instruction-selector-mips64.cc (right): https://codereview.chromium.org/2391393003/diff/1/src/compiler/mips64/instruction-selector-mips64.cc#newcode1868 src/compiler/mips64/instruction-selector-mips64.cc:1868: return (leftUnsigned ...
4 years, 2 months ago (2016-10-06 10:24:21 UTC) #4
ivica.bogosavljevic
Reminder...
4 years, 2 months ago (2016-10-11 07:33:34 UTC) #6
ahaas
https://codereview.chromium.org/2391393003/diff/1/src/compiler/mips64/instruction-selector-mips64.cc File src/compiler/mips64/instruction-selector-mips64.cc (right): https://codereview.chromium.org/2391393003/diff/1/src/compiler/mips64/instruction-selector-mips64.cc#newcode1861 src/compiler/mips64/instruction-selector-mips64.cc:1861: bool ToSimulateWord32Compare(Node* node) { I think you could even ...
4 years, 2 months ago (2016-10-11 09:24:58 UTC) #7
ivica.bogosavljevic
PTAL
4 years, 2 months ago (2016-10-12 14:58:33 UTC) #8
miran.karic
I think Ivica wants more answers to his first question (https://codereview.chromium.org/2391393003/#msg2) > I need your ...
4 years, 2 months ago (2016-10-13 08:00:24 UTC) #9
ahaas
On 2016/10/13 at 08:00:24, Miran.Karic wrote: > I think Ivica wants more answers to his ...
4 years, 2 months ago (2016-10-13 08:09:45 UTC) #10
ahaas
https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc File src/compiler/mips64/instruction-selector-mips64.cc (right): https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc#newcode1853 src/compiler/mips64/instruction-selector-mips64.cc:1853: } else { I think you also have to ...
4 years, 2 months ago (2016-10-13 08:10:54 UTC) #11
ivica.bogosavljevic
https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc File src/compiler/mips64/instruction-selector-mips64.cc (right): https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc#newcode1853 src/compiler/mips64/instruction-selector-mips64.cc:1853: } else { On 2016/10/13 08:10:54, ahaas wrote: > ...
4 years, 2 months ago (2016-10-14 08:16:40 UTC) #12
ahaas
On 2016/10/14 at 08:16:40, ivica.bogosavljevic wrote: > https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc > File src/compiler/mips64/instruction-selector-mips64.cc (right): > > https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc#newcode1853 ...
4 years, 2 months ago (2016-10-14 08:17:30 UTC) #13
miran.karic
lgtm
4 years, 2 months ago (2016-10-14 08:57:10 UTC) #15
ivica.bogosavljevic
On 2016/10/14 08:17:30, ahaas wrote: > On 2016/10/14 at 08:16:40, ivica.bogosavljevic wrote: > > > ...
4 years, 2 months ago (2016-10-14 09:04:53 UTC) #16
titzer
https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc File src/compiler/mips64/instruction-selector-mips64.cc (right): https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc#newcode1853 src/compiler/mips64/instruction-selector-mips64.cc:1853: } else { On 2016/10/14 08:16:40, ivica.bogosavljevic wrote: > ...
4 years, 2 months ago (2016-10-15 10:45:33 UTC) #22
ivica.bogosavljevic
On 2016/10/15 10:45:33, titzer wrote: > https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc > File src/compiler/mips64/instruction-selector-mips64.cc (right): > > https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc#newcode1853 > ...
4 years, 2 months ago (2016-10-18 09:39:36 UTC) #23
titzer
On 2016/10/18 09:39:36, ivica.bogosavljevic wrote: > On 2016/10/15 10:45:33, titzer wrote: > > > https://codereview.chromium.org/2391393003/diff/20001/src/compiler/mips64/instruction-selector-mips64.cc ...
4 years, 2 months ago (2016-10-18 09:44:13 UTC) #24
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/2391393003/40001
4 years, 2 months ago (2016-10-18 12:10:55 UTC) #31
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-18 12:13:38 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-10-18 12:14:05 UTC) #34
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7499d92d7f4074c3ad7461ea70cbf896e30e6866
Cr-Commit-Position: refs/heads/master@{#40398}

Powered by Google App Engine
This is Rietveld 408576698