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

Issue 2301833004: [wasm] Trap handling: ProtectedLoad instruction (Closed)

Created:
4 years, 3 months ago by Eric Holk
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com, Michael Hablich
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Trap handling: ProtectedLoad instruction This CL introduces a ProtectedLoad instruction with is needed for out of bounds trap handling. ProtectedLoad behaves like a regular load, but it takes a context and source position parameter as well. These are used by an out of line code fragment to generate code to throw a JS exception for an out of bounds memory reference in Wasm. These changes a cleaned up subset of https://codereview.chromium.org/2148743004/ The rest of this feature will follow in future CLs. This includes a table mapping memory instructions to landing pads as well as the actual signal handler. BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277 Committed: https://crrev.com/0027218e1a0021af8729ed0d6c169d45b548f853 Cr-Commit-Position: refs/heads/master@{#39318}

Patch Set 1 #

Patch Set 2 : Removing unrelated changes #

Total comments: 20

Patch Set 3 : Manual #

Total comments: 9

Patch Set 4 : Code review feedback #

Patch Set 5 : Add VisitProtectedLoad stubs for other architectures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -10 lines) Patch
M src/compiler/arm/instruction-selector-arm.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.cc View 3 chunks +22 lines, -1 line 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ppc/instruction-selector-ppc.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/s390/instruction-selector-s390.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 1 chunk +14 lines, -3 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 4 chunks +43 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-codes-x64.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/instruction-scheduler-x64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 3 chunks +29 lines, -6 lines 0 comments Download
M src/compiler/x87/instruction-selector-x87.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
Eric Holk
4 years, 3 months ago (2016-09-01 19:27:24 UTC) #2
Mircea Trofin
https://codereview.chromium.org/2301833004/diff/20001/src/compiler/machine-operator.h File src/compiler/machine-operator.h (right): https://codereview.chromium.org/2301833004/diff/20001/src/compiler/machine-operator.h#newcode44 src/compiler/machine-operator.h:44: typedef LoadRepresentation ProtectedLoadRepresentation; What's the value of the typedef ...
4 years, 3 months ago (2016-09-02 04:05:45 UTC) #3
Eric Holk
https://codereview.chromium.org/2301833004/diff/20001/src/compiler/machine-operator.h File src/compiler/machine-operator.h (right): https://codereview.chromium.org/2301833004/diff/20001/src/compiler/machine-operator.h#newcode44 src/compiler/machine-operator.h:44: typedef LoadRepresentation ProtectedLoadRepresentation; On 2016/09/02 04:05:45, Mircea Trofin wrote: ...
4 years, 3 months ago (2016-09-02 20:05:32 UTC) #4
titzer
lgtm other than nits https://codereview.chromium.org/2301833004/diff/40001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2301833004/diff/40001/src/compiler/wasm-compiler.cc#newcode2771 src/compiler/wasm-compiler.cc:2771: if (!FLAG_wasm_trap_handler) { Flip sense ...
4 years, 3 months ago (2016-09-08 17:06:36 UTC) #5
Eric Holk
https://codereview.chromium.org/2301833004/diff/40001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2301833004/diff/40001/src/compiler/wasm-compiler.cc#newcode2771 src/compiler/wasm-compiler.cc:2771: if (!FLAG_wasm_trap_handler) { On 2016/09/08 17:06:35, titzer wrote: > ...
4 years, 3 months ago (2016-09-08 21:11:56 UTC) #6
Eric Holk
ptal I got a bunch of trybot failures for the non-x64 architectures. I fixed this ...
4 years, 3 months ago (2016-09-08 23:13:14 UTC) #15
titzer
https://codereview.chromium.org/2301833004/diff/40001/src/compiler/x64/code-generator-x64.cc File src/compiler/x64/code-generator-x64.cc (right): https://codereview.chromium.org/2301833004/diff/40001/src/compiler/x64/code-generator-x64.cc#newcode1900 src/compiler/x64/code-generator-x64.cc:1900: bool needs_frame = !frame_access_state()->has_frame(); On 2016/09/08 21:11:56, Eric Holk ...
4 years, 3 months ago (2016-09-09 15:36:56 UTC) #16
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/2301833004/80001
4 years, 3 months ago (2016-09-09 17:33:18 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-09 17:40:44 UTC) #20
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 17:41:19 UTC) #22
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0027218e1a0021af8729ed0d6c169d45b548f853
Cr-Commit-Position: refs/heads/master@{#39318}

Powered by Google App Engine
This is Rietveld 408576698