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 @@ -42,7 +42,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.25',
'v8_embedder_string': '-node.26',

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

Expand Down
10 changes: 5 additions & 5 deletions deps/v8/src/wasm/jump-table-assembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
}

bool JumpTableAssembler::EmitJumpSlot(Address target) {
intptr_t displacement = target - (pc_ + kJumpTableSlotEntryMarkerSize +
MacroAssembler::kIntraSegmentJmpInstrSize);
if (!is_int32(displacement)) return false;

#ifdef V8_ENABLE_CET_IBT
uint32_t endbr_insn = 0xfa1e0ff3;
uint32_t nop = 0x00401f0f;
Expand All @@ -122,11 +126,7 @@ bool JumpTableAssembler::EmitJumpSlot(Address target) {
emit<uint32_t>(nop, kRelaxedStore);
#endif

intptr_t displacement =
target - (pc_ + MacroAssembler::kIntraSegmentJmpInstrSize);
if (!is_int32(displacement)) return false;

uint8_t inst[kJumpTableSlotSize] = {
uint8_t inst[8] = {
0xe9, 0, 0, 0, 0, // near_jmp displacement
0xcc, 0xcc, 0xcc, // int3 * 3
};
Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/wasm/jump-table-assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ class V8_EXPORT_PRIVATE JumpTableAssembler {
#if V8_TARGET_ARCH_X64
#ifdef V8_ENABLE_CET_IBT
static constexpr int kJumpTableSlotSize = 16;
static constexpr int kJumpTableSlotEntryMarkerSize = 8;
#else // V8_ENABLE_CET_IBT
static constexpr int kJumpTableSlotSize = 8;
static constexpr int kJumpTableSlotEntryMarkerSize = 0;
#endif
static constexpr int kJumpTableLineSize = kJumpTableSlotSize;
static constexpr int kFarJumpTableSlotSize = 16;
Expand Down
Loading