Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e0dc16

Browse filesBrowse files
richardlauRafaelGSS
authored andcommitted
deps: V8: cherry-pick aa0b288f87cc
Original commit message: PPC/S390: [wasm] Fix jump table offset when patching ... need to make sure patching of target occurs at the correct spot based on what `EmitFarJumpSlot` emits. Also mask the branch offset in PPC64 EmitJumpSlot to match `Assembler::b()`. Change-Id: I5a8079d0079d8ad427034761d42c90b64d5746dd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7642190 Reviewed-by: John <junyan1@ibm.com> Commit-Queue: Milad Farazmand <mfarazma@ibm.com> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#105646} Refs: v8/v8@aa0b288 PR-URL: #61898 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> (cherry picked from commit ec508dd)
1 parent 8c1f7ad commit 5e0dc16
Copy full SHA for 5e0dc16

2 files changed

+7-4Lines changed: 7 additions & 4 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.7',
41+
'v8_embedder_string': '-node.8',
4242

4343
##### V8 defaults for Node.js #####
4444

Collapse file

‎deps/v8/src/wasm/jump-table-assembler.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/wasm/jump-table-assembler.cc
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ void JumpTableAssembler::EmitFarJumpSlot(Address target) {
426426
// static
427427
void JumpTableAssembler::PatchFarJumpSlot(WritableJitAllocation& jit_allocation,
428428
Address slot, Address target) {
429-
Address target_addr = slot + 8;
429+
// See {EmitFarJumpSlot} for the offset of the target.
430+
Address target_addr = slot + kFarJumpTableSlotSize - kSystemPointerSize;
430431
jit_allocation.WriteValue(target_addr, target, kRelaxedStore);
431432
}
432433

@@ -636,7 +637,7 @@ bool JumpTableAssembler::EmitJumpSlot(Address target) {
636637

637638
CHECK_EQ(0, relative_target & (kAAMask | kLKMask));
638639
// The jump table is updated live, so the write has to be atomic.
639-
emit<uint32_t>(inst[0] | relative_target, kRelaxedStore);
640+
emit<uint32_t>(inst[0] | (relative_target & kImm26Mask), kRelaxedStore);
640641
return true;
641642
}
642643

@@ -671,7 +672,9 @@ void JumpTableAssembler::EmitFarJumpSlot(Address target) {
671672
// static
672673
void JumpTableAssembler::PatchFarJumpSlot(WritableJitAllocation& jit_allocation,
673674
Address slot, Address target) {
674-
Address target_addr = slot + kFarJumpTableSlotSize - 8;
675+
// See {EmitFarJumpSlot} for the offset of the target.
676+
Address target_addr =
677+
slot + kFarJumpTableSlotSize - (2 * kInstrSize) - kSystemPointerSize;
675678
jit_allocation.WriteValue(target_addr, target, kRelaxedStore);
676679
}
677680

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.