Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.12',
'v8_embedder_string': '-node.13',

##### V8 defaults for Node.js #####

Expand Down
9 changes: 6 additions & 3 deletions deps/v8/src/wasm/jump-table-assembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ void JumpTableAssembler::EmitFarJumpSlot(Address target) {
// static
void JumpTableAssembler::PatchFarJumpSlot(WritableJitAllocation& jit_allocation,
Address slot, Address target) {
Address target_addr = slot + 8;
// See {EmitFarJumpSlot} for the offset of the target.
Address target_addr = slot + kFarJumpTableSlotSize - kSystemPointerSize;
jit_allocation.WriteValue(target_addr, target, kRelaxedStore);
}

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

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

Expand Down Expand Up @@ -671,7 +672,9 @@ void JumpTableAssembler::EmitFarJumpSlot(Address target) {
// static
void JumpTableAssembler::PatchFarJumpSlot(WritableJitAllocation& jit_allocation,
Address slot, Address target) {
Address target_addr = slot + kFarJumpTableSlotSize - 8;
// See {EmitFarJumpSlot} for the offset of the target.
Address target_addr =
slot + kFarJumpTableSlotSize - (2 * kInstrSize) - kSystemPointerSize;
jit_allocation.WriteValue(target_addr, target, kRelaxedStore);
}

Expand Down
Loading