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

ppc64: [baseline] create condition mappings

Change-Id: I0bf578e877eaee280b7825ff3c1407815d57e7f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513615Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79427}
parent bbd800c6
......@@ -49,29 +49,63 @@ class BaselineAssembler::ScratchRegisterScope {
// TODO(v8:11429,leszeks): Unify condition names in the MacroAssembler.
enum class Condition : uint32_t {
kEqual = static_cast<uint32_t>(eq),
kNotEqual = static_cast<uint32_t>(ne),
kEqual,
kNotEqual,
kLessThan = static_cast<uint32_t>(lt),
kGreaterThan = static_cast<uint32_t>(gt),
kLessThanEqual = static_cast<uint32_t>(le),
kGreaterThanEqual = static_cast<uint32_t>(ge),
kLessThan,
kGreaterThan,
kLessThanEqual,
kGreaterThanEqual,
kUnsignedLessThan = static_cast<uint32_t>(lo),
kUnsignedGreaterThan = static_cast<uint32_t>(hi),
kUnsignedLessThanEqual = static_cast<uint32_t>(ls),
kUnsignedGreaterThanEqual = static_cast<uint32_t>(hs),
kUnsignedLessThan,
kUnsignedGreaterThan,
kUnsignedLessThanEqual,
kUnsignedGreaterThanEqual,
kOverflow = static_cast<uint32_t>(vs),
kNoOverflow = static_cast<uint32_t>(vc),
kOverflow,
kNoOverflow,
kZero = static_cast<uint32_t>(eq),
kNotZero = static_cast<uint32_t>(ne),
kZero,
kNotZero
};
inline internal::Condition AsMasmCondition(Condition cond) {
UNIMPLEMENTED();
return static_cast<internal::Condition>(cond);
STATIC_ASSERT(sizeof(internal::Condition) == sizeof(Condition));
switch (cond) {
case Condition::kEqual:
return eq;
case Condition::kNotEqual:
return ne;
case Condition::kLessThan:
return lt;
case Condition::kGreaterThan:
return gt;
case Condition::kLessThanEqual:
return le;
case Condition::kGreaterThanEqual:
return ge;
case Condition::kUnsignedLessThan:
return lt;
case Condition::kUnsignedGreaterThan:
return gt;
case Condition::kUnsignedLessThanEqual:
return le;
case Condition::kUnsignedGreaterThanEqual:
return ge;
case Condition::kOverflow:
return overflow;
case Condition::kNoOverflow:
return nooverflow;
case Condition::kZero:
return eq;
case Condition::kNotZero:
return ne;
default:
UNREACHABLE();
}
}
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