Artem Tamazov | 6edc135 | 2016-05-26 17:00:33 +0000 | [diff] [blame] | 1 | //===-- AMDGPUAsmUtils.cpp - AsmParser/InstPrinter common -----------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Artem Tamazov | 6edc135 | 2016-05-26 17:00:33 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | #include "AMDGPUAsmUtils.h" |
| 9 | |
| 10 | namespace llvm { |
| 11 | namespace AMDGPU { |
| 12 | namespace SendMsg { |
| 13 | |
| 14 | // This must be in sync with llvm::AMDGPU::SendMsg::Id enum members, see SIDefines.h. |
| 15 | const char* const IdSymbolic[] = { |
| 16 | nullptr, |
| 17 | "MSG_INTERRUPT", |
| 18 | "MSG_GS", |
| 19 | "MSG_GS_DONE", |
| 20 | nullptr, |
| 21 | nullptr, |
| 22 | nullptr, |
| 23 | nullptr, |
| 24 | nullptr, |
| 25 | nullptr, |
| 26 | nullptr, |
| 27 | nullptr, |
| 28 | nullptr, |
| 29 | nullptr, |
| 30 | nullptr, |
| 31 | "MSG_SYSMSG" |
| 32 | }; |
| 33 | |
| 34 | // These two must be in sync with llvm::AMDGPU::SendMsg::Op enum members, see SIDefines.h. |
| 35 | const char* const OpSysSymbolic[] = { |
| 36 | nullptr, |
| 37 | "SYSMSG_OP_ECC_ERR_INTERRUPT", |
| 38 | "SYSMSG_OP_REG_RD", |
| 39 | "SYSMSG_OP_HOST_TRAP_ACK", |
| 40 | "SYSMSG_OP_TTRACE_PC" |
| 41 | }; |
| 42 | |
| 43 | const char* const OpGsSymbolic[] = { |
| 44 | "GS_OP_NOP", |
| 45 | "GS_OP_CUT", |
| 46 | "GS_OP_EMIT", |
| 47 | "GS_OP_EMIT_CUT" |
| 48 | }; |
| 49 | |
| 50 | } // namespace SendMsg |
| 51 | |
| 52 | namespace Hwreg { |
| 53 | |
| 54 | // This must be in sync with llvm::AMDGPU::Hwreg::ID_SYMBOLIC_FIRST_/LAST_, see SIDefines.h. |
| 55 | const char* const IdSymbolic[] = { |
| 56 | nullptr, |
| 57 | "HW_REG_MODE", |
| 58 | "HW_REG_STATUS", |
| 59 | "HW_REG_TRAPSTS", |
| 60 | "HW_REG_HW_ID", |
| 61 | "HW_REG_GPR_ALLOC", |
| 62 | "HW_REG_LDS_ALLOC", |
Stanislav Mekhanoshin | 62875fc | 2018-01-15 18:49:15 +0000 | [diff] [blame] | 63 | "HW_REG_IB_STS", |
| 64 | nullptr, |
| 65 | nullptr, |
| 66 | nullptr, |
| 67 | nullptr, |
| 68 | nullptr, |
| 69 | nullptr, |
| 70 | nullptr, |
| 71 | "HW_REG_SH_MEM_BASES" |
Artem Tamazov | 6edc135 | 2016-05-26 17:00:33 +0000 | [diff] [blame] | 72 | }; |
| 73 | |
| 74 | } // namespace Hwreg |
Dmitry Preobrazhensky | 793c592 | 2017-05-31 16:26:47 +0000 | [diff] [blame] | 75 | |
| 76 | namespace Swizzle { |
| 77 | |
| 78 | // This must be in sync with llvm::AMDGPU::Swizzle::Id enum members, see SIDefines.h. |
| 79 | const char* const IdSymbolic[] = { |
| 80 | "QUAD_PERM", |
| 81 | "BITMASK_PERM", |
| 82 | "SWAP", |
| 83 | "REVERSE", |
| 84 | "BROADCAST", |
| 85 | }; |
| 86 | |
| 87 | } // namespace Swizzle |
Dmitry Preobrazhensky | ef92035 | 2019-02-27 13:12:12 +0000 | [diff] [blame] | 88 | |
| 89 | namespace VGPRIndexMode { |
| 90 | |
| 91 | // This must be in sync with llvm::AMDGPU::VGPRIndexMode::Id enum members, see SIDefines.h. |
| 92 | const char* const IdSymbolic[] = { |
| 93 | "SRC0", |
| 94 | "SRC1", |
| 95 | "SRC2", |
| 96 | "DST", |
| 97 | }; |
| 98 | |
| 99 | } // namespace VGPRIndexMode |
| 100 | |
Artem Tamazov | 6edc135 | 2016-05-26 17:00:33 +0000 | [diff] [blame] | 101 | } // namespace AMDGPU |
| 102 | } // namespace llvm |