Skip to content

Commit

Permalink
Fit the lazycomplizetablesolotsize to constant pool
Browse files Browse the repository at this point in the history
  • Loading branch information
luyahan authored and obycode committed Sep 17, 2020
1 parent cd79fa3 commit eb6602d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wasm/jump-table-assembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index,
Address lazy_compile_target) {
int start = pc_offset();
li(kWasmCompileLazyFuncIndexRegister, func_index); // max. 2 instr
// Jump produces max. 9 instructions (8 for li + 1 for jr)
// Jump produces max. 8 instructions (include constant pool and j)
Jump(lazy_compile_target, RelocInfo::NONE);
int nop_bytes = start + kLazyCompileTableSlotSize - pc_offset();
DCHECK_EQ(nop_bytes % kInstrSize, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/jump-table-assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class V8_EXPORT_PRIVATE JumpTableAssembler : public MacroAssembler {
static constexpr int kJumpTableLineSize = 6 * kInstrSize;
static constexpr int kJumpTableSlotSize = 6 * kInstrSize;
static constexpr int kFarJumpTableSlotSize = 6 * kInstrSize;
static constexpr int kLazyCompileTableSlotSize = 9 * kInstrSize;
static constexpr int kLazyCompileTableSlotSize = 10 * kInstrSize;
#else
#error Unknown architecture.
#endif
Expand Down

0 comments on commit eb6602d

Please sign in to comment.