Skip to content

Commit fc911fe

Browse files
authored
[AMDGPU] Add HW_REG_IB_STS2 on gfx1250 (#153479)
1 parent cc0d227 commit fc911fe

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

llvm/lib/Target/AMDGPU/SIDefines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ enum Id { // HwRegCode, (6) [5:0]
513513
ID_HW_ID2 = 24,
514514
ID_POPS_PACKER = 25,
515515
ID_PERF_SNAPSHOT_DATA_gfx11 = 27,
516+
ID_IB_STS2 = 28,
516517
ID_SHADER_CYCLES = 29,
517518
ID_SHADER_CYCLES_HI = 30,
518519
ID_DVGPR_ALLOC_LO = 31,

llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static constexpr CustomOperand Operands[] = {
195195
{{"HW_REG_POPS_PACKER"}, ID_POPS_PACKER, isGFX10},
196196
{{""}},
197197
{{"HW_REG_PERF_SNAPSHOT_DATA"}, ID_PERF_SNAPSHOT_DATA_gfx11, isGFX11},
198-
{{""}},
198+
{{"HW_REG_IB_STS2"}, ID_IB_STS2, isGFX1250},
199199
{{"HW_REG_SHADER_CYCLES"}, ID_SHADER_CYCLES, isGFX10_3_GFX11},
200200
{{"HW_REG_SHADER_CYCLES_HI"}, ID_SHADER_CYCLES_HI, isGFX12Plus},
201201
{{"HW_REG_DVGPR_ALLOC_LO"}, ID_DVGPR_ALLOC_LO, isGFX12Plus},

llvm/test/MC/AMDGPU/gfx1250_asm_operands.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ s_setreg_b32 hwreg(34), s1
5252
s_setreg_b32 hwreg(HW_REG_XNACK_MASK), s1
5353
// GFX1200-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid hardware register: not supported on this GPU
5454
// GFX1250: encoding: [0x22,0xf8,0x01,0xb9]
55+
56+
s_setreg_b32 hwreg(HW_REG_IB_STS2), s1
57+
// GFX1200-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid hardware register: not supported on this GPU
58+
// GFX1250: encoding: [0x1c,0xf8,0x01,0xb9]

llvm/test/MC/Disassembler/AMDGPU/gfx1250_dasm_operands.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@
3232

3333
# GFX1250: s_setreg_b32 hwreg(HW_REG_XNACK_MASK), s1 ; encoding: [0x22,0xf8,0x01,0xb9]
3434
0x22,0xf8,0x01,0xb9
35+
36+
# GFX1250: s_setreg_b32 hwreg(HW_REG_IB_STS2), s1 ; encoding: [0x1c,0xf8,0x01,0xb9]
37+
0x1c,0xf8,0x01,0xb9

0 commit comments

Comments
 (0)