diff options
| author | Artem Tamazov <artem.tamazov@amd.com> | 2016-05-06 17:48:48 +0000 |
|---|---|---|
| committer | Artem Tamazov <artem.tamazov@amd.com> | 2016-05-06 17:48:48 +0000 |
| commit | ebe71ce36a5ffc7f5aa7425f013cfc2cc16bcac4 (patch) | |
| tree | 5d8d8f4f10e67702984f1034c048b82632e5b8e9 /llvm/test/MC/Disassembler/AMDGPU | |
| parent | 93d9b96bdbea3b63e60a991796b68ebc6ac8d7a6 (diff) | |
| download | bcm5719-llvm-ebe71ce36a5ffc7f5aa7425f013cfc2cc16bcac4.tar.gz bcm5719-llvm-ebe71ce36a5ffc7f5aa7425f013cfc2cc16bcac4.zip | |
[AMDGPU][llvm-mc] Add support for sendmsg(...) syntax.
Added support for sendmsg(MSG[, OP[, STREAM_ID]]) syntax
in s_sendmsg and s_sendmsghalt instructions.
The syntax matches the SP3 assembler/disassembler rules.
That is why implicit inputs (like M0 and EXEC) are not printed
to disassembly output anymore.
sendmsg(...) allows only known message types and attributes,
even if literals are used instead of symbolic names.
However, raw literal (without "sendmsg") still can be used,
and that allows for any 16-bit value.
Tests updated/added.
Differential Revision: http://reviews.llvm.org/D19596
llvm-svn: 268762
Diffstat (limited to 'llvm/test/MC/Disassembler/AMDGPU')
| -rw-r--r-- | llvm/test/MC/Disassembler/AMDGPU/sopp_vi.txt | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/llvm/test/MC/Disassembler/AMDGPU/sopp_vi.txt b/llvm/test/MC/Disassembler/AMDGPU/sopp_vi.txt index 2d8eab0230e..fb8b0e47c6b 100644 --- a/llvm/test/MC/Disassembler/AMDGPU/sopp_vi.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/sopp_vi.txt @@ -75,12 +75,42 @@ # GCN: s_setprio 1 ; encoding: [0x01,0x00,0x8f,0xbf] 0x01 0x00 0x8f 0xbf -# GCN: s_sendmsg Gs(nop), [m0] ; encoding: [0x02,0x00,0x90,0xbf] +# GCN: s_sendmsg 2 ; encoding: [0x02,0x00,0x90,0xbf] 0x02 0x00 0x90 0xbf -# GCN: s_sendmsghalt 3 ; encoding: [0x03,0x00,0x91,0xbf] +# GCN: s_sendmsg sendmsg(MSG_INTERRUPT) ; encoding: [0x01,0x00,0x90,0xbf] +0x01 0x00 0x90 0xbf + +# GCN: s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 0) ; encoding: [0x12,0x00,0x90,0xbf] +0x12 0x00 0x90 0xbf + +# GCN: s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT, 1) ; encoding: [0x22,0x01,0x90,0xbf] +0x22 0x01 0x90 0xbf + +# GCN: s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT_CUT, 2) ; encoding: [0x32,0x02,0x90,0xbf] +0x32 0x02 0x90 0xbf + +# GCN: s_sendmsg sendmsg(MSG_GS_DONE, GS_OP_NOP) ; encoding: [0x03,0x00,0x90,0xbf] +0x03 0x00 0x90 0xbf + +# GCN: s_sendmsg 11 ; encoding: [0x0b,0x00,0x90,0xbf] +0x0b 0x00 0x90 0xbf + +# GCN: s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_ECC_ERR_INTERRUPT) ; encoding: [0x1f,0x00,0x90,0xbf] +0x1f 0x00 0x90 0xbf + +# GCN: s_sendmsg 111 ; encoding: [0x6f,0x00,0x90,0xbf] +0x6f 0x00 0x90 0xbf + +# GCN: s_sendmsghalt sendmsg(MSG_GS_DONE, GS_OP_NOP) ; encoding: [0x03,0x00,0x91,0xbf] 0x03 0x00 0x91 0xbf +# GCN: s_sendmsghalt sendmsg(MSG_GS, GS_OP_EMIT, 1) ; encoding: [0x22,0x01,0x91,0xbf] +0x22 0x01 0x91 0xbf + +# GCN: s_sendmsghalt 111 ; encoding: [0x6f,0x00,0x91,0xbf] +0x6f 0x00 0x91 0xbf + # GCN: s_trap 4 ; encoding: [0x04,0x00,0x92,0xbf] 0x04 0x00 0x92 0xbf |

