Commit 6ae6905c authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

ppc: [liftoff] implement emit_i32_eqz and emit_i32_set_cond

Change-Id: Ib492a0165d8aed748d8ece406bc51931ee577391
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2849179Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74229}
parent 336673f4
......@@ -620,13 +620,28 @@ void LiftoffAssembler::emit_i32_cond_jumpi(LiftoffCondition liftoff_cond,
}
void LiftoffAssembler::emit_i32_eqz(Register dst, Register src) {
bailout(kUnsupportedArchitecture, "emit_i32_eqz");
Label done;
cmpwi(src, Operand(0));
mov(dst, Operand(1));
beq(&done);
mov(dst, Operand::Zero());
bind(&done);
}
void LiftoffAssembler::emit_i32_set_cond(LiftoffCondition liftoff_cond,
Register dst, Register lhs,
Register rhs) {
bailout(kUnsupportedArchitecture, "emit_i32_set_cond");
bool use_signed = liftoff::UseSignedOp(liftoff_cond);
if (use_signed) {
cmpw(lhs, rhs);
} else {
cmplw(lhs, rhs);
}
Label done;
mov(dst, Operand(1));
b(liftoff::ToCondition(liftoff_cond), &done);
mov(dst, Operand::Zero());
bind(&done);
}
void LiftoffAssembler::emit_i64_eqz(Register dst, LiftoffRegister src) {
......
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