From 2d7298c362e3ec5f16ebeddf2e68de0ebeb1ff9a Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Fri, 7 Apr 2006 16:34:46 +0000 Subject: Foundation for call frame information. llvm-svn: 27491 --- llvm/lib/Target/MRegisterInfo.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'llvm/lib/Target/MRegisterInfo.cpp') 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 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 &Moves) const { + // Default is to do nothing. +} + -- cgit v1.2.3