builtins: Fix struct __emutls_control to match GCC
authorChih-Hung Hsieh <chh@google.com>
Thu, 4 Feb 2016 20:26:00 +0000 (20:26 +0000)
committerChih-Hung Hsieh <chh@google.com>
Thu, 4 Feb 2016 20:26:00 +0000 (20:26 +0000)
commitc2fab48145623c97d1658c35acc37b95919b1e27
treebc785b62aed78f24841492a86619231887a026d4
parent77b326f39d8b33615a57d41d868ae0bbcddd5bf4
builtins: Fix struct __emutls_control to match GCC

The type of size and align in struct __emutls_control must be
  typedef unsigned int gcc_word __attribute__((mode(word)));
to match GCC. When gcc_word is larger than size_t, which is the case
for x32, the upper extra bits are all zeros. We can use variables of
size_t to operate on size and align.

Fix one trivial C99 warning about mixed declaration and code.

Differential Revision: http://reviews.llvm.org/D16886

llvm-svn: 259824
compiler-rt/lib/builtins/emutls.c