[llvm-commits] [llvm] r154304 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/tls-pie.ll test/CodeGen/X86/tls.ll

Anton Korobeynikov anton at korobeynikov.info
Mon Apr 9 01:02:54 PDT 2012


> 5) 64-bit small PIC code which is *not* using RIP-relative addressing.
>   This is the only case changed by the patch, and the primary place you
>   see it is in TLS, either the win64 section offset TLS or Linux
>   local-exec TLS model in a PIC compilation. Here the ABI again ensures
>   that the immediates fit because we are in small mode,
Just to clarify:

1. In small code model all the data and code resides in positive
31-bit space. So, we can easily check whether everything fits.
2. In small + pic code model all the data + code + got/plt fits into
31-bit space "around" %rip. So, we can again fold stuff here. Same
applies to TLS, but with %rip substituted by thread pointer :)

Patch looks good to me, but I'd prefer additional PIC-aware testing,
e.g. building some huge Qt app, or KDE, so something which uses shared
libs here and there :)

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the llvm-commits mailing list