blob: 08f68388275643e3e8169349531ffcf4af0ef131 [file] [log] [blame]
Jan Voungbd385e42014-09-18 18:18:10 -07001//===- 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 Scull9612d322015-07-06 14:53:25 -07009///
10/// \file
Jim Stichnoth92a6e5b2015-12-02 16:52:44 -080011/// \brief Declares the condition codes for x86-32.
Andrew Scull9612d322015-07-06 14:53:25 -070012///
Jan Voungbd385e42014-09-18 18:18:10 -070013//===----------------------------------------------------------------------===//
14
15#ifndef SUBZERO_SRC_ICECONDITIONCODESX8632_H
16#define SUBZERO_SRC_ICECONDITIONCODESX8632_H
17
18#include "IceDefs.h"
19#include "IceInstX8632.def"
20
21namespace Ice {
22
23class CondX86 {
Jim Stichnothc6ead202015-02-24 09:30:30 -080024 CondX86() = delete;
25 CondX86(const CondX86 &) = delete;
26 CondX86 &operator=(const CondX86 &) = delete;
27
Jan Voungbd385e42014-09-18 18:18:10 -070028public:
Andrew Scull9612d322015-07-06 14:53:25 -070029 /// 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 Voungbd385e42014-09-18 18:18:10 -070031 enum BrCond {
Jim Stichnoth5bff61c2015-10-28 09:26:00 -070032#define X(val, encode, opp, dump, emit) val = encode,
Jan Voungbd385e42014-09-18 18:18:10 -070033 ICEINSTX8632BR_TABLE
34#undef X
35 Br_None
36 };
37
Andrew Scull9612d322015-07-06 14:53:25 -070038 /// 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 Voungbd385e42014-09-18 18:18:10 -070041 enum CmppsCond {
Jim Stichnoth5bff61c2015-10-28 09:26:00 -070042#define X(val, emit) val,
Jan Voungbd385e42014-09-18 18:18:10 -070043 ICEINSTX8632CMPPS_TABLE
44#undef X
45 Cmpps_Invalid
46 };
47};
48
49} // end of namespace Ice
50
51#endif // SUBZERO_SRC_ICECONDITIONCODESX8632_H