NVPTXBaseInfo.h 1.3 KB

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