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

ppc64: [baseline] implement JumpIfHelper

Change-Id: I8b879b79bfa596f778c904e0e7f0c4c788407356
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3539463Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79546}
parent 6691b9c2
......@@ -110,12 +110,43 @@ inline internal::Condition AsMasmCondition(Condition cond) {
namespace detail {
#ifdef DEBUG
inline bool Clobbers(Register target, MemOperand op) {
UNIMPLEMENTED();
return false;
inline bool IsSignedCondition(Condition cond) {
switch (cond) {
case Condition::kEqual:
case Condition::kNotEqual:
case Condition::kLessThan:
case Condition::kGreaterThan:
case Condition::kLessThanEqual:
case Condition::kGreaterThanEqual:
case Condition::kOverflow:
case Condition::kNoOverflow:
case Condition::kZero:
case Condition::kNotZero:
return true;
case Condition::kUnsignedLessThan:
case Condition::kUnsignedGreaterThan:
case Condition::kUnsignedLessThanEqual:
case Condition::kUnsignedGreaterThanEqual:
return false;
default:
UNREACHABLE();
}
}
#endif
#define __ assm->
// ppc helper
static void JumpIfHelper(MacroAssembler* assm, Condition cc, Register lhs,
Register rhs, Label* target) {
if (IsSignedCondition(cc)) {
__ CmpS64(lhs, rhs);
} else {
__ CmpU64(lhs, rhs);
}
__ b(AsMasmCondition(cc), target);
}
#undef __
} // namespace detail
......
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