@@ -1383,14 +1383,6 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
1383
1383
}
1384
1384
}
1385
1385
1386
- // If this instruction has a delay slot and .set reorder is active,
1387
- // emit a NOP after it.
1388
- if (MCID.hasDelaySlot () && AssemblerOptions.back ()->isReorder ()) {
1389
- Instructions.push_back (Inst);
1390
- createNop (hasShortDelaySlot (Inst.getOpcode ()), IDLoc, Instructions);
1391
- return false ;
1392
- }
1393
-
1394
1386
if (MCID.mayLoad () || MCID.mayStore ()) {
1395
1387
// Check the offset of memory operand, if it is a symbol
1396
1388
// reference or immediate we may have to expand instructions.
@@ -1580,11 +1572,17 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
1580
1572
}
1581
1573
}
1582
1574
1583
- if (needsExpansion (Inst))
1584
- return expandInstruction (Inst, IDLoc, Instructions);
1585
- else
1575
+ if (needsExpansion (Inst)) {
1576
+ if (expandInstruction (Inst, IDLoc, Instructions))
1577
+ return true ;
1578
+ } else
1586
1579
Instructions.push_back (Inst);
1587
1580
1581
+ // If this instruction has a delay slot and .set reorder is active,
1582
+ // emit a NOP after it.
1583
+ if (MCID.hasDelaySlot () && AssemblerOptions.back ()->isReorder ())
1584
+ createNop (hasShortDelaySlot (Inst.getOpcode ()), IDLoc, Instructions);
1585
+
1588
1586
return false ;
1589
1587
}
1590
1588
0 commit comments