Index: src/ia32/assembler-ia32.h |
=================================================================== |
--- src/ia32/assembler-ia32.h (revision 4878) |
+++ src/ia32/assembler-ia32.h (working copy) |
@@ -146,8 +146,11 @@ |
// Negation of the default no_condition (-1) results in a non-default |
// no_condition value (-2). As long as tests for no_condition check |
// for condition < 0, this will work as expected. |
-inline Condition NegateCondition(Condition cc); |
+inline Condition NegateCondition(Condition cc) { |
+ return static_cast<Condition>(cc ^ 1); |
+} |
+ |
// Corresponds to transposing the operands of a comparison. |
inline Condition ReverseCondition(Condition cc) { |
switch (cc) { |
@@ -172,12 +175,14 @@ |
}; |
} |
+ |
enum Hint { |
no_hint = 0, |
not_taken = 0x2e, |
taken = 0x3e |
}; |
+ |
// The result of negating a hint is as if the corresponding condition |
// were negated by NegateCondition. That is, no_hint is mapped to |
// itself and not_taken and taken are mapped to each other. |