Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: src/mips/constants-mips.h

Issue 313083006: Rename ReverseCondition to CommuteCondition, a more standard term. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 inline Condition ReverseCondition(Condition cc) { 507 // Commute a condition such that a cond b == b cond' b.
508 inline Condition CommuteCondition(Condition cc) {
508 switch (cc) { 509 switch (cc) {
509 case Uless: 510 case Uless:
510 return Ugreater; 511 return Ugreater;
511 case Ugreater: 512 case Ugreater:
512 return Uless; 513 return Uless;
513 case Ugreater_equal: 514 case Ugreater_equal:
514 return Uless_equal; 515 return Uless_equal;
515 case Uless_equal: 516 case Uless_equal:
516 return Ugreater_equal; 517 return Ugreater_equal;
517 case less: 518 case less:
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 // JS argument slots size. 810 // JS argument slots size.
810 const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize; 811 const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize;
811 // Assembly builtins argument slots size. 812 // Assembly builtins argument slots size.
812 const int kBArgsSlotsSize = 0 * Instruction::kInstrSize; 813 const int kBArgsSlotsSize = 0 * Instruction::kInstrSize;
813 814
814 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; 815 const int kBranchReturnOffset = 2 * Instruction::kInstrSize;
815 816
816 } } // namespace v8::internal 817 } } // namespace v8::internal
817 818
818 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 819 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698