diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-08-28 05:13:42 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-08-28 05:13:42 +0000 |
| commit | 51195af45f4142035f23c7d58d1311face3900a4 (patch) | |
| tree | 2a3ffb0b5664e8f53f7bc1e7a910fd3b4b550252 /lib/Target/Mips/MipsTargetMachine.cpp | |
| parent | a2b1bb5296624d32a200f9c53d6f26c0c9c3bddc (diff) | |
Added method to get Mips register numbers
Changed the stack frame layout, StackGrowsUp fits better to Mips strange stack.
Stack offset calculation bug fixed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
| -rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 95db8242c7..372e267d46 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -31,13 +31,14 @@ createTargetAsmInfo() const } // DataLayout --> Big-endian, 32-bit pointer/ABI/alignment -// -// FrameInfo --> StackGrowsDown, 8 bytes aligned, -// LOA : 0 +// The stack is always 8 byte aligned +// On function prologue, the stack is created by decrementing +// its pointer. Once decremented, all references are done with positive +// offset from the stack/frame pointer, so StackGrowsUp is used. MipsTargetMachine:: MipsTargetMachine(const Module &M, const std::string &FS): Subtarget(*this, M, FS), DataLayout("E-p:32:32:32"), - InstrInfo(*this), FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), + InstrInfo(*this), FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0), TLInfo(*this) {} // return 0 and must specify -march to gen MIPS code. |
