| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_MIPS_CONSTANTS_H_ | 5 #ifndef V8_MIPS_CONSTANTS_H_ |
| 6 #define V8_MIPS_CONSTANTS_H_ | 6 #define V8_MIPS_CONSTANTS_H_ |
| 7 | 7 |
| 8 // UNIMPLEMENTED_ macro for MIPS. | 8 // UNIMPLEMENTED_ macro for MIPS. |
| 9 #ifdef DEBUG | 9 #ifdef DEBUG |
| 10 #define UNIMPLEMENTED_MIPS() \ | 10 #define UNIMPLEMENTED_MIPS() \ |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 // Returns the equivalent of !cc. | 497 // Returns the equivalent of !cc. |
| 498 // Negation of the default kNoCondition (-1) results in a non-default | 498 // Negation of the default kNoCondition (-1) results in a non-default |
| 499 // no_condition value (-2). As long as tests for no_condition check | 499 // no_condition value (-2). As long as tests for no_condition check |
| 500 // for condition < 0, this will work as expected. | 500 // for condition < 0, this will work as expected. |
| 501 inline Condition NegateCondition(Condition cc) { | 501 inline Condition NegateCondition(Condition cc) { |
| 502 ASSERT(cc != cc_always); | 502 ASSERT(cc != cc_always); |
| 503 return static_cast<Condition>(cc ^ 1); | 503 return static_cast<Condition>(cc ^ 1); |
| 504 } | 504 } |
| 505 | 505 |
| 506 | 506 |
| 507 // Commute a condition such that a cond b == b cond' b. | 507 // Commute a condition such that {a cond b == b cond' a}. |
| 508 inline Condition CommuteCondition(Condition cc) { | 508 inline Condition CommuteCondition(Condition cc) { |
| 509 switch (cc) { | 509 switch (cc) { |
| 510 case Uless: | 510 case Uless: |
| 511 return Ugreater; | 511 return Ugreater; |
| 512 case Ugreater: | 512 case Ugreater: |
| 513 return Uless; | 513 return Uless; |
| 514 case Ugreater_equal: | 514 case Ugreater_equal: |
| 515 return Uless_equal; | 515 return Uless_equal; |
| 516 case Uless_equal: | 516 case Uless_equal: |
| 517 return Ugreater_equal; | 517 return Ugreater_equal; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 // JS argument slots size. | 810 // JS argument slots size. |
| 811 const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize; | 811 const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize; |
| 812 // Assembly builtins argument slots size. | 812 // Assembly builtins argument slots size. |
| 813 const int kBArgsSlotsSize = 0 * Instruction::kInstrSize; | 813 const int kBArgsSlotsSize = 0 * Instruction::kInstrSize; |
| 814 | 814 |
| 815 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 815 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
| 816 | 816 |
| 817 } } // namespace v8::internal | 817 } } // namespace v8::internal |
| 818 | 818 |
| 819 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 819 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
| OLD | NEW |