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]

Patch (rs6000): Do not save/restore user-defined global registers


The documentation is clear that the prologue/epilogue is not supposed to save and
restore user-defined global registers. As far as I can see this has never worked on rs6000;
we were not considering globals when deciding whether to use stmw/lmw.
Along the way I found that Darwin was marking the PIC register as a user-defined
global. This dates back to the original Darwin checkin, and may have been necessary
at that time as a workaround for some other bug, but it's wrong and doesn't seem to
be needed now. Bootstrapped and tested.


(Is the syntax "r29" in the test case acceptable to all targets? if not, what do I need to use?)

2005-06-03 Dale Johannesen <dalej@apple.com>

        * config/rs6000/rs6000.c (no_global_regs_above): New.
        (rs6000_emit_prologue):  Use it; cosmetic formatting fixes.
        (rs6000_emit_epilogue):  Use it; cosmetic formatting fixes.
        (rs6000_conditional_register_usage): Don't put Darwin PIC
        register in global_regs.

Attachment: diffs8a.txt
Description: Text document

Attachment: 20050603-1.c
Description: Text document



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