1*0b57cec5SDimitry Andric //===-- NVPTXBaseInfo.h - Top-level definitions for NVPTX -------*- C++ -*-===// 2*0b57cec5SDimitry Andric // 3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric // 7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric // 9*0b57cec5SDimitry Andric // This file contains small standalone helper functions and enum definitions for 10*0b57cec5SDimitry Andric // the NVPTX target useful for the compiler back-end and the MC libraries. 11*0b57cec5SDimitry Andric // As such, it deliberately does not include references to LLVM core 12*0b57cec5SDimitry Andric // code gen types, passes, etc.. 13*0b57cec5SDimitry Andric // 14*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 15*0b57cec5SDimitry Andric 16*0b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXBASEINFO_H 17*0b57cec5SDimitry Andric #define LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXBASEINFO_H 18*0b57cec5SDimitry Andric 19*0b57cec5SDimitry Andric namespace llvm { 20*0b57cec5SDimitry Andric 21*0b57cec5SDimitry Andric enum AddressSpace { 22*0b57cec5SDimitry Andric ADDRESS_SPACE_GENERIC = 0, 23*0b57cec5SDimitry Andric ADDRESS_SPACE_GLOBAL = 1, 24*0b57cec5SDimitry Andric ADDRESS_SPACE_SHARED = 3, 25*0b57cec5SDimitry Andric ADDRESS_SPACE_CONST = 4, 26*0b57cec5SDimitry Andric ADDRESS_SPACE_LOCAL = 5, 27*0b57cec5SDimitry Andric 28*0b57cec5SDimitry Andric // NVVM Internal 29*0b57cec5SDimitry Andric ADDRESS_SPACE_PARAM = 101 30*0b57cec5SDimitry Andric }; 31*0b57cec5SDimitry Andric 32*0b57cec5SDimitry Andric namespace NVPTXII { 33*0b57cec5SDimitry Andric enum { 34*0b57cec5SDimitry Andric // These must be kept in sync with TSFlags in NVPTXInstrFormats.td 35*0b57cec5SDimitry Andric IsTexFlag = 0x80, 36*0b57cec5SDimitry Andric IsSuldMask = 0x300, 37*0b57cec5SDimitry Andric IsSuldShift = 8, 38*0b57cec5SDimitry Andric IsSustFlag = 0x400, 39*0b57cec5SDimitry Andric IsSurfTexQueryFlag = 0x800, 40*0b57cec5SDimitry Andric IsTexModeUnifiedFlag = 0x1000 41*0b57cec5SDimitry Andric }; 42*0b57cec5SDimitry Andric } // namespace NVPTXII 43*0b57cec5SDimitry Andric 44*0b57cec5SDimitry Andric } // namespace llvm 45*0b57cec5SDimitry Andric #endif 46