diff options
-rw-r--r-- | docs/ReleaseNotes.rst | 8 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 8b33b6bc23b..b3f7c005ed1 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -105,6 +105,14 @@ Changes to the PowerPC Target During this release ... +Changes to the X86 Target +----------------------------- + + During this release ... + +* TLS is enabled for Cygwin as emutls. + + Changes to the OCaml bindings ----------------------------- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 241d8bb45c8..d2a20a1dde7 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -12258,6 +12258,12 @@ SDValue X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op); + + // Cygwin uses emutls. + // FIXME: It may be EmulatedTLS-generic also for X86-Android. + if (Subtarget->isTargetWindowsCygwin()) + return LowerToTLSEmulatedModel(GA, DAG); + const GlobalValue *GV = GA->getGlobal(); auto PtrVT = getPointerTy(DAG.getDataLayout()); |