1 //===-- R600Defines.h - R600 Helper Macros ----------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef R600DEFINES_H_
12 #define R600DEFINES_H_
14 #include "llvm/MC/MCRegisterInfo.h"
17 #define MO_FLAG_CLAMP (1 << 0)
18 #define MO_FLAG_NEG (1 << 1)
19 #define MO_FLAG_ABS (1 << 2)
20 #define MO_FLAG_MASK (1 << 3)
21 #define MO_FLAG_PUSH (1 << 4)
22 #define MO_FLAG_NOT_LAST (1 << 5)
23 #define MO_FLAG_LAST (1 << 6)
24 #define NUM_MO_FLAGS 7
26 /// \brief Helper for getting the operand index for the instruction flags
28 #define GET_FLAG_OPERAND_IDX(Flags) (((Flags) >> 7) & 0x3)
30 namespace R600_InstFlag {
32 TRANS_ONLY = (1 << 0),
39 //FlagOperand bits 7, 8
40 NATIVE_OPERANDS = (1 << 9),
46 #define HAS_NATIVE_OPERANDS(Flags) ((Flags) & R600_InstFlag::NATIVE_OPERANDS)
48 /// \brief Defines for extracting register infomation from register encoding
49 #define HW_REG_MASK 0x1ff
50 #define HW_CHAN_SHIFT 9
52 namespace R600Operands {
79 #endif // R600DEFINES_H_