[PATCH] D19582: [X86] Add support for llvm.thread.pointer
Marcin KoĆcielnicki via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 12:10:27 PDT 2016
koriakin added a comment.
In http://reviews.llvm.org/D19582#421480, @reames wrote:
> This is missing documentation. It *looks* like you're trying to get the
> thread local storage pointer. Is that correct? This can't be reviewed
> without context and documented intent.
>
> Philip
This is indeed intended to fetch the TLS pointer: http://llvm.org/docs/LangRef.html#llvm-thread-pointer-intrinsic . For x86, this is simply the FS/GS base, ie. pointer to end of the TLS area. The intent is to support __builtin_thread_pointer() in clang, which comes useful in some strange places (eg. sanitizer_common uses it for aarch64, and could use it for x86 too if only gcc supported it as well).
Repository:
rL LLVM
http://reviews.llvm.org/D19582
More information about the llvm-commits
mailing list