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]

Re: Fix PR44169, load_toc_v4_PIC_1b


On Mon, May 31, 2010 at 2:57 AM, Alan Modra <amodra@gmail.com> wrote:
> load_toc_v4_PIC_1b is an unspec that sets lr to the location of a word
> containing a pc-relative _GLOBAL_OFFSET_TABLE_ address. ?Currently
> the rtl doesn't contain anything that says the output depends on pc,
> so gcc is free to combine two occurrences of this insn. ?At one stage
> in gcc's history, the entire sequence of insns using this one to set
> up the got pointer was marked with REG_LIBCALL/REG_RETVAL notes. ?When
> optimizing, gcc used to combine the entire sequence with a previous
> sequence, but at -O1 we now emit wrong code.
>
> Fixed by adding a label to the rtl. ?Bootstrapped and regression
> tested powerpc-linux. ?OK mainline and branches?
>
> ? ? ? ?PR target/44169
> ? ? ? ?* config/rs6000/rs6000.md (load_toc_v4_PIC_1b): Add label operand.
> ? ? ? ?* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Pass label
> ? ? ? ?rtx to gen_load_toc_v4_PIC_1b. ?Tidy.
> ? ? ? ?(rs6000_emit_load_toc_table): Likewise.

Okay.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]