Commit 0fa7161f authored by Liu Yu's avatar Liu Yu Committed by Commit Bot

[mips][interpreter] Encode BytecodeSizes as uint8_t for better cache locality

Port: 3965dcd5

Change-Id: I84064ebcffde490a44a341f0e65a3715746ca693
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658655Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72419}
parent f09c3831
......@@ -912,7 +912,7 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ Addu(scratch2, bytecode_array, bytecode_offset);
__ lbu(bytecode, MemOperand(scratch2));
__ Addu(bytecode_size_table, bytecode_size_table,
Operand(kIntSize * interpreter::Bytecodes::kBytecodeCount));
Operand(kByteSize * interpreter::Bytecodes::kBytecodeCount));
__ jmp(&process_bytecode);
__ bind(&extra_wide);
......@@ -921,7 +921,7 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ Addu(scratch2, bytecode_array, bytecode_offset);
__ lbu(bytecode, MemOperand(scratch2));
__ Addu(bytecode_size_table, bytecode_size_table,
Operand(2 * kIntSize * interpreter::Bytecodes::kBytecodeCount));
Operand(2 * kByteSize * interpreter::Bytecodes::kBytecodeCount));
__ bind(&process_bytecode);
......@@ -944,8 +944,8 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ bind(&not_jump_loop);
// Otherwise, load the size of the current bytecode and advance the offset.
__ Lsa(scratch2, bytecode_size_table, bytecode, 2);
__ lw(scratch2, MemOperand(scratch2));
__ Addu(scratch2, bytecode_size_table, bytecode);
__ lb(scratch2, MemOperand(scratch2));
__ Addu(bytecode_offset, bytecode_offset, scratch2);
__ bind(&end);
......
......@@ -928,7 +928,7 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ Daddu(scratch2, bytecode_array, bytecode_offset);
__ Lbu(bytecode, MemOperand(scratch2));
__ Daddu(bytecode_size_table, bytecode_size_table,
Operand(kIntSize * interpreter::Bytecodes::kBytecodeCount));
Operand(kByteSize * interpreter::Bytecodes::kBytecodeCount));
__ jmp(&process_bytecode);
__ bind(&extra_wide);
......@@ -937,7 +937,7 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ Daddu(scratch2, bytecode_array, bytecode_offset);
__ Lbu(bytecode, MemOperand(scratch2));
__ Daddu(bytecode_size_table, bytecode_size_table,
Operand(2 * kIntSize * interpreter::Bytecodes::kBytecodeCount));
Operand(2 * kByteSize * interpreter::Bytecodes::kBytecodeCount));
__ bind(&process_bytecode);
......@@ -960,8 +960,8 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
__ bind(&not_jump_loop);
// Otherwise, load the size of the current bytecode and advance the offset.
__ Dlsa(scratch2, bytecode_size_table, bytecode, 2);
__ Lw(scratch2, MemOperand(scratch2));
__ Daddu(scratch2, bytecode_size_table, bytecode);
__ Lb(scratch2, MemOperand(scratch2));
__ Daddu(bytecode_offset, bytecode_offset, scratch2);
__ bind(&end);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment