ppc64: [baseline] implement JumpIfHelper
Change-Id: I8b879b79bfa596f778c904e0e7f0c4c788407356 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3539463 Reviewed-by: Milad Farazmand <mfarazma@redhat.com> Commit-Queue: Junliang Yan <junyan@redhat.com> Cr-Commit-Position: refs/heads/main@{#79546}
This commit is contained in:
parent
6691b9c2c2
commit
cce657cc55
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user