diff options
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index b75842738ee..28475bded65 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -84,6 +84,12 @@ static cl::opt<int> ReciprocalEstimateRefinementSteps( "result of the hardware reciprocal estimate instruction."), cl::NotHidden); +// Force to store the stack protector cookie in the global variable +static cl::opt<bool> ForceGlobalVarStackProtectorCookie( + "x86-force-gv-stack-cookie", + cl::init(false), + cl::desc("Store the stack protector cookie in the global variable")); + // Forward declarations. static SDValue getMOVL(SelectionDAG &DAG, SDLoc dl, EVT VT, SDValue V1, SDValue V2); @@ -1962,6 +1968,9 @@ bool X86TargetLowering::getStackCookieLocation(unsigned &AddressSpace, if (!Subtarget->isTargetLinux()) return false; + if (ForceGlobalVarStackProtectorCookie) + return false; + if (Subtarget->is64Bit()) { // %fs:0x28, unless we're using a Kernel code model, in which case it's %gs: Offset = 0x28; |