summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/MRegisterInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-04-07 16:34:46 +0000
committerJim Laskey <jlaskey@mac.com>2006-04-07 16:34:46 +0000
commit2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a (patch)
tree3ead77af5d3ba6edcc69872a3ebce4ce8ba0dc90 /llvm/lib/Target/MRegisterInfo.cpp
parente690a93c64effabe71dc4450e0913508a8440dd8 (diff)
downloadbcm5719-llvm-2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a.tar.gz
bcm5719-llvm-2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a.zip
Foundation for call frame information.
llvm-svn: 27491
Diffstat (limited to 'llvm/lib/Target/MRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/MRegisterInfo.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/MRegisterInfo.cpp b/llvm/lib/Target/MRegisterInfo.cpp
index 558783aedc4..4ddfe9f3230 100644
--- a/llvm/lib/Target/MRegisterInfo.cpp
+++ b/llvm/lib/Target/MRegisterInfo.cpp
@@ -44,6 +44,13 @@ std::vector<bool> MRegisterInfo::getAllocatableSet(MachineFunction &MF) const {
return Allocatable;
}
+/// getStackDirection - This method should return the factor by which stacks
+/// grow. The tyical value is -4 which is the grows negatively in 4 byte
+/// increments.
+int MRegisterInfo::getStackDirection() const {
+ return -sizeof(int32_t);
+}
+
/// getLocation - This method should return the actual location of a frame
/// variable given the frame index. The location is returned in ML.
/// Subclasses should override this method for special handling of frame
@@ -54,3 +61,11 @@ void MRegisterInfo::getLocation(MachineFunction &MF, unsigned Index,
ML.set(getFrameRegister(MF),
MFI->getObjectOffset(Index) + MFI->getStackSize());
}
+
+/// getInitialFrameState - Returns a list of machine moves that are assumed
+/// on entry to a function.
+void
+MRegisterInfo::getInitialFrameState(std::vector<MachineMove *> &Moves) const {
+ // Default is to do nothing.
+}
+
OpenPOWER on IntegriCloud