Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 1 | //===- subzero/src/IceConditionCodesX8632.h - Condition Codes ---*- C++ -*-===// |
| 2 | // |
| 3 | // The Subzero Code Generator |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares the condition codes for x86-32. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef SUBZERO_SRC_ICECONDITIONCODESX8632_H |
| 15 | #define SUBZERO_SRC_ICECONDITIONCODESX8632_H |
| 16 | |
| 17 | #include "IceDefs.h" |
| 18 | #include "IceInstX8632.def" |
| 19 | |
| 20 | namespace Ice { |
| 21 | |
| 22 | class CondX86 { |
| 23 | public: |
| 24 | // An enum of condition codes used for branches and cmov. The enum value |
| 25 | // should match the value used to encode operands in binary instructions. |
| 26 | enum BrCond { |
| 27 | #define X(tag, encode, opp, dump, emit) tag encode, |
| 28 | ICEINSTX8632BR_TABLE |
| 29 | #undef X |
| 30 | Br_None |
| 31 | }; |
| 32 | |
| 33 | // An enum of condition codes relevant to the CMPPS instruction. The enum |
| 34 | // value should match the value used to encode operands in binary |
| 35 | // instructions. |
| 36 | enum CmppsCond { |
| 37 | #define X(tag, emit) tag, |
| 38 | ICEINSTX8632CMPPS_TABLE |
| 39 | #undef X |
| 40 | Cmpps_Invalid |
| 41 | }; |
| 42 | }; |
| 43 | |
| 44 | } // end of namespace Ice |
| 45 | |
| 46 | #endif // SUBZERO_SRC_ICECONDITIONCODESX8632_H |