How to make gcc generate optimized code for statically linked TLS

2013-07-15 Thread Vitali Sokhin
Hello, I use gcc-linaro-aarch64-linux-gnu-4.8 to compile my C code with thread-local variables. Here is an example of my C code: __thread u32 threadedVar; void test(void) { threadedVar = 0xDEAD; } gcc produces the following assembly to access my threaded variable: threadedVar = 0xDEAD;

Re: How to make gcc generate optimized code for statically linked TLS

2013-07-14 Thread Vitali Sokhin
-- > *From:* linaro-toolchain-boun...@lists.linaro.org < > linaro-toolchain-boun...@lists.linaro.org> on behalf of Vitali Sokhin < > vitali.sok...@gmail.com> > *Sent:* Sunday, July 14, 2013 12:21 AM > *To:* linaro-toolchain@lists.linaro.org > *Subject:

RE: How to make gcc generate optimized code for statically linked TLS

2013-07-14 Thread Pinski, Andrew
ow to make gcc generate optimized code for statically linked TLS Hello, I use gcc-linaro-aarch64-linux-gnu-4.8 to compile my C code with thread-local variables. Here is an example of my C code: __thread u32 threadedVar; void test(void) { threadedVar = 0xDEAD; } gcc produces the following ass

How to make gcc generate optimized code for statically linked TLS

2013-07-14 Thread Vitali Sokhin
Hello, I use gcc-linaro-aarch64-linux-gnu-4.8 to compile my C code with thread-local variables. Here is an example of my C code: __thread u32 threadedVar; void test(void) { threadedVar = 0xDEAD; } gcc produces the following assembly to access my threaded variable: threadedVar = 0xDEAD;