• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /// \file
11 /// \brief Declares the condition codes for x86-32.
12 ///
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 {
24   CondX86() = delete;
25   CondX86(const CondX86 &) = delete;
26   CondX86 &operator=(const CondX86 &) = delete;
27 
28 public:
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.
31   enum BrCond {
32 #define X(val, encode, opp, dump, emit) val = encode,
33     ICEINSTX8632BR_TABLE
34 #undef X
35         Br_None
36   };
37 
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.
41   enum CmppsCond {
42 #define X(val, emit) val,
43     ICEINSTX8632CMPPS_TABLE
44 #undef X
45         Cmpps_Invalid
46   };
47 };
48 
49 } // end of namespace Ice
50 
51 #endif // SUBZERO_SRC_ICECONDITIONCODESX8632_H
52