llvm.org GIT mirror llvm / 85c0835
Implement eliminateCallFramePseudoInstr(). Wrap a long comment line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16883 91177308-0d34-0410-b5e6-96231b3b80d8 Brian Gaeke 15 years ago
2 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
7676 void SparcV8RegisterInfo::
7777 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
7878 MachineBasicBlock::iterator I) const {
79 std::cerr
80 << "Sorry, I don't know how to eliminate call frame pseudo instrs yet, in\n"
81 << __FUNCTION__ << " at " << __FILE__ << ":" << __LINE__ << "\n";
82 abort();
79 MachineInstr &MI = *I;
80 int size = MI.getOperand (0).getImmedValue ();
81 if (MI.getOpcode () == V8::ADJCALLSTACKDOWN)
82 size = -size;
83 BuildMI (MBB, I, V8::ADDri, 2, V8::SP).addReg (V8::SP).addSImm (size);
84 MBB.erase (I);
8385 }
8486
8587 void
114116 // Get the number of bytes to allocate from the FrameInfo
115117 int NumBytes = (int) MFI->getStackSize();
116118
117 // Emit the correct save instruction based on the number of bytes in the frame.
118 // Minimum stack frame size according to V8 ABI is:
119 // Emit the correct save instruction based on the number of bytes in
120 // the frame. Minimum stack frame size according to V8 ABI is:
119121 // 16 words for register window spill
120122 // 1 word for address of returned aggregate-value
121123 // + 6 words for passing parameters on the stack
7676 void SparcV8RegisterInfo::
7777 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
7878 MachineBasicBlock::iterator I) const {
79 std::cerr
80 << "Sorry, I don't know how to eliminate call frame pseudo instrs yet, in\n"
81 << __FUNCTION__ << " at " << __FILE__ << ":" << __LINE__ << "\n";
82 abort();
79 MachineInstr &MI = *I;
80 int size = MI.getOperand (0).getImmedValue ();
81 if (MI.getOpcode () == V8::ADJCALLSTACKDOWN)
82 size = -size;
83 BuildMI (MBB, I, V8::ADDri, 2, V8::SP).addReg (V8::SP).addSImm (size);
84 MBB.erase (I);
8385 }
8486
8587 void
114116 // Get the number of bytes to allocate from the FrameInfo
115117 int NumBytes = (int) MFI->getStackSize();
116118
117 // Emit the correct save instruction based on the number of bytes in the frame.
118 // Minimum stack frame size according to V8 ABI is:
119 // Emit the correct save instruction based on the number of bytes in
120 // the frame. Minimum stack frame size according to V8 ABI is:
119121 // 16 words for register window spill
120122 // 1 word for address of returned aggregate-value
121123 // + 6 words for passing parameters on the stack