Reserve G1 for frame offset stuff and use it to handle large stack frames.
authorChris Lattner <sabre@nondot.org>
Tue, 20 Dec 2005 07:56:31 +0000 (07:56 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Dec 2005 07:56:31 +0000 (07:56 +0000)
commit85e42b45ac05223882f24c17bff66b89daa0d6fc
tree57c98ef1137921115043ccacffe880e41ffe5812
parenta5386b0823039ae5ccec81707d9c8a4ed7c4fb03
Reserve G1 for frame offset stuff and use it to handle large stack frames.
For example, instead of emitting this:

test:
        save -40112, %o6, %o6   ;; imm too large
        add %i6, -40016, %o0    ;; imm too large
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

emit this:

test:
        sethi 4194264, %g1
        or %g1, 848, %g1
        save %o6, %g1, %o6
        sethi 4194264, %g1
        add %g1, %i6, %g1
        add %i1, 944, %o0
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

which doesn't cause the assembler to barf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24880 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Sparc/SparcRegisterInfo.cpp
lib/Target/Sparc/SparcRegisterInfo.td
lib/Target/SparcV8/SparcV8RegisterInfo.cpp
lib/Target/SparcV8/SparcV8RegisterInfo.td