Implementing native TLS on OS X in DMD
Jacob Carlborg via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Fri Jan 8 09:00:20 PST 2016
On 2016-01-08 17:40, Jacob Carlborg wrote:
Adding the assembly for convenience
> * I'm looking at the assembly output of LDC, it looks liked LDC aligns
> to the size of the type, i.e. "int" to 4 and "long" to 8 and so on, is
> that the case?
Without initializer:
.tbss __D4main1ai$tlv$init, 4, 3
BTW, do you know that the above 3 is?
> * It looks like the only uses the above form of alignment if the symbol
> is placed in the __thread_bss section, i.e. doesn't have an initializer.
> Does that make sense? If it's has a initializer and is placed in the
> __thread_data section it will have the alignment of 3 or 4, depending of
> the size of the variable.
With initializer:
.section __DATA,__thread_data,thread_local_regular
.align 3
__D4main1ai$tlv$init:
.long 4
--
/Jacob Carlborg
More information about the digitalmars-d-ldc
mailing list