summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSam Kolton <Sam.Kolton@amd.com>2016-06-09 11:04:45 +0000
committerSam Kolton <Sam.Kolton@amd.com>2016-06-09 11:04:45 +0000
commitc9bdcb75c46127eb5ea80945e5b03417b64cecf0 (patch)
tree4d9a03f28348a76c338789f3e990699bc6a148be /llvm/lib
parentdb2aff0ab48a47ffc46fe47ccffb51948ee6351d (diff)
downloadbcm5719-llvm-c9bdcb75c46127eb5ea80945e5b03417b64cecf0.tar.gz
bcm5719-llvm-c9bdcb75c46127eb5ea80945e5b03417b64cecf0.zip
[AMDGPU] Disassembler: Support for sdwa instructions
Reviewers: vpykhtin, tstellarAMD Subscribers: arsenm, kzhuravl Differential Revision: http://reviews.llvm.org/D21129 llvm-svn: 272255
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
index a76c0de33e8..f96bb5e4c77 100644
--- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -125,11 +125,15 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
// ToDo: better to switch encoding length using some bit predicate
// but it is unknown yet, so try all we can
- // Try to decode DPP first to solve conflict with VOP1 and VOP2 encodings
+ // Try to decode DPP and SDWA first to solve conflict with VOP1 and VOP2
+ // encodings
if (Bytes.size() >= 8) {
const uint64_t QW = eatBytes<uint64_t>(Bytes);
Res = tryDecodeInst(DecoderTableDPP64, MI, QW, Address);
if (Res) break;
+
+ Res = tryDecodeInst(DecoderTableSDWA64, MI, QW, Address);
+ if (Res) break;
}
// Reinitialize Bytes as DPP64 could have eaten too much
OpenPOWER on IntegriCloud