diff options
| author | Nikolay Haustov <Nikolay.Haustov@amd.com> | 2016-02-26 09:51:05 +0000 |
|---|---|---|
| committer | Nikolay Haustov <Nikolay.Haustov@amd.com> | 2016-02-26 09:51:05 +0000 |
| commit | 2f684f1347081d3e03d59dcab20ebb059e020e90 (patch) | |
| tree | 9e2faeb6df8c1c6610d8e767f5c60c90707ee8e2 /llvm/test/MC/AMDGPU | |
| parent | f3d6612c0a0b0337e270cbab29521f3aed959f8f (diff) | |
| download | bcm5719-llvm-2f684f1347081d3e03d59dcab20ebb059e020e90.tar.gz bcm5719-llvm-2f684f1347081d3e03d59dcab20ebb059e020e90.zip | |
[AMDGPU] Assembler: Basic support for MIMG
Add parsing and printing of image operands. Matches legacy sp3 assembler.
Change image instruction order to have data/image/sampler operands in the beginning. This is needed because optional operands in MC are always last.
Update SITargetLowering for new order.
Add basic MC test.
Update CodeGen tests.
Review: http://reviews.llvm.org/D17574
llvm-svn: 261995
Diffstat (limited to 'llvm/test/MC/AMDGPU')
| -rw-r--r-- | llvm/test/MC/AMDGPU/mimg.s | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/MC/AMDGPU/mimg.s b/llvm/test/MC/AMDGPU/mimg.s new file mode 100644 index 00000000000..4d821bdb8cf --- /dev/null +++ b/llvm/test/MC/AMDGPU/mimg.s @@ -0,0 +1,15 @@ +// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=SICI +// RUN: llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck %s --check-prefix=SICI +// RUN: llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s | FileCheck %s --check-prefix=VI + +image_load v[4:6], v[237:240], s[28:35] dmask:0x7 unorm +// SICI: image_load v[4:6], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x00,0xf0,0xed,0x04,0x07,0x00] +// VI: image_load v[4:6], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x00,0xf0,0xed,0x04,0x07,0x00] + +image_store v[193:195], v[237:240], s[28:35] dmask:0x7 unorm +// SICI: image_store v[193:195], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x20,0xf0,0xed,0xc1,0x07,0x00] +// VI : image_store v[193:195], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x20,0xf0,0xed,0xc1,0x07,0x00] + +image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 unorm +// SICI: image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 unorm ; encoding: [0x00,0x17,0x80,0xf0,0xed,0xc1,0x27,0x00] +// VI : image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 unorm ; encoding: [0x00,0x17,0x80,0xf0,0xed,0xc1,0x27,0x00] |

