Skip to content

Commit c776dc0

Browse files
committed
[AMDGPU] Added td definitions for HW regs
Infrastructure work for future commit. NFC. Differential Revision: https://reviews.llvm.org/D64370 llvm-svn: 365432
1 parent 818d748 commit c776dc0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.td

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,31 @@ def TRAPID{
11591159
int LLVM_DEBUG_TRAP = 3;
11601160
}
11611161

1162+
def HWREG {
1163+
int MODE = 1;
1164+
int STATUS = 2;
1165+
int TRAPSTS = 3;
1166+
int HW_ID = 4;
1167+
int GPR_ALLOC = 5;
1168+
int LDS_ALLOC = 6;
1169+
int IB_STS = 7;
1170+
int MEM_BASES = 15;
1171+
int TBA_LO = 16;
1172+
int TBA_HI = 17;
1173+
int TMA_LO = 18;
1174+
int TMA_HI = 19;
1175+
int FLAT_SCR_LO = 20;
1176+
int FLAT_SCR_HI = 21;
1177+
int XNACK_MASK = 22;
1178+
int POPS_PACKER = 25;
1179+
}
1180+
1181+
class getHwRegImm<int Reg, int Offset = 0, int Size = 32> {
1182+
int ret = !or(Reg,
1183+
!or(!shl(Offset, 6),
1184+
!shl(!add(Size, -1), 11)));
1185+
}
1186+
11621187
//===----------------------------------------------------------------------===//
11631188
//
11641189
// SI Instruction multiclass helpers.

0 commit comments

Comments
 (0)