Hi,
while taking a look at X86PadShortFunction.cpp I found that
/// addPadding - Add the given number of NOOP instructions to the function
/// just prior to the return at MBBI
void PadShortFunc::addPadding(MachineBasicBlock *MBB,
MachineBasicBlock::iterator &MBBI,
unsigned int NOOPsToAdd) {
DebugLoc DL = MBBI->getDebugLoc();
while (NOOPsToAdd-- > 0) {
BuildMI(*MBB, MBBI, DL, TII->get(X86::NOOP));
BuildMI(*MBB, MBBI, DL, TII->get(X86::NOOP));
}
What is the reason to add two noops? What am I missing?
Thank you,
Serguei.