On Thu, Jul 28, 2011 at 7:42 AM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Thu, Jul 28, 2011 at 3:47 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > >>>>> TLS on X32 is almost identical to TLS on x86-64. The only difference is >>>>> x32 address space is 32bit. That means TLS symbols can be in either >>>>> SImode or DImode with upper 32bit zero. This patch updates >>>>> tls_global_dynamic_64 to support x32. OK for trunk? >>> >>> Please also change 64bit GNU2_TLS patterns, so -mtls-dialect=gnu2 will >>> also work. Please see attached patch. >>> >> >> Yes, it works. Can you apply it? > > This is what I have committed: > > 2011-07-28 Uros Bizjak <ubiz...@gmail.com> > > PR target/47715 > * config/i386/i386.md (*tls_global_dynamic_64): Remove mode from > tls_symbolic_operand check. Update code sequence for TARGET_X32. > (tls_global_dynamic_64): Remove mode from tls_symbolic_operand check. > (tls_dynamic_gnu2_64): Ditto. > (*tls_dynamic_gnu2_lea_64): Ditto. > (*tls_dynamic_gnu2_call_64): Ditto. > (*tls_dynamic_gnu2_combine_64): Ditto. >
It looks good. I will check in @@ -12341,15 +12345,16 @@ return "call\t%P2"; } [(set_attr "type" "multi") - (set_attr "length" "16")]) + (set (attr "length") + (symbol_ref "TARGET_X32 ? 15 : 16"))]) since x32 is one byte shorter now. Thanks. -- H.J.