diff options
Diffstat (limited to 'llvm/test/MC/Disassembler')
| -rw-r--r-- | llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt b/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt index 57084164660..ed1f38ae86b 100644 --- a/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt @@ -155,3 +155,34 @@ # VI: image_atomic_cmpswap v[5:6], v1, s[8:15] dmask:0xe unorm ; encoding: [0x00,0x1e,0x44,0xf0,0x01,0x05,0x02,0x00] 0x00,0x1e,0x44,0xf0,0x01,0x05,0x02,0x00 + +#===------------------------------------------------------------------------===# +# Image gather +#===------------------------------------------------------------------------===# + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0xfc,0x62,0x00] +0x00,0x01,0x00,0xf1,0x01,0xfc,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x2 ; encoding: [0x00,0x02,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x02,0x00,0xf1,0x01,0x05,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x4 ; encoding: [0x00,0x04,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x04,0x00,0xf1,0x01,0x05,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x8 ; encoding: [0x00,0x08,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x08,0x00,0xf1,0x01,0x05,0x62,0x00 + +# GFX80: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc lwe da d16 ; encoding: [0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80] +# GFX81: image_gather4 v[252:253], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc lwe da d16 ; encoding: [0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80] +0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80 + +#===------------------------------------------------------------------------===# +# Invalid image gather (incorrect dmask value or tfe). +# Disassembler may produce a partially incorrect instruction but should not fail. +#===------------------------------------------------------------------------===# + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x3 ; encoding: [0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00] +0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00 + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc tfe lwe da ; encoding: [0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00] +0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00 |

