comparison lib/Target/X86/X86FrameLowering.cpp @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children 54457678186b
comparison
equal deleted inserted replaced
1:f783a2dd24b1 33:e4204d083e25
48 const TargetRegisterInfo *RegInfo = TM.getRegisterInfo(); 48 const TargetRegisterInfo *RegInfo = TM.getRegisterInfo();
49 49
50 return (MF.getTarget().Options.DisableFramePointerElim(MF) || 50 return (MF.getTarget().Options.DisableFramePointerElim(MF) ||
51 RegInfo->needsStackRealignment(MF) || 51 RegInfo->needsStackRealignment(MF) ||
52 MFI->hasVarSizedObjects() || 52 MFI->hasVarSizedObjects() ||
53 MFI->isFrameAddressTaken() || MF.hasMSInlineAsm() || 53 MFI->isFrameAddressTaken() || MFI->hasInlineAsmWithSPAdjust() ||
54 MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() || 54 MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
55 MMI.callsUnwindInit() || MMI.callsEHReturn()); 55 MMI.callsUnwindInit() || MMI.callsEHReturn());
56 } 56 }
57 57
58 static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) { 58 static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) {
604 // stack and adjust the stack pointer in one go. The 64-bit version of 604 // stack and adjust the stack pointer in one go. The 64-bit version of
605 // __chkstk is only responsible for probing the stack. The 64-bit prologue is 605 // __chkstk is only responsible for probing the stack. The 64-bit prologue is
606 // responsible for adjusting the stack pointer. Touching the stack at 4K 606 // responsible for adjusting the stack pointer. Touching the stack at 4K
607 // increments is necessary to ensure that the guard pages used by the OS 607 // increments is necessary to ensure that the guard pages used by the OS
608 // virtual memory manager are allocated in correct sequence. 608 // virtual memory manager are allocated in correct sequence.
609 if (NumBytes >= 4096 && STI.isOSWindows() && !STI.isTargetEnvMacho()) { 609 if (NumBytes >= 4096 && STI.isOSWindows() && !STI.isTargetMacho()) {
610 const char *StackProbeSymbol; 610 const char *StackProbeSymbol;
611 bool isSPUpdateNeeded = false; 611 bool isSPUpdateNeeded = false;
612 612
613 if (Is64Bit) { 613 if (Is64Bit) {
614 if (STI.isTargetCygMing()) 614 if (STI.isTargetCygMing())