ppc: [liftoff] implement emit_i64_eqz/set_cond

Change-Id: Idf927a4c8bc5e4751e5e8913fe9912fd44001190
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857854
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74263}
This commit is contained in:
Junliang Yan 2021-04-28 18:06:28 -04:00 committed by Commit Bot
parent 3b2552de14
commit 6e479fb8a7

View File

@ -645,13 +645,28 @@ void LiftoffAssembler::emit_i32_set_cond(LiftoffCondition liftoff_cond,
}
void LiftoffAssembler::emit_i64_eqz(Register dst, LiftoffRegister src) {
bailout(kUnsupportedArchitecture, "emit_i64_eqz");
Label done;
cmpi(src.gp(), Operand(0));
mov(dst, Operand(1));
beq(&done);
mov(dst, Operand::Zero());
bind(&done);
}
void LiftoffAssembler::emit_i64_set_cond(LiftoffCondition liftoff_cond,
Register dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kUnsupportedArchitecture, "emit_i64_set_cond");
bool use_signed = liftoff::UseSignedOp(liftoff_cond);
if (use_signed) {
cmp(lhs.gp(), rhs.gp());
} else {
cmpl(lhs.gp(), rhs.gp());
}
Label done;
mov(dst, Operand(1));
b(liftoff::ToCondition(liftoff_cond), &done);
mov(dst, Operand::Zero());
bind(&done);
}
void LiftoffAssembler::emit_f32_set_cond(LiftoffCondition liftoff_cond,