Pull in r264465 from upstream llvm trunk (by David Majnemer):

[X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddr

  We forgot to add the second machine operand to our ADJCALLSTACKDOWN,
  resulting in crashes in PEI.

  This fixes PR27071.

This should fix an assertion failure during buildworld, when using -Os,
and targeting either i386 directly, or building the 32-bit libraries on
amd64.

Reported by:	Eric Camachat <eric.camachat@gmail.com>
This commit is contained in:
Dimitry Andric 2016-03-26 17:38:15 +00:00
parent 7156379416
commit c2145983aa

View File

@ -22242,7 +22242,7 @@ X86TargetLowering::EmitLoweredTLSAddr(MachineInstr *MI,
// Emit CALLSEQ_START right before the instruction.
unsigned AdjStackDown = TII.getCallFrameSetupOpcode();
MachineInstrBuilder CallseqStart =
BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0);
BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0).addImm(0);
BB->insert(MachineBasicBlock::iterator(MI), CallseqStart);
// Emit CALLSEQ_END right after the instruction.