Commit 25bc6854 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [liftoff] update emit_cond_jump

Change-Id: I38197dc313b049a612fb34472db3b647990747dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715086Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72978}
parent b5fcbda3
...@@ -1176,38 +1176,37 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond, ...@@ -1176,38 +1176,37 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
Condition cond = liftoff::ToCondition(liftoff_cond); Condition cond = liftoff::ToCondition(liftoff_cond);
bool use_signed = liftoff::UseSignedOp(liftoff_cond); bool use_signed = liftoff::UseSignedOp(liftoff_cond);
if (type.kind() == kI32) { if (rhs != no_reg) {
if (rhs == no_reg) { switch (type.kind()) {
if (use_signed) { case kI32:
CmpS32(lhs, Operand::Zero()); if (use_signed) {
} else { CmpS32(lhs, rhs);
CmpU32(lhs, Operand::Zero()); } else {
} CmpU32(lhs, rhs);
} else { }
if (use_signed) { break;
CmpS32(lhs, rhs); case kRef:
} else { case kOptRef:
CmpU32(lhs, rhs); case kRtt:
} case kRttWithDepth:
DCHECK(liftoff_cond == kEqual || liftoff_cond == kUnequal);
V8_FALLTHROUGH;
case kI64:
if (use_signed) {
CmpS64(lhs, rhs);
} else {
CmpU64(lhs, rhs);
}
break;
default:
UNREACHABLE();
} }
} else { } else {
CHECK(type.kind() == kI64 || type.kind() == kOptRef || DCHECK_EQ(type, kWasmI32);
type.kind() == kRtt || type.kind() == kRttWithDepth || CHECK(use_signed);
type.kind() == kRef); CmpS32(lhs, Operand::Zero());
if (rhs == no_reg) {
if (use_signed) {
CmpS64(lhs, Operand::Zero());
} else {
CmpU64(lhs, Operand::Zero());
}
} else {
if (use_signed) {
CmpS64(lhs, rhs);
} else {
CmpU64(lhs, rhs);
}
}
} }
b(cond, label); b(cond, label);
} }
......
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