| OLD | NEW |
| 1 //===- subzero/src/IceConditionCodesARM32.h - Condition Codes ---*- C++ -*-===// | 1 //===- subzero/src/IceConditionCodesMIPS32.h - Condition Codes --*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| 11 /// \brief Declares the condition codes for ARM32. | 11 /// \brief Declares the condition codes for MIPS32. |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICECONDITIONCODESARM32_H | 15 #ifndef SUBZERO_SRC_ICECONDITIONCODESMIPS32_H |
| 16 #define SUBZERO_SRC_ICECONDITIONCODESARM32_H | 16 #define SUBZERO_SRC_ICECONDITIONCODESMIPS32_H |
| 17 | 17 |
| 18 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 19 #include "IceInstARM32.def" | 19 #include "IceInstMIPS32.def" |
| 20 | 20 |
| 21 namespace Ice { | 21 namespace Ice { |
| 22 | 22 |
| 23 class CondARM32 { | 23 class CondMIPS32 { |
| 24 CondARM32() = delete; | 24 CondMIPS32() = delete; |
| 25 CondARM32(const CondARM32 &) = delete; | 25 CondMIPS32(const CondMIPS32 &) = delete; |
| 26 CondARM32 &operator=(const CondARM32 &) = delete; | 26 CondMIPS32 &operator=(const CondMIPS32 &) = delete; |
| 27 | 27 |
| 28 public: | 28 public: |
| 29 /// An enum of codes used for conditional instructions. The enum value should | 29 /// An enum of codes used for conditional instructions. The enum value should |
| 30 /// match the value used to encode operands in binary instructions. | 30 /// match the value used to encode operands in binary instructions. |
| 31 enum Cond { | 31 enum Cond { |
| 32 #define X(tag, encode, opp, emit) tag = encode, | 32 #define X(tag, opp, emit) tag, |
| 33 ICEINSTARM32COND_TABLE | 33 ICEINSTMIPS32COND_TABLE |
| 34 #undef X | 34 #undef X |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 static bool isDefined(Cond C) { return C != kNone; } | 37 static bool isDefined(Cond C) { return C != kNone; } |
| 38 | 38 |
| 39 static bool isUnconditional(Cond C) { return !isDefined(C) || C == AL; } | 39 static bool isUnconditional(Cond C) { return !isDefined(C) || C == AL; } |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // end of namespace Ice | 42 } // end of namespace Ice |
| 43 | 43 |
| 44 #endif // SUBZERO_SRC_ICECONDITIONCODESARM32_H | 44 #endif // SUBZERO_SRC_ICECONDITIONCODESMIPS32_H |
| OLD | NEW |