PTX: Encode registers as unsigned values in the MC asm printer instead of using exter...
[oota-llvm.git] / lib / Target / PTX / MCTargetDesc / PTXBaseInfo.h
1 //===-- PTXBaseInfo.h - Top level definitions for PTX -------- --*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains small standalone helper functions and enum definitions for
11 // the PTX target useful for the compiler back-end and the MC libraries.
12 // As such, it deliberately does not include references to LLVM core
13 // code gen types, passes, etc..
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef PTXBASEINFO_H
18 #define PTXBASEINFO_H
19
20 #include "PTXMCTargetDesc.h"
21
22 namespace llvm {
23   namespace PTXStateSpace {
24     enum {
25       Global    = 0, // default to global state space
26       Constant  = 1,
27       Local     = 2,
28       Parameter = 3,
29       Shared    = 4
30     };
31   } // namespace PTXStateSpace
32
33   namespace PTXPredicate {
34     enum {
35       Normal = 0,
36       Negate = 1,
37       None   = 2
38     };
39   } // namespace PTXPredicate
40
41   /// Namespace to hold all target-specific flags.
42   namespace PTXRoundingMode {
43     // Instruction Flags
44     enum {
45       // Rounding Mode Flags
46       RndMask             = 15,
47       RndDefault          =  0, // ---
48       RndNone             =  1, // <NONE>
49       RndNearestEven      =  2, // .rn
50       RndTowardsZero      =  3, // .rz
51       RndNegInf           =  4, // .rm
52       RndPosInf           =  5, // .rp
53       RndApprox           =  6, // .approx
54       RndNearestEvenInt   =  7, // .rni
55       RndTowardsZeroInt   =  8, // .rzi
56       RndNegInfInt        =  9, // .rmi
57       RndPosInfInt        = 10  // .rpi
58     };
59   } // namespace PTXII
60
61   namespace PTXRegisterType {
62     // Register type encoded in MCOperands
63     enum {
64       Pred  = 0,
65       B16,
66       B32,
67       B64,
68       F32,
69       F64
70     };
71   } // namespace PTXRegisterType
72 } // namespace llvm
73
74 #endif
75