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: [PATCH 4/4] Split-stack arg pointer init refinement


This small refinement to the -fsplit-stack prologue arg pointer
initialization improves code generation.  Compare the -O2
gcc/testsuite/gcc.dg/split-3.c code for down() below.

before            after
    mflr 0            mflr 0
    std 31,-8(1)        std 31,-8(1)
    std 0,16(1)        mr 12,1
    stdu 1,-10144(1)    std 0,16(1)
    addi 12,1,10144        stdu 1,-10144(1)
    bge 7,.L7        bge 7,.L7
    mr 12,29        mr 12,29
.L7:            .L7:

    * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Return
    stack adjusting insn.  Formatting.
    (rs6000_emit_prologue): Track stack adjusting insn, and use of
    r12.  If possible, emit first -fsplit-stack arg pointer insn
    before stack adjust.  Don't use r12 to save cr if split-stack.

This patch is okay.  Nice improvement.

Thanks, David


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