diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-20 07:56:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-20 07:56:31 +0000 |
commit | 85e42b45ac05223882f24c17bff66b89daa0d6fc (patch) | |
tree | 57c98ef1137921115043ccacffe880e41ffe5812 /lib/Target/Sparc/SparcRegisterInfo.td | |
parent | a5386b0823039ae5ccec81707d9c8a4ed7c4fb03 (diff) |
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
Diffstat (limited to 'lib/Target/Sparc/SparcRegisterInfo.td')
-rw-r--r-- | lib/Target/Sparc/SparcRegisterInfo.td | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/Sparc/SparcRegisterInfo.td b/lib/Target/Sparc/SparcRegisterInfo.td index aa79e2837e..07012b1626 100644 --- a/lib/Target/Sparc/SparcRegisterInfo.td +++ b/lib/Target/Sparc/SparcRegisterInfo.td @@ -84,8 +84,10 @@ def FLAGS_REGS : RegisterClass<"V8", [FlagVT], 32, [ICC, FCC]> { // def IntRegs : RegisterClass<"V8", [i32], 32, [L0, L1, L2, L3, L4, L5, L6, L7, I0, I1, I2, I3, I4, I5, - G1, O0, O1, O2, O3, O4, O5, O7, + + // FIXME: G1 reserved for now for large imm generation by frame code. + G1, // Non-allocatable regs: G2, G3, G4, // FIXME: OK for use only in // applications, not libraries. @@ -102,7 +104,8 @@ def IntRegs : RegisterClass<"V8", [i32], 32, [L0, L1, L2, L3, L4, L5, L6, L7, IntRegsClass::iterator IntRegsClass::allocation_order_end(MachineFunction &MF) const { // FIXME: These special regs should be taken out of the regclass! - return end()-10; // Don't allocate special registers + return end()-10 // Don't allocate special registers + -1; // FIXME: G1 reserved for large imm generation by frame code. } }]; } |