Commit 07ec534d authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc64: [baseline] implement AddSmi

Change-Id: I94f3f02e2214437d8320d31c8be24f41698f136c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3604752Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80156}
parent d8bc4702
......@@ -578,7 +578,15 @@ void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
if (skip_interrupt_label) __ b(ge, skip_interrupt_label);
}
void BaselineAssembler::AddSmi(Register lhs, Smi rhs) { UNIMPLEMENTED(); }
void BaselineAssembler::AddSmi(Register lhs, Smi rhs) {
if (rhs.value() == 0) return;
__ LoadSmiLiteral(r0, rhs);
if (SmiValuesAre31Bits()) {
__ AddS32(lhs, lhs, r0);
} else {
__ AddS64(lhs, lhs, r0);
}
}
void BaselineAssembler::Switch(Register reg, int case_value_base,
Label** labels, int num_labels) {
......
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