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

Issue 2045943002: [compiler] [wasm] Introduce Word32/64ReverseBytes as TF Optional Opcode (Closed)

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

Description

[compiler] [wasm] Introduce Word32/64ReverseBytes as TF Optional Opcode This commit fixes wasm little-endian load issue on big-endian platform by introducing reverse byte operation immediately after a load. R=bmeurer@chromium.org, titzer@chromium.org BUG= Committed: https://crrev.com/77c9cb8341e85e8e2f1b65d5004ac90e7dc060ea Cr-Commit-Position: refs/heads/master@{#38183}

Patch Set 1 #

Patch Set 2 : change endianess on store as well #

Patch Set 3 : update on store and some optimization on load #

Total comments: 2

Patch Set 4 : rebase on master and fix #

Patch Set 5 : rebase again #

Patch Set 6 : fix result type mismatch #

Patch Set 7 : Use ByteReverse in simulator #

Total comments: 4

Patch Set 8 : remove word 16 operator #

Patch Set 9 : implement int64 lowing test #

Patch Set 10 : implement machops tests #

Total comments: 8

Patch Set 11 : fix according to ahaas #

Total comments: 6

Patch Set 12 : fix nits and rebase on master #

Patch Set 13 : fix typo #

Total comments: 1

Patch Set 14 : Fix according to titzer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -79 lines) Patch
M src/compiler/arm/instruction-selector-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 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 11 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 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M src/compiler/int64-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -7 lines 0 comments Download
M src/compiler/machine-operator.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 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 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/ppc/instruction-selector-ppc.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/s390/code-generator-s390.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +28 lines, -0 lines 0 comments Download
M src/compiler/s390/instruction-codes-s390.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M src/compiler/s390/instruction-scheduler-s390.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M src/compiler/s390/instruction-selector-s390.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +36 lines, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +74 lines, -54 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/x87/instruction-selector-x87.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/s390/assembler-s390.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M src/s390/assembler-s390.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M src/s390/disasm-s390.cc View 1 2 3 4 3 chunks +24 lines, -0 lines 0 comments Download
M src/s390/simulator-s390.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M src/s390/simulator-s390.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +57 lines, -18 lines 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +34 lines, -0 lines 0 comments Download
M test/unittests/compiler/int64-lowering-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (18 generated)
john.yan
PTAL
4 years, 6 months ago (2016-06-07 14:25:14 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2045943002/1
4 years, 6 months ago (2016-06-07 14:25:27 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 14:54:59 UTC) #5
titzer
On 2016/06/07 14:54:59, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 6 months ago (2016-06-07 16:33:27 UTC) #6
john.yan
On 2016/06/07 16:33:27, titzer wrote: > On 2016/06/07 14:54:59, commit-bot: I haz the power wrote: ...
4 years, 6 months ago (2016-06-07 17:40:24 UTC) #7
Benedikt Meurer
SGTM
4 years, 6 months ago (2016-06-07 17:51:36 UTC) #8
ivica.bogosavljevic
Hi John! I am the autor of https://codereview.chromium.org/2034093002/. Please reuse the parts from BuildChangeEndianness (and ...
4 years, 6 months ago (2016-06-08 10:27:15 UTC) #9
ivica.bogosavljevic
4 years, 6 months ago (2016-06-08 11:17:43 UTC) #11
john.yan
On 2016/06/08 10:27:15, ivica.bogosavljevic wrote: > Hi John! > > I am the autor of ...
4 years, 6 months ago (2016-06-08 13:22:54 UTC) #12
ivica.bogosavljevic
https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc#newcode2787 src/compiler/wasm-compiler.cc:2787: load); 32 bit architectures don't have Word64ReverseByte instructions. I ...
4 years, 5 months ago (2016-06-29 14:21:59 UTC) #13
ivica.bogosavljevic
https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc#newcode2768 src/compiler/wasm-compiler.cc:2768: switch (numberOfBytes) { You are missing here proper handling ...
4 years, 5 months ago (2016-07-06 11:28:48 UTC) #14
john.yan
On 2016/07/06 11:28:48, ivica.bogosavljevic wrote: > https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc#newcode2768 > ...
4 years, 5 months ago (2016-07-06 14:35:17 UTC) #15
john.yan
On 2016/07/06 11:28:48, ivica.bogosavljevic wrote: > https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2045943002/diff/40001/src/compiler/wasm-compiler.cc#newcode2768 > ...
4 years, 5 months ago (2016-07-19 18:59:16 UTC) #16
john.yan
@ahaas@chromium.org Would you please take a look at this CL? Thanks a lot!
4 years, 4 months ago (2016-07-26 19:28:06 UTC) #23
ahaas
I think you should add tests for this CL. https://codereview.chromium.org/2045943002/diff/120001/src/compiler/machine-operator.h File src/compiler/machine-operator.h (right): https://codereview.chromium.org/2045943002/diff/120001/src/compiler/machine-operator.h#newcode630 src/compiler/machine-operator.h:630: ...
4 years, 4 months ago (2016-07-27 01:31:15 UTC) #24
john.yan
https://codereview.chromium.org/2045943002/diff/120001/src/compiler/machine-operator.h File src/compiler/machine-operator.h (right): https://codereview.chromium.org/2045943002/diff/120001/src/compiler/machine-operator.h#newcode630 src/compiler/machine-operator.h:630: bool Is16() const { return word() == MachineRepresentation::kWord16; } ...
4 years, 4 months ago (2016-07-27 18:18:19 UTC) #26
john.yan
On 2016/07/27 01:31:15, ahaas wrote: > I think you should add tests for this CL. ...
4 years, 4 months ago (2016-07-27 18:23:26 UTC) #27
ahaas
On 2016/07/27 at 18:23:26, jyan wrote: > On 2016/07/27 01:31:15, ahaas wrote: > > I ...
4 years, 4 months ago (2016-07-27 19:35:53 UTC) #28
john.yan
On 2016/07/27 19:35:53, ahaas wrote: > On 2016/07/27 at 18:23:26, jyan wrote: > > On ...
4 years, 4 months ago (2016-07-28 04:15:13 UTC) #29
ivica.bogosavljevic
On 2016/07/28 04:15:13, john.yan wrote: > On 2016/07/27 19:35:53, ahaas wrote: > > On 2016/07/27 ...
4 years, 4 months ago (2016-07-28 12:19:10 UTC) #30
ivica.bogosavljevic
4 years, 4 months ago (2016-07-28 12:19:20 UTC) #31
john.yan
On 2016/07/28 12:19:10, ivica.bogosavljevic wrote: > On 2016/07/28 04:15:13, john.yan wrote: > > On 2016/07/27 ...
4 years, 4 months ago (2016-07-28 13:37:45 UTC) #32
ahaas
Sorry that I mixed up test-run-wasm.cc and test-run-machops.cc. https://codereview.chromium.org/2045943002/diff/200001/src/compiler/int64-lowering.cc File src/compiler/int64-lowering.cc (right): https://codereview.chromium.org/2045943002/diff/200001/src/compiler/int64-lowering.cc#newcode753 src/compiler/int64-lowering.cc:753: DCHECK(machine()->Word64ReverseBytes().IsSupported()); ...
4 years, 4 months ago (2016-07-28 14:12:59 UTC) #33
john.yan
All places are now fixed. PTAL. Thanks! https://codereview.chromium.org/2045943002/diff/200001/src/compiler/int64-lowering.cc File src/compiler/int64-lowering.cc (right): https://codereview.chromium.org/2045943002/diff/200001/src/compiler/int64-lowering.cc#newcode753 src/compiler/int64-lowering.cc:753: DCHECK(machine()->Word64ReverseBytes().IsSupported()); On ...
4 years, 4 months ago (2016-07-28 18:03:50 UTC) #34
ahaas
lgtm with nits, I did not look at the S390 code though. https://codereview.chromium.org/2045943002/diff/220001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc ...
4 years, 4 months ago (2016-07-29 04:15:18 UTC) #35
john.yan
Fixed. Thank you! https://codereview.chromium.org/2045943002/diff/220001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2045943002/diff/220001/src/compiler/wasm-compiler.cc#newcode1035 src/compiler/wasm-compiler.cc:1035: switch (memtype.representation()) { On 2016/07/29 04:15:18, ...
4 years, 4 months ago (2016-07-29 17:12:03 UTC) #36
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/2045943002/260001
4 years, 4 months ago (2016-07-29 17:18:00 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/20581)
4 years, 4 months ago (2016-07-29 17:21:09 UTC) #41
titzer
lgtm with nit https://codereview.chromium.org/2045943002/diff/260001/src/compiler/int64-lowering.cc File src/compiler/int64-lowering.cc (right): https://codereview.chromium.org/2045943002/diff/260001/src/compiler/int64-lowering.cc#newcode782 src/compiler/int64-lowering.cc:782: DCHECK(machine()->Word32ReverseBytes().IsSupported()); Can you remove this DCHECK? ...
4 years, 4 months ago (2016-07-29 18:21:54 UTC) #42
john.yan
On 2016/07/29 18:21:54, titzer wrote: > lgtm with nit > > https://codereview.chromium.org/2045943002/diff/260001/src/compiler/int64-lowering.cc > File src/compiler/int64-lowering.cc ...
4 years, 4 months ago (2016-07-29 19:08:36 UTC) #44
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/2045943002/280001
4 years, 4 months ago (2016-07-29 19:09:47 UTC) #47
commit-bot: I haz the power
Committed patchset #14 (id:280001)
4 years, 4 months ago (2016-07-29 19:32:04 UTC) #49
commit-bot: I haz the power
4 years, 4 months ago (2016-07-29 19:33:40 UTC) #51
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/77c9cb8341e85e8e2f1b65d5004ac90e7dc060ea
Cr-Commit-Position: refs/heads/master@{#38183}

Powered by Google App Engine
This is Rietveld 408576698