On 2013-01-09 11:38, Walter Bright wrote:

Watcha do is something like this:

__thread int x;
int foo() { return x; }

Compile, disassemble, and look at the code generated and the fixup
records. Then there's no need to guess :-)

As I said, I don't know assembly but here's the output:

Original code: http://pastebin.com/UKb6etWD

Disassembly with TLS: http://pastebin.com/nkdnE9w6
Disassembly without TLS: http://pastebin.com/vuvEBWWH

Object dump with TLS: http://pastebin.com/PqpPw56a
Object dump without TLS: http://pastebin.com/ki6atzEm

--
/Jacob Carlborg

Reply via email to