[llvm] r365432 - [AMDGPU] Added td definitions for HW regs
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 20:20:33 PDT 2019
Author: rampitec
Date: Mon Jul 8 20:20:33 2019
New Revision: 365432
URL: http://llvm.org/viewvc/llvm-project?rev=365432&view=rev
Log:
[AMDGPU] Added td definitions for HW regs
Infrastructure work for future commit. NFC.
Differential Revision: https://reviews.llvm.org/D64370
Modified:
llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td
Modified: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td?rev=365432&r1=365431&r2=365432&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td Mon Jul 8 20:20:33 2019
@@ -1159,6 +1159,31 @@ def TRAPID{
int LLVM_DEBUG_TRAP = 3;
}
+def HWREG {
+ int MODE = 1;
+ int STATUS = 2;
+ int TRAPSTS = 3;
+ int HW_ID = 4;
+ int GPR_ALLOC = 5;
+ int LDS_ALLOC = 6;
+ int IB_STS = 7;
+ int MEM_BASES = 15;
+ int TBA_LO = 16;
+ int TBA_HI = 17;
+ int TMA_LO = 18;
+ int TMA_HI = 19;
+ int FLAT_SCR_LO = 20;
+ int FLAT_SCR_HI = 21;
+ int XNACK_MASK = 22;
+ int POPS_PACKER = 25;
+}
+
+class getHwRegImm<int Reg, int Offset = 0, int Size = 32> {
+ int ret = !or(Reg,
+ !or(!shl(Offset, 6),
+ !shl(!add(Size, -1), 11)));
+}
+
//===----------------------------------------------------------------------===//
//
// SI Instruction multiclass helpers.
More information about the llvm-commits
mailing list