fixed Mips 'jal imm' segmentation fault (#294)

This commit is contained in:
xiaohuajiao
2017-04-17 14:59:39 +08:00
committed by Nguyen Anh Quynh
parent 51ea7aff4e
commit 35accb128f
@@ -1691,7 +1691,7 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
// This expansion is not in a function called by tryExpandInstruction()
// because the pseudo-instruction doesn't have a distinct opcode.
if ((Inst.getOpcode() == Mips::JAL || Inst.getOpcode() == Mips::JAL_MM) &&
inPicMode()) {
inPicMode() && Inst.getOperand(0).isExpr()) {
warnIfNoMacro(IDLoc);
const MCExpr *JalExpr = Inst.getOperand(0).getExpr();