This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sun, Mar 11, 2012 at 10:24 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > Here is the patch which is equivalent to clearing MASK_TLS_DIRECT_SEG_REFS > when Pmode != word_mode. ?We need to keep > > ? ? ? ? ?else if (Pmode == SImode) > ? ? ? ? ? ?{ > ? ? ? ? ? ? ?/* Always generate > ? ? ? ? ? ? ? ? ? ? ? ?movl %fs:0, %reg32 > ? ? ? ? ? ? ? ? ? ? ? ?addl xgottpoff(%rip), %reg32 > ? ? ? ? ? ? ? ? to support linker IE->LE optimization and avoid > ? ? ? ? ? ? ? ? fs:(%reg32) as memory operand. ?*/ > ? ? ? ? ? ? ?dest = gen_reg_rtx (Pmode); > ? ? ? ? ? ? ?emit_insn (gen_tls_initial_exec_x32 (dest, x)); > ? ? ? ? ? ? ?return dest; > ? ? ? ? ? ?} > > to support linker IE->LE optimization. ?TARGET_TLS_DIRECT_SEG_REFS only affects > TLS LE access and fs:(%reg) is only generated by combine. > > So the main impact of disabling TARGET_TLS_DIRECT_SEG_REFS is to disable > fs:immediate memory operand for TLS LE access, which doesn't have any problems > to begin with. > > I would prefer to keep TARGET_TLS_DIRECT_SEG_REFS and disable only > fs:(%reg), which is generated by combine. Please try attached patch. It introduces TARGET_TLS_INDIRECT_SEG_REFS to block only indirect seg references. Uros.
Attachment:
p.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |