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 | //===----------------------------------------------------------------------===// |
Andrew Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 9 | /// |
| 10 | /// \file |
| 11 | /// This file declares the condition codes for x86-32. |
| 12 | /// |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef SUBZERO_SRC_ICECONDITIONCODESX8632_H |
| 16 | #define SUBZERO_SRC_ICECONDITIONCODESX8632_H |
| 17 | |
| 18 | #include "IceDefs.h" |
| 19 | #include "IceInstX8632.def" |
| 20 | |
| 21 | namespace Ice { |
| 22 | |
| 23 | class CondX86 { |
Jim Stichnoth | c6ead20 | 2015-02-24 09:30:30 -0800 | [diff] [blame] | 24 | CondX86() = delete; |
| 25 | CondX86(const CondX86 &) = delete; |
| 26 | CondX86 &operator=(const CondX86 &) = delete; |
| 27 | |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 28 | public: |
Andrew Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 29 | /// An enum of condition codes used for branches and cmov. The enum value |
| 30 | /// should match the value used to encode operands in binary instructions. |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 31 | enum BrCond { |
| 32 | #define X(tag, encode, opp, dump, emit) tag encode, |
| 33 | ICEINSTX8632BR_TABLE |
| 34 | #undef X |
| 35 | Br_None |
| 36 | }; |
| 37 | |
Andrew Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 38 | /// An enum of condition codes relevant to the CMPPS instruction. The enum |
| 39 | /// value should match the value used to encode operands in binary |
| 40 | /// instructions. |
Jan Voung | bd385e4 | 2014-09-18 18:18:10 -0700 | [diff] [blame] | 41 | enum CmppsCond { |
| 42 | #define X(tag, emit) tag, |
| 43 | ICEINSTX8632CMPPS_TABLE |
| 44 | #undef X |
| 45 | Cmpps_Invalid |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | } // end of namespace Ice |
| 50 | |
| 51 | #endif // SUBZERO_SRC_ICECONDITIONCODESX8632_H |