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

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed)

Created:
4 years, 9 months ago by ivica.bogosavljevic
Modified:
4 years, 7 months ago
Reviewers:
ilija.pavlovic, Paul Lind, balazs.kilvady, miran.karic, Marija Antic, titzer, gergely.kis.imgtec, akos.palfi.imgtec
CC:
v8-reviews_googlegroups.com, v8-arm-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement optional turbofan UnalignedLoad and UnalignedStore operators Implement optional turbofan UnalignedLoad and UnalignedStore operators used to support unaligned memory accesses in WASM. These operators must be used on architectures that do not support missalinged memory access. Architectures that do support unaligned access don't need to implement these operators. In that case regular Load and Store turbofan operators are used. BUG=mjsunit/wasm/module-memory

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase master, makse UnalignedLoad and UnalignedStore optional operators #

Patch Set 3 : Blank implementation for other architectures #

Patch Set 4 : Implement MIPS64 UnalignedLoad and UnalignedStore operators #

Patch Set 5 : Rebase master #

Patch Set 6 : Fix failures in cctest/test-run-wasm-64/Run_Wasm_LoadStoreI64_sx due to missing implementation of U… #

Total comments: 4

Patch Set 7 : Fix review remarks #

Total comments: 1

Patch Set 8 : Addressed code review remarks #

