[compiler-rt] r246454 - builtins: implement __emutls_get_address
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 08:15:51 PDT 2015
On Fri, Sep 04, 2015 at 08:00:34AM -0700, H.J. Lu via llvm-commits wrote:
> > +/* Emulated TLS objects are always allocated at run-time. */
> > +static inline void* emutls_allocate_object(__emutls_control* control) {
> > + /* Use standard C types, check with gcc's emutls.o. */
> > + typedef unsigned int gcc_word __attribute__((mode(word)));
> > + typedef unsigned int gcc_pointer __attribute__((mode(pointer)));
> > + COMPILE_TIME_ASSERT(sizeof(size_t) == sizeof(gcc_word));
>
> What is this assert for? It is false for x32 where size_t is 4 bytes and
> gcc_word 8 bytes.
To ensure that the struct layout is ABI compatible. So what layout does
GCC use?
Joerg
More information about the llvm-commits
mailing list