Commit 6d62edea authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv64] Port Extract common code to MaybeOptimizeCodeOrTailCallOptimizedCode

Port 89ea44bf

Change-Id: I2fb42032f174f1e8af4903c663f97ea27ab3600f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3467157Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79166}
parent 2b63d5d0
......@@ -1475,27 +1475,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ Branch(&after_stack_check_interrupt);
__ bind(&has_optimized_code_or_marker);
Label maybe_has_optimized_code;
// Check if optimized code marker is available
__ And(scratch, optimization_state,
FeedbackVector::OptimizationTierBits::kMask);
__ Branch(&maybe_has_optimized_code, ne, scratch, Operand(zero_reg),
Label::Distance::kNear);
Register optimization_marker = optimization_state;
__ DecodeField<FeedbackVector::OptimizationMarkerBits>(optimization_marker);
MaybeOptimizeCode(masm, feedback_vector, optimization_marker);
// Fall through if there's no runnable optimized code.
__ Branch(&not_optimized);
__ bind(&maybe_has_optimized_code);
Register optimized_code_entry = optimization_state;
__ LoadAnyTaggedField(
optimization_marker,
FieldMemOperand(feedback_vector,
FeedbackVector::kMaybeOptimizedCodeOffset));
TailCallOptimizedCodeSlot(masm, optimized_code_entry, t4, a5);
MaybeOptimizeCodeOrTailCallOptimizedCodeSlot(masm, optimization_state,
feedback_vector);
__ bind(&is_baseline);
{
// Load the feedback vector from the closure.
......
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