diff options
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 2865a2ad80a9..9c86fcc86bcb 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -368,7 +368,7 @@ void MCObjectStreamer::emitInstruction(const MCInst &Inst, "' cannot have instructions"); return; } - getAssembler().getBackend().emitInstructionBegin(*this, Inst); + getAssembler().getBackend().emitInstructionBegin(*this, Inst, STI); emitInstructionImpl(Inst, STI); getAssembler().getBackend().emitInstructionEnd(*this, Inst); } @@ -609,9 +609,10 @@ void MCObjectStreamer::emitValueToAlignment(unsigned ByteAlignment, } void MCObjectStreamer::emitCodeAlignment(unsigned ByteAlignment, + const MCSubtargetInfo *STI, unsigned MaxBytesToEmit) { emitValueToAlignment(ByteAlignment, 0, 1, MaxBytesToEmit); - cast<MCAlignFragment>(getCurrentFragment())->setEmitNops(true); + cast<MCAlignFragment>(getCurrentFragment())->setEmitNops(true, STI); } void MCObjectStreamer::emitValueToOffset(const MCExpr *Offset, @@ -835,13 +836,14 @@ void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size, } void MCObjectStreamer::emitNops(int64_t NumBytes, int64_t ControlledNopLength, - SMLoc Loc) { + SMLoc Loc, const MCSubtargetInfo &STI) { // Emit an NOP fragment. MCDataFragment *DF = getOrCreateDataFragment(); flushPendingLabels(DF, DF->getContents().size()); assert(getCurrentSectionOnly() && "need a section"); - insert(new MCNopsFragment(NumBytes, ControlledNopLength, Loc)); + + insert(new MCNopsFragment(NumBytes, ControlledNopLength, Loc, STI)); } void MCObjectStreamer::emitFileDirective(StringRef Filename) { |