Patch Set 9 : Unaligned access simulate using load/shift/or and store/shift/and #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1954 lines, -102 lines) Patch
M src/compiler/arm/instruction-selector-arm.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M src/compiler/int64-lowering.cc View 1 2 3 4 5 6 7 8 3 chunks +40 lines, -11 lines 0 comments Download
M src/compiler/machine-operator.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -1 line 0 comments Download
M src/compiler/machine-operator.cc View 1 2 3 4 5 6 7 8 6 chunks +57 lines, -0 lines 0 comments Download
M src/compiler/machine-operator-reducer.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/machine-operator-reducer.cc View 1 2 3 4 5 6 7 2 chunks +15 lines, -2 lines 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
M src/compiler/mips/instruction-codes-mips.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 1 2 3 4 5 6 7 8 3 chunks +199 lines, -0 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 3 4 5 6 7 8 1 chunk +45 lines, -1 line 0 comments Download
M src/compiler/mips64/instruction-codes-mips64.h View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 2 3 4 5 6 7 8 2 chunks +102 lines, -1 line 0 comments Download
M src/compiler/node-matchers.h View 1 2 3 4 5 6 7 8 2 chunks +32 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/ppc/instruction-selector-ppc.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/s390/instruction-selector-s390.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/wasm-compiler.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -2 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 8 4 chunks +173 lines, -9 lines 2 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/x87/instruction-selector-x87.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M src/mips/assembler-mips.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M src/mips/assembler-mips.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M src/mips/constants-mips.h View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 4 5 6 7 8 1 chunk +187 lines, -4 lines 0 comments Download
M src/mips/simulator-mips.cc View 1 8 chunks +8 lines, -8 lines 0 comments Download
M src/mips64/assembler-mips64.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M src/mips64/assembler-mips64.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -0 lines 0 comments Download
M src/mips64/constants-mips64.h View 1 2 3 3 chunks +28 lines, -6 lines 0 comments Download
M src/mips64/macro-assembler-mips64.h View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -2 lines 0 comments Download
M src/mips64/macro-assembler-mips64.cc View 1 2 3 4 5 6 7 8 3 chunks +216 lines, -32 lines 0 comments Download
M src/mips64/simulator-mips64.cc View 1 2 3 4 5 6 7 8 15 chunks +60 lines, -15 lines 0 comments Download
M src/wasm/ast-decoder.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/test-macro-assembler-mips.cc View 1 2 3 4 5 6 7 8 3 chunks +249 lines, -0 lines 0 comments Download
M test/cctest/test-macro-assembler-mips64.cc View 1 2 3 4 5 6 7 8 2 chunks +349 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (6 generated)
ivica.bogosavljevic
PTAL
4 years, 9 months ago (2016-03-11 16:45:04 UTC) #3
ivica.bogosavljevic
PTAL
4 years, 9 months ago (2016-03-11 16:45:06 UTC) #4
Paul Lind
This looks like it's going the right direction to me. However, I wonder if it ...
4 years, 9 months ago (2016-03-12 05:07:46 UTC) #6
ivica.bogosavljevic
PTAL
4 years, 9 months ago (2016-03-16 12:00:57 UTC) #10
ivica.bogosavljevic
4 years, 9 months ago (2016-03-21 15:31:27 UTC) #11
ivica.bogosavljevic
Tested on arm simulator and x64 simulator and no regressions. Tested on MIPS32EL board and ...
4 years, 9 months ago (2016-03-22 14:48:29 UTC) #12
titzer
I agree this is generally the right approach. Thanks for doing this. Some ARM variants ...
4 years, 9 months ago (2016-03-22 15:00:20 UTC) #13
ivica.bogosavljevic
4 years, 9 months ago (2016-03-24 09:37:53 UTC) #14
martyn.capewell
On 2016/03/22 15:00:20, titzer wrote: > Some ARM variants also have unaligned loads/stores, CC'ing. For ...
4 years, 9 months ago (2016-03-24 11:01:25 UTC) #15
ivica.bogosavljevic
Implemented remarks from code review, please have a look!
4 years, 8 months ago (2016-03-28 09:04:40 UTC) #16
titzer
https://codereview.chromium.org/1779713009/diff/100001/src/compiler/machine-operator-reducer.cc File src/compiler/machine-operator-reducer.cc (right): https://codereview.chromium.org/1779713009/diff/100001/src/compiler/machine-operator-reducer.cc#newcode717 src/compiler/machine-operator-reducer.cc:717: Reduction MachineOperatorReducer::ReduceUnalignedStore(Node* node) { On 2016/03/22 15:00:20, titzer wrote: ...
4 years, 8 months ago (2016-03-29 08:42:49 UTC) #17
ivica.bogosavljevic
Removed duplicate code in int64-lowering and machine-code-reducer. PTAL
4 years, 8 months ago (2016-03-30 14:18:46 UTC) #18
ivica.bogosavljevic
Reminder :)
4 years, 8 months ago (2016-04-04 14:38:53 UTC) #19
titzer
Now with a bit more perspective on this CL, I think we can do this ...
4 years, 8 months ago (2016-04-04 14:57:30 UTC) #20
ivica.bogosavljevic
On 2016/04/04 14:57:30, titzer wrote: > Now with a bit more perspective on this CL, ...
4 years, 8 months ago (2016-04-07 07:45:36 UTC) #21
ivica.bogosavljevic
4 years, 8 months ago (2016-04-07 07:49:33 UTC) #22
titzer
On 2016/04/07 07:45:36, ivica.bogosavljevic wrote: > On 2016/04/04 14:57:30, titzer wrote: > > Now with ...
4 years, 8 months ago (2016-04-08 13:21:11 UTC) #23
ivica.bogosavljevic
PTAL The latest patch implements unaligned access differently. Instead of having a special UnalignedLoad and ...
4 years, 8 months ago (2016-04-20 10:04:02 UTC) #24
titzer
https://codereview.chromium.org/1779713009/diff/160001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/1779713009/diff/160001/src/compiler/wasm-compiler.cc#newcode2419 src/compiler/wasm-compiler.cc:2419: for (int i = 0; i < numberOfLoads; i++) ...
4 years, 8 months ago (2016-04-20 12:59:26 UTC) #25
titzer
On 2016/04/20 10:04:02, ivica.bogosavljevic wrote: > PTAL > > The latest patch implements unaligned access ...
4 years, 8 months ago (2016-04-20 13:05:41 UTC) #26
ivica.bogosavljevic
4 years, 7 months ago (2016-05-04 11:16:20 UTC) #27
This Code Review is split into separate reviews and moved.

The architecture independent part of emulating unaligned access in WASM is
available here:

https://codereview.chromium.org/1928513002/

Powered by Google App Engine
This is Rietveld 408576698