mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-17 05:25:47 +00:00
[mips] Add new format for dmtc2/dmfc2 for Octeon CPUs.
Octeon CPUs use dmtc2 rt,imm16 and dmfcp2 rt,imm16 for the crypto coprocessor. E.g. dmtc2 rt,0x4057 starts calculation of sha-1. I had to introduce a new deconding namespace to avoid a decoding conflict. Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D10083 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238439 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -47,6 +47,8 @@ public:
|
||||
|
||||
bool isGP64() const { return STI.getFeatureBits()[Mips::FeatureGP64Bit]; }
|
||||
|
||||
bool hasCnMips() const { return STI.getFeatureBits()[Mips::FeatureCnMips]; }
|
||||
|
||||
bool hasCOP3() const {
|
||||
// Only present in MIPS-I and MIPS-II
|
||||
return !hasMips32() && !hasMips3();
|
||||
@@ -889,6 +891,16 @@ DecodeStatus MipsDisassembler::getInstruction(MCInst &Instr, uint64_t &Size,
|
||||
}
|
||||
}
|
||||
|
||||
if (hasCnMips()) {
|
||||
DEBUG(dbgs() << "Trying CnMips table (32-bit opcodes):\n");
|
||||
Result = decodeInstruction(DecoderTableCnMips32, Instr, Insn,
|
||||
Address, this, STI);
|
||||
if (Result != MCDisassembler::Fail) {
|
||||
Size = 4;
|
||||
return Result;
|
||||
}
|
||||
}
|
||||
|
||||
if (isGP64()) {
|
||||
DEBUG(dbgs() << "Trying Mips64 (GPR64) table (32-bit opcodes):\n");
|
||||
Result = decodeInstruction(DecoderTableMips6432, Instr, Insn,
|
||||
|
Reference in New Issue
Block a user