summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Disassembler
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2017-10-05 10:27:37 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2017-10-05 10:27:37 +0000
commit51a7ae2a2936dd686115950871cb599cf47cf089 (patch)
treeb5662b30e602ab0041638809dac208cd825007b4 /llvm/lib/Target/Mips/Disassembler
parent59428d182f6074363588beaecdacbbd1eb842bb8 (diff)
downloadbcm5719-llvm-51a7ae2a2936dd686115950871cb599cf47cf089.tar.gz
bcm5719-llvm-51a7ae2a2936dd686115950871cb599cf47cf089.zip
[mips] Place certain 64 bit FPU instructions in their own decoder namespace
Previously, instructions that were defined to use the FGR64 register class were associated with the Mips64 table which was incorrect. Reviewers: nitesh.jain, atanasyan Differential Revision: https://reviews.llvm.org/D38454 llvm-svn: 314976
Diffstat (limited to 'llvm/lib/Target/Mips/Disassembler')
-rw-r--r--llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp b/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
index 15195564301..002fa512b21 100644
--- a/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
+++ b/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
@@ -1283,9 +1283,9 @@ DecodeStatus MipsDisassembler::getInstruction(MCInst &Instr, uint64_t &Size,
return Result;
}
- if (hasMips32r6() && isFP64()) {
- DEBUG(dbgs() << "Trying MicroMips32r6FP64 table (32-bit opcodes):\n");
- Result = decodeInstruction(DecoderTableMicroMips32r6FP6432, Instr, Insn,
+ if (isFP64()) {
+ DEBUG(dbgs() << "Trying MicroMipsFP64 table (32-bit opcodes):\n");
+ Result = decodeInstruction(DecoderTableMicroMipsFP6432, Instr, Insn,
Address, this, STI);
if (Result != MCDisassembler::Fail) {
Size = 4;
@@ -1368,6 +1368,14 @@ DecodeStatus MipsDisassembler::getInstruction(MCInst &Instr, uint64_t &Size,
return Result;
}
+ if (isFP64()) {
+ DEBUG(dbgs() << "Trying MipsFP64 (64 bit FPU) table (32-bit opcodes):\n");
+ Result = decodeInstruction(DecoderTableMipsFP6432, Instr, Insn,
+ Address, this, STI);
+ if (Result != MCDisassembler::Fail)
+ return Result;
+ }
+
DEBUG(dbgs() << "Trying Mips table (32-bit opcodes):\n");
// Calling the auto-generated decoder function.
Result =
OpenPOWER on IntegriCloud