diff options
| author | Jozef Kolek <jozef.kolek@imgtec.com> | 2015-01-20 19:29:28 +0000 |
|---|---|---|
| committer | Jozef Kolek <jozef.kolek@imgtec.com> | 2015-01-20 19:29:28 +0000 |
| commit | 0d49117769ba90beb60a4eccf7ed755617b21936 (patch) | |
| tree | fde00e0dea5efa3c1bdd18731dba914f89f6f1c6 /llvm/lib/Target/Mips/AsmParser | |
| parent | 3a62216a8a4d4d8d3de0ba164645dbf8725088f3 (diff) | |
| download | bcm5719-llvm-0d49117769ba90beb60a4eccf7ed755617b21936.tar.gz bcm5719-llvm-0d49117769ba90beb60a4eccf7ed755617b21936.zip | |
Reverted revision 226577.
llvm-svn: 226595
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser')
| -rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index b815c0b423a..7db5b34204c 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -171,8 +171,6 @@ class MipsAsmParser : public MCTargetAsmParser { bool expandLoadAddressReg(MCInst &Inst, SMLoc IDLoc, SmallVectorImpl<MCInst> &Instructions); - bool expandUncondBranchMMPseudo(MCInst &Inst, SMLoc IDLoc, - SmallVectorImpl<MCInst> &Instructions); void expandLoadAddressSym(MCInst &Inst, SMLoc IDLoc, SmallVectorImpl<MCInst> &Instructions); @@ -1416,7 +1414,6 @@ bool MipsAsmParser::needsExpansion(MCInst &Inst) { case Mips::LoadAddr32Imm: case Mips::LoadAddr32Reg: case Mips::LoadImm64Reg: - case Mips::B_MM_Pseudo: return true; default: return false; @@ -1439,8 +1436,6 @@ bool MipsAsmParser::expandInstruction(MCInst &Inst, SMLoc IDLoc, return expandLoadAddressImm(Inst, IDLoc, Instructions); case Mips::LoadAddr32Reg: return expandLoadAddressReg(Inst, IDLoc, Instructions); - case Mips::B_MM_Pseudo: - return expandUncondBranchMMPseudo(Inst, IDLoc, Instructions); } } @@ -1726,50 +1721,6 @@ MipsAsmParser::expandLoadAddressSym(MCInst &Inst, SMLoc IDLoc, } } -bool MipsAsmParser:: -expandUncondBranchMMPseudo(MCInst &Inst, SMLoc IDLoc, - SmallVectorImpl<MCInst> &Instructions) { - assert(getInstDesc(Inst.getOpcode()).getNumOperands() == 1 && - "unexpected number of operands"); - - MCOperand Offset = Inst.getOperand(0); - if (Offset.isExpr()) { - Inst.clear(); - Inst.setOpcode(Mips::BEQ_MM); - Inst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - Inst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - Inst.addOperand(MCOperand::CreateExpr(Offset.getExpr())); - } else { - assert(Offset.isImm() && "expected immediate operand kind"); - if (isIntN(11, Offset.getImm())) { - // If offset fits into 11 bits then this instruction becomes microMIPS - // 16-bit unconditional branch instruction. - Inst.setOpcode(Mips::B16_MM); - } else { - if (!isIntN(17, Offset.getImm())) - Error(IDLoc, "branch target out of range"); - if (OffsetToAlignment(Offset.getImm(), 1LL << 1)) - Error(IDLoc, "branch to misaligned address"); - Inst.clear(); - Inst.setOpcode(Mips::BEQ_MM); - Inst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - Inst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - Inst.addOperand(MCOperand::CreateImm(Offset.getImm())); - } - } - Instructions.push_back(Inst); - - if (AssemblerOptions.back()->isReorder()) { - // If .set reorder is active, emit a NOP after the branch instruction. - MCInst NopInst; - NopInst.setOpcode(Mips::MOVE16_MM); - NopInst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - NopInst.addOperand(MCOperand::CreateReg(Mips::ZERO)); - Instructions.push_back(NopInst); - } - return false; -} - void MipsAsmParser::expandMemInst(MCInst &Inst, SMLoc IDLoc, SmallVectorImpl<MCInst> &Instructions, bool isLoad, bool isImmOpnd) { |

