diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2017-10-05 10:27:37 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2017-10-05 10:27:37 +0000 |
commit | 51a7ae2a2936dd686115950871cb599cf47cf089 (patch) | |
tree | b5662b30e602ab0041638809dac208cd825007b4 /llvm/lib/Target/Mips/Disassembler | |
parent | 59428d182f6074363588beaecdacbbd1eb842bb8 (diff) | |
download | bcm5719-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.cpp | 14 |
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 = |