summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
diff options
context:
space:
mode:
authorJozef Kolek <jozef.kolek@imgtec.com>2015-01-12 12:03:34 +0000
committerJozef Kolek <jozef.kolek@imgtec.com>2015-01-12 12:03:34 +0000
commit9761e96b011f0ef7ca380a25c96d3c04fed84b2d (patch)
tree50213d30dbb27612f4d03aae6cc0dddaadad6119 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
parentb70f83eb10c498850b8d099e68b4e3fc13501b17 (diff)
downloadbcm5719-llvm-9761e96b011f0ef7ca380a25c96d3c04fed84b2d.tar.gz
bcm5719-llvm-9761e96b011f0ef7ca380a25c96d3c04fed84b2d.zip
[mips][microMIPS] Implement BEQZ16 and BNEZ16 instructions
Differential Revision: http://reviews.llvm.org/D5271 llvm-svn: 225627
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 2eb757a9291..e7b336ef33e 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -1207,6 +1207,17 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
1LL << (inMicroMipsMode() ? 1 : 2)))
return Error(IDLoc, "branch to misaligned address");
break;
+ case Mips::BEQZ16_MM:
+ case Mips::BNEZ16_MM:
+ assert(MCID.getNumOperands() == 2 && "unexpected number of operands");
+ Offset = Inst.getOperand(1);
+ if (!Offset.isImm())
+ break; // We'll deal with this situation later on when applying fixups.
+ if (!isIntN(8, Offset.getImm()))
+ return Error(IDLoc, "branch target out of range");
+ if (OffsetToAlignment(Offset.getImm(), 2LL))
+ return Error(IDLoc, "branch to misaligned address");
+ break;
}
}
OpenPOWER on IntegriCloud