aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
diff options
context:
space:
mode:
authorJinsong Ji <jji@us.ibm.com>2020-07-27 20:48:44 +0000
committerJinsong Ji <jji@us.ibm.com>2020-07-27 21:07:00 +0000
commitbf544fa1c3cb80f24d85e84559fb11193846259f (patch)
tree0f2fa890e94ff7f2beae5ceb5bc79123604668d2 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
parent754deffd11c733d709c3ed66d3b9a6b54d081474 (diff)
downloadllvm-bf544fa1c3cb80f24d85e84559fb11193846259f.zip
llvm-bf544fa1c3cb80f24d85e84559fb11193846259f.tar.gz
llvm-bf544fa1c3cb80f24d85e84559fb11193846259f.tar.bz2
Revert "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support"
This reverts commit adffce71538e219aab4eeb024819baa7687262ff. This is breaking test-suite, revert while investigation.
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp b/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
index 362ddf7..74c6fd3 100644
--- a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
+++ b/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
@@ -167,6 +167,12 @@ static DecodeStatus DecodeG8RC_NOX0RegisterClass(MCInst &Inst, uint64_t RegNo,
#define DecodePointerLikeRegClass0 DecodeGPRCRegisterClass
#define DecodePointerLikeRegClass1 DecodeGPRC_NOR0RegisterClass
+static DecodeStatus DecodeQFRCRegisterClass(MCInst &Inst, uint64_t RegNo,
+ uint64_t Address,
+ const void *Decoder) {
+ return decodeRegisterClass(Inst, RegNo, QFRegs);
+}
+
static DecodeStatus DecodeSPERCRegisterClass(MCInst &Inst, uint64_t RegNo,
uint64_t Address,
const void *Decoder) {
@@ -395,9 +401,14 @@ DecodeStatus PPCDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
// Read the instruction in the proper endianness.
uint64_t Inst = ReadFunc(Bytes.data());
- if (STI.getFeatureBits()[PPC::FeatureSPE]) {
+ if (STI.getFeatureBits()[PPC::FeatureQPX]) {
+ DecodeStatus result =
+ decodeInstruction(DecoderTableQPX32, MI, Inst, Address, this, STI);
+ if (result != MCDisassembler::Fail)
+ return result;
+ } else if (STI.getFeatureBits()[PPC::FeatureSPE]) {
DecodeStatus result =
- decodeInstruction(DecoderTableSPE32, MI, Inst, Address, this, STI);
+ decodeInstruction(DecoderTableSPE32, MI, Inst, Address, this, STI);
if (result != MCDisassembler::Fail)
return result;
}