New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS for PowerPC not supported #12965
Comments
I am working on this: http://lev.vlakno.cz/~rdivacky/llvm-ppc64-tls.patch Implementes working local exec TLS |
As of r158307. Compiling a file with Clang containing a static __thread int variable, I get this crash now: only local-exec TLS mode supported Any idea how I can specify that TLS mode, and why does it matter? |
This is fixed. All TLS modes are supported now. |
Just a hint, for 32-bit PPC this doesn't seem to work as of r178888. At the moment I cannot try HEAD, but I strongly suspect that this PR has been closed prematurely. (r178888 is well after 2013-02-18) Just a heads-up :-) |
Extended Description
Small testcase:
(attached)
$ cat tls-test.c
static __thread int sock = -1;
int main(void)
{
return sock;
}
With a PPC-configured Clang I get
$ clang tls-test.c
TLS not implemented for PPC
UNREACHABLE executed at PPCISelLowering.cpp:4562!
0 clang 0x0000000002438fc9
1 clang 0x0000000002438dbc
2 libpthread.so.0 0x000000375a80eb70
3 libc.so.6 0x0000003759c30265 gsignal + 53
4 libc.so.6 0x0000003759c31d10 abort + 272
5 clang 0x00000000024206f1
6 clang 0x0000000001b7ed10 llvm::PPCTargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const + 306
7 clang 0x0000000001cbd894
8 clang 0x0000000001cb74d2
9 clang 0x0000000001cdcbf2 llvm::SelectionDAG::Legalize() + 58
10 clang 0x0000000001c71d48 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 2772
11 clang 0x0000000001c70f16 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 258
12 clang 0x0000000001c73cba llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2918
13 clang 0x0000000001c703f8 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 902
The text was updated successfully, but these errors were encountered: