Index: lib/Target/X86/X86MCInstLower.cpp |
diff --git a/lib/Target/X86/X86MCInstLower.cpp b/lib/Target/X86/X86MCInstLower.cpp |
index 03d0ca6edd883e25b988f283ec7c6123e8d43656..12e2da6db10b34fc5d4a0d6bca7630be305a73f2 100644 |
--- a/lib/Target/X86/X86MCInstLower.cpp |
+++ b/lib/Target/X86/X86MCInstLower.cpp |
@@ -1007,6 +1007,22 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { |
X86MCInstLower MCInstLowering(*MF, *this); |
const X86RegisterInfo *RI = MF->getSubtarget<X86Subtarget>().getRegisterInfo(); |
+ // @LOCALMOD-START |
+ // MI Bundles are used to represent bundle-locked groups. |
+ // MBB iterators skip bundles, so when we reach a bundle head, unpack it here. |
+ if (MI->isBundle()) { |
+ MachineBasicBlock::const_iterator MBBI(MI); |
+ MachineBasicBlock::const_instr_iterator MII (MBBI.getInstrIterator()); |
+ MBBI++; |
jvoung (off chromium)
2015/05/12 23:53:04
++MBBI instead?
Derek Schuff
2015/05/13 00:44:50
Done.
|
+ OutStreamer.EmitBundleLock(false); |
+ while (++MII != MBBI) { |
+ EmitInstruction(MII); |
+ } |
+ OutStreamer.EmitBundleUnlock(); |
+ return; |
+ } |
+ // @LOCALMOD-END |
+ |
switch (MI->getOpcode()) { |
case TargetOpcode::DBG_VALUE: |
llvm_unreachable("Should be handled target independently"); |