[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. When targeting apple platforms, these functions are implemented in Unwind_AppleExtras.cpp, but there's previously no implementation for other platforms. Does `__thread` have any specific runtime requirements on e.g. windows? https://reviews.llvm.org/D38250 Files

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. I have a complete implementation for this which is known to work on Windows at least. The only thing that `__thread` requires is a working linker (which does not include binutil

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38250#880871, @compnerd wrote: > I have a complete implementation for this which is known to work on Windows > at least. Patches for libunwind, or standalone? In any case, please do share if you think it's relevant. > The only thing that

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Ugh, I was mixing up `_Unwind_SjLj_Register` with this function. Comment at: src/Unwind-sjlj.c:468 +#ifndef __APPLE__ +__thread struct _Unwind_FunctionContext *stack = NULL; I would prefer: #if !defined(__APPLE__)

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/Unwind-sjlj.c:468 +#ifndef __APPLE__ +__thread struct _Unwind_FunctionContext *stack = NULL; compnerd wrote: > I would prefer: > > #if !defined(__APPLE__) Sure, I can change that. Comment a

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 117089. mstorsjo edited the summary of this revision. mstorsjo added a comment. Made the tls variable static, changed ifndef into !defined(). https://reviews.llvm.org/D38250 Files: src/Unwind-sjlj.c Index: src/Unwind-sjlj.c

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: src/Unwind-sjlj.c:481 +#endif // !defined(__APPLE__) + #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS) mstorsjo wrote: > compnerd wrote: >

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Actually, Ill go ahead and make the more invasive change and that will provide this properly. https://reviews.llvm.org/D38250 ___

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/Unwind-sjlj.c:481 +#endif // !defined(__APPLE__) + #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS) compnerd wrote: > mstorsjo wrote: > > compnerd wrote: > > > Can't both of these also be static? > > No, since they're

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I believe that SVN r314632 should address the issue more thorougly. https://reviews.llvm.org/D38250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo abandoned this revision. mstorsjo added a comment. Works fine with the version from r314632 (with a minor fixup in r314635). https://reviews.llvm.org/D38250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b