NVPTXBaseInfo.h revision 314564
1//===-- NVPTXBaseInfo.h - Top-level definitions for NVPTX -------*- 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 NVPTX 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 LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXBASEINFO_H
18#define LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXBASEINFO_H
19
20namespace llvm {
21
22enum AddressSpace {
23  ADDRESS_SPACE_GENERIC = 0,
24  ADDRESS_SPACE_GLOBAL = 1,
25  ADDRESS_SPACE_SHARED = 3,
26  ADDRESS_SPACE_CONST = 4,
27  ADDRESS_SPACE_LOCAL = 5,
28
29  // NVVM Internal
30  ADDRESS_SPACE_PARAM = 101
31};
32
33namespace NVPTXII {
34enum {
35  // These must be kept in sync with TSFlags in NVPTXInstrFormats.td
36  IsTexFlag = 0x80,
37  IsSuldMask = 0x300,
38  IsSuldShift = 8,
39  IsSustFlag = 0x400,
40  IsSurfTexQueryFlag = 0x800,
41  IsTexModeUnifiedFlag = 0x1000
42};
43} // namespace NVPTXII
44
45} // namespace llvm
46#endif
47