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