summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:49 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:49 +0000
commit6f3c73f7df8aca0c2c05ae1dbdf8c50134459895 (patch)
tree11d41041a41210ef62ee1b9cd7bafaa391ab7b79 /llvm/lib/MC/MCObjectStreamer.cpp
parente6c13e4abd944f7d1ae85816063aca468a3bfcb8 (diff)
downloadbcm5719-llvm-6f3c73f7df8aca0c2c05ae1dbdf8c50134459895.tar.gz
bcm5719-llvm-6f3c73f7df8aca0c2c05ae1dbdf8c50134459895.zip
Modify MCObjectStreamer EmitInstTo* interface
Add MCSubtargetInfo parameter virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &); virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &); llvm-svn: 200346
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 5aa1486b847..d46f9d6f903 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -203,7 +203,7 @@ void MCObjectStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo
// If this instruction doesn't need relaxation, just emit it as data.
MCAssembler &Assembler = getAssembler();
if (!Assembler.getBackend().mayNeedRelaxation(Inst)) {
- EmitInstToData(Inst);
+ EmitInstToData(Inst, STI);
return;
}
@@ -218,15 +218,16 @@ void MCObjectStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo
getAssembler().getBackend().relaxInstruction(Inst, Relaxed);
while (getAssembler().getBackend().mayNeedRelaxation(Relaxed))
getAssembler().getBackend().relaxInstruction(Relaxed, Relaxed);
- EmitInstToData(Relaxed);
+ EmitInstToData(Relaxed, STI);
return;
}
// Otherwise emit to a separate fragment.
- EmitInstToFragment(Inst);
+ EmitInstToFragment(Inst, STI);
}
-void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst) {
+void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst,
+ const MCSubtargetInfo &STI) {
// Always create a new, separate fragment here, because its size can change
// during relaxation.
MCRelaxableFragment *IF = new MCRelaxableFragment(Inst);
OpenPOWER on IntegriCloud