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

s390x: [baseline] implement remain functions for Assm

Change-Id: I4f52eff47f32807f6704cbee873fbc2e0a2cd1c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3417916Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78792}
parent fc23bc1d
...@@ -318,7 +318,8 @@ template <typename Arg> ...@@ -318,7 +318,8 @@ template <typename Arg>
inline Register ToRegister(BaselineAssembler* basm, inline Register ToRegister(BaselineAssembler* basm,
BaselineAssembler::ScratchRegisterScope* scope, BaselineAssembler::ScratchRegisterScope* scope,
Arg arg) { Arg arg) {
UNIMPLEMENTED(); Register reg = scope->AcquireScratch();
basm->Move(reg, arg);
return reg; return reg;
} }
inline Register ToRegister(BaselineAssembler* basm, inline Register ToRegister(BaselineAssembler* basm,
...@@ -507,7 +508,15 @@ void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded( ...@@ -507,7 +508,15 @@ void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded(
if (skip_interrupt_label) __ b(ge, skip_interrupt_label); 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, void BaselineAssembler::Switch(Register reg, int case_value_base,
Label** labels, int num_labels) { Label** labels, int num_labels) {
...@@ -595,7 +604,8 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) { ...@@ -595,7 +604,8 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator( inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
Register reg) { Register reg) {
UNIMPLEMENTED(); assembler_->masm()->CmpU64(reg, kInterpreterAccumulatorRegister);
assembler_->masm()->Assert(eq, AbortReason::kUnexpectedValue);
} }
} // namespace baseline } // namespace baseline
......
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