Skip to content

Commit 4bff98d

Browse files
committed
[AMDGPU][MC] Disable sendmsg SYSMSG_OP_HOST_TRAP_ACK on gfx9+
This is no longer supported as of gfx9. Fixes #52903
1 parent 56dfb5b commit 4bff98d

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static constexpr CustomOperand SysMsgOperands[] = {
123123
{{""}},
124124
{{"SYSMSG_OP_ECC_ERR_INTERRUPT"}, OP_SYS_ECC_ERR_INTERRUPT},
125125
{{"SYSMSG_OP_REG_RD"}, OP_SYS_REG_RD},
126-
{{"SYSMSG_OP_HOST_TRAP_ACK"}, OP_SYS_HOST_TRAP_ACK},
126+
{{"SYSMSG_OP_HOST_TRAP_ACK"}, OP_SYS_HOST_TRAP_ACK, isNotGFX9Plus},
127127
{{"SYSMSG_OP_TTRACE_PC"}, OP_SYS_TTRACE_PC},
128128
};
129129

llvm/test/MC/AMDGPU/gfx9-asm-err.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ global_load_dword v[2:3], off
4141

4242
scratch_load_dword v2, off, offset:256
4343
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
44+
45+
s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_HOST_TRAP_ACK)
46+
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: specified operation id is not supported on this GPU

llvm/test/MC/AMDGPU/sopp-err.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ s_sendmsg sendmsg(MSG_SYSMSG, 0)
199199
s_sendmsg sendmsg(MSG_SYSMSG, 5)
200200
// GCN: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operation id
201201

202+
s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_HOST_TRAP_ACK)
203+
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: specified operation id is not supported on this GPU
204+
// GFX11PLUS: :[[@LINE-2]]:{{[0-9]+}}: error: specified operation id is not supported on this GPU
205+
202206
//===----------------------------------------------------------------------===//
203207
// waitcnt
204208
//===----------------------------------------------------------------------===//

llvm/test/MC/AMDGPU/sopp-gfx9.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ s_sendmsg 10
109109

110110
s_sendmsg sendmsg(MSG_GET_DOORBELL)
111111
// GFX9: s_sendmsg sendmsg(MSG_GET_DOORBELL) ; encoding: [0x0a,0x00,0x90,0xbf]
112+
113+
s_sendmsg sendmsg(15, 3, 0)
114+
// GFX9: s_sendmsg sendmsg(15, 3, 0) ; encoding: [0x3f,0x00,0x90,0xbf]

0 commit comments

Comments
 (0)