Commit 77306a03 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc64: [baseline] implement AddToInterruptBudgetAndJumpIfNotExceeded

Change-Id: If7588aed75d12a12d5a125f95ccc3db9743e4a00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596170Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80061}
parent d7be7f15
......@@ -534,12 +534,48 @@ void BaselineAssembler::StoreTaggedFieldNoWriteBarrier(Register target,
void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
int32_t weight, Label* skip_interrupt_label) {
UNIMPLEMENTED();
ASM_CODE_COMMENT(masm_);
ScratchRegisterScope scratch_scope(this);
Register feedback_cell = scratch_scope.AcquireScratch();
LoadFunction(feedback_cell);
LoadTaggedPointerField(feedback_cell, feedback_cell,
JSFunction::kFeedbackCellOffset);
Register interrupt_budget = scratch_scope.AcquireScratch();
__ LoadU32(
interrupt_budget,
FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset), r0);
// Remember to set flags as part of the add!
__ AddS32(interrupt_budget, interrupt_budget, Operand(weight), r0);
__ StoreU32(
interrupt_budget,
FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset), r0);
if (skip_interrupt_label) {
// Use compare flags set by add
DCHECK_LT(weight, 0);
__ b(ge, skip_interrupt_label);
}
}
void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
Register weight, Label* skip_interrupt_label) {
UNIMPLEMENTED();
ASM_CODE_COMMENT(masm_);
ScratchRegisterScope scratch_scope(this);
Register feedback_cell = scratch_scope.AcquireScratch();
LoadFunction(feedback_cell);
LoadTaggedPointerField(feedback_cell, feedback_cell,
JSFunction::kFeedbackCellOffset);
Register interrupt_budget = scratch_scope.AcquireScratch();
__ LoadU32(
interrupt_budget,
FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset), r0);
// Remember to set flags as part of the add!
__ AddS32(interrupt_budget, interrupt_budget, weight);
__ StoreU32(
interrupt_budget,
FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset), r0);
if (skip_interrupt_label) __ b(ge, skip_interrupt_label);
}
void BaselineAssembler::AddSmi(Register lhs, Smi rhs) { UNIMPLEMENTED(); }
......
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