Commit 1be73aba authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[cleanup] Remove dead {CommuteCondition} helper.

R=sigurds@chromium.org

Change-Id: Ib024d099946d4351bfce9de8eb61be1dba5e1ce5
Reviewed-on: https://chromium-review.googlesource.com/1186415
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55351}
parent abfddfd3
......@@ -105,31 +105,6 @@ inline Condition NegateCondition(Condition cond) {
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lo:
return hi;
case hi:
return lo;
case hs:
return ls;
case ls:
return hs;
case lt:
return gt;
case gt:
return lt;
case ge:
return le;
case le:
return ge;
default:
return cond;
}
}
// -----------------------------------------------------------------------------
// Instructions encoding.
......
......@@ -329,35 +329,6 @@ inline Condition NegateCondition(Condition cond) {
return static_cast<Condition>(cond ^ 1);
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lo:
return hi;
case hi:
return lo;
case hs:
return ls;
case ls:
return hs;
case lt:
return gt;
case gt:
return lt;
case ge:
return le;
case le:
return ge;
case eq:
return eq;
default:
// In practice this function is only used with a condition coming from
// binary operations. Any other condition is invalid as it doesn't
// necessary make sense to reverse it (consider 'mi' for instance).
UNREACHABLE();
}
}
enum FlagsUpdate {
SetFlags = 1,
LeaveFlags = 0
......
......@@ -198,31 +198,6 @@ inline Condition NegateCondition(Condition cc) {
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case below:
return above;
case above:
return below;
case above_equal:
return below_equal;
case below_equal:
return above_equal;
case less:
return greater;
case greater:
return less;
case greater_equal:
return less_equal;
case less_equal:
return greater_equal;
default:
return cc;
}
}
enum RoundingMode {
kRoundToNearest = 0x0,
kRoundDown = 0x1,
......
......@@ -1120,30 +1120,6 @@ enum MSABranchDF {
MSA_BRANCH_V
};
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case Uless:
return Ugreater;
case Ugreater:
return Uless;
case Ugreater_equal:
return Uless_equal;
case Uless_equal:
return Ugreater_equal;
case less:
return greater;
case greater:
return less;
case greater_equal:
return less_equal;
case less_equal:
return greater_equal;
default:
return cc;
}
}
// ----- Coprocessor conditions.
enum FPUCondition {
......
......@@ -1154,30 +1154,6 @@ enum MSABranchDF {
MSA_BRANCH_V
};
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case Uless:
return Ugreater;
case Ugreater:
return Uless;
case Ugreater_equal:
return Uless_equal;
case Uless_equal:
return Ugreater_equal;
case less:
return greater;
case greater:
return less;
case greater_equal:
return less_equal;
case less_equal:
return greater_equal;
default:
return cc;
}
}
// ----- Coprocessor conditions.
enum FPUCondition {
......
......@@ -88,22 +88,6 @@ inline Condition NegateCondition(Condition cond) {
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lt:
return gt;
case gt:
return lt;
case ge:
return le;
case le:
return ge;
default:
return cond;
}
}
// -----------------------------------------------------------------------------
// Instructions encoding.
......
......@@ -141,27 +141,6 @@ inline Condition NegateCondition(Condition cond) {
return al;
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cond) {
switch (cond) {
case lt:
return gt;
case gt:
return lt;
case ge:
return le;
case le:
return ge;
case eq:
return eq;
case ne:
return ne;
default:
DCHECK(false);
return cond;
}
}
// -----------------------------------------------------------------------------
// Instructions encoding.
......
......@@ -267,31 +267,6 @@ inline Condition NegateCondition(Condition cc) {
}
// Commute a condition such that {a cond b == b cond' a}.
inline Condition CommuteCondition(Condition cc) {
switch (cc) {
case below:
return above;
case above:
return below;
case above_equal:
return below_equal;
case below_equal:
return above_equal;
case less:
return greater;
case greater:
return less;
case greater_equal:
return less_equal;
case less_equal:
return greater_equal;
default:
return cc;
}
}
enum RoundingMode {
kRoundToNearest = 0x0,
kRoundDown = 0x1,
......
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