diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-03-06 05:31:21 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-03-06 05:31:21 +0000 |
commit | d69b3c58d3e6f2edc52bfe431522cd1db8db4652 (patch) | |
tree | 947a0d15bce3061980df2c99683698c09d88cc25 | |
parent | a8b00cafc4b79f3ef05fdd1cdfc0d58f10740e69 (diff) | |
download | external_llvm-d69b3c58d3e6f2edc52bfe431522cd1db8db4652.zip external_llvm-d69b3c58d3e6f2edc52bfe431522cd1db8db4652.tar.gz external_llvm-d69b3c58d3e6f2edc52bfe431522cd1db8db4652.tar.bz2 |
Make prolog align stack properly. Make epilog not touch any registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12183 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Sparc/SparcRegisterInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/SparcV8/SparcV8RegisterInfo.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/Sparc/SparcRegisterInfo.cpp b/lib/Target/Sparc/SparcRegisterInfo.cpp index 6817b7e..7acf882 100644 --- a/lib/Target/Sparc/SparcRegisterInfo.cpp +++ b/lib/Target/Sparc/SparcRegisterInfo.cpp @@ -71,15 +71,15 @@ void SparcV8RegisterInfo::emitPrologue(MachineFunction &MF) const { // Eventually this should emit the correct save instruction based on the // number of bytes in the frame. For now we just hardcode it. - BuildMI(MBB, MBB.begin(), V8::SAVEi, 2, V8::SP).addImm(-122).addReg(V8::SP); + BuildMI(MBB, MBB.begin(), V8::SAVEri, 2, V8::SP).addImm(-112).addReg(V8::SP); } void SparcV8RegisterInfo::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = prior(MBB.end()); - assert(MBBI->getOpcode() == V8::JMPLi && - "Can only put epilog before return instruction!"); - BuildMI(MBB, MBBI, V8::RESTOREi, 2, V8::O0).addImm(0).addReg(V8::L7); + assert(MBBI->getOpcode() == V8::RETL && + "Can only put epilog before 'retl' instruction!"); + BuildMI(MBB, MBBI, V8::RESTORErr, 2, V8::G0).addReg(V8::G0).addReg(V8::G0); } diff --git a/lib/Target/SparcV8/SparcV8RegisterInfo.cpp b/lib/Target/SparcV8/SparcV8RegisterInfo.cpp index 6817b7e..7acf882 100644 --- a/lib/Target/SparcV8/SparcV8RegisterInfo.cpp +++ b/lib/Target/SparcV8/SparcV8RegisterInfo.cpp @@ -71,15 +71,15 @@ void SparcV8RegisterInfo::emitPrologue(MachineFunction &MF) const { // Eventually this should emit the correct save instruction based on the // number of bytes in the frame. For now we just hardcode it. - BuildMI(MBB, MBB.begin(), V8::SAVEi, 2, V8::SP).addImm(-122).addReg(V8::SP); + BuildMI(MBB, MBB.begin(), V8::SAVEri, 2, V8::SP).addImm(-112).addReg(V8::SP); } void SparcV8RegisterInfo::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = prior(MBB.end()); - assert(MBBI->getOpcode() == V8::JMPLi && - "Can only put epilog before return instruction!"); - BuildMI(MBB, MBBI, V8::RESTOREi, 2, V8::O0).addImm(0).addReg(V8::L7); + assert(MBBI->getOpcode() == V8::RETL && + "Can only put epilog before 'retl' instruction!"); + BuildMI(MBB, MBBI, V8::RESTORErr, 2, V8::G0).addReg(V8::G0).addReg(V8::G0); } |