1a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//===- subzero/src/IceConditionCodesX8664.h - Condition Codes ---*- C++ -*-===//
2a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//
3a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//                        The Subzero Code Generator
4a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//
5a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto// This file is distributed under the University of Illinois Open Source
6a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto// License. See LICENSE.TXT for details.
7a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//
8a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//===----------------------------------------------------------------------===//
99612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull///
109612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull/// \file
1192a6e5b08ec68e7076d637ebc680da2fcc346a00Jim Stichnoth/// \brief Declares the condition codes for x86-64.
129612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull///
13a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto//===----------------------------------------------------------------------===//
14a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
15a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#ifndef SUBZERO_SRC_ICECONDITIONCODESX8664_H
16a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#define SUBZERO_SRC_ICECONDITIONCODESX8664_H
17a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
18a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#include "IceDefs.h"
19a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#include "IceInstX8664.def"
20a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
21a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Portonamespace Ice {
22a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
235d0acff3a2fa421923392aadb4df2742064b6248John Portoclass CondX8664 {
242fea26cae5a6b140c67e18aec3dcf645a16694d5John Portopublic:
259612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull  /// An enum of condition codes used for branches and cmov. The enum value
269612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull  /// should match the value used to encode operands in binary instructions.
275d0acff3a2fa421923392aadb4df2742064b6248John Porto  enum BrCond {
285bff61c44841990680781892036adb17b3cff0c4Jim Stichnoth#define X(val, encode, opp, dump, emit) val = encode,
295d0acff3a2fa421923392aadb4df2742064b6248John Porto    ICEINSTX8664BR_TABLE
30a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#undef X
315d0acff3a2fa421923392aadb4df2742064b6248John Porto        Br_None
325d0acff3a2fa421923392aadb4df2742064b6248John Porto  };
33a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
349612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull  /// An enum of condition codes relevant to the CMPPS instruction. The enum
359612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull  /// value should match the value used to encode operands in binary
369612d32c7e5eb2cb403686ef31172d42e075e460Andrew Scull  /// instructions.
375d0acff3a2fa421923392aadb4df2742064b6248John Porto  enum CmppsCond {
385bff61c44841990680781892036adb17b3cff0c4Jim Stichnoth#define X(val, emit) val,
395d0acff3a2fa421923392aadb4df2742064b6248John Porto    ICEINSTX8664CMPPS_TABLE
40a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#undef X
415d0acff3a2fa421923392aadb4df2742064b6248John Porto        Cmpps_Invalid
425d0acff3a2fa421923392aadb4df2742064b6248John Porto  };
43a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto};
44a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
45a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto} // end of namespace Ice
46a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto
47a054f0ac9be3a9f1a90417d3c8b37a2d3c0cfe4eJohn Porto#endif // SUBZERO_SRC_ICECONDITIONCODESX8664_H
48