blob: f54e042df9d4347b07572eec67c6ca1437d9558f [file] [log] [blame]
Misha Brukmanb8bda132004-03-11 23:52:43 +00001//===-- TargetFrameInfo.cpp - Implement machine frame interface -*- C++ -*-===//
Misha Brukmanf976c852005-04-21 22:55:34 +00002//
Misha Brukmanb8bda132004-03-11 23:52:43 +00003// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
Misha Brukmanf976c852005-04-21 22:55:34 +00007//
Misha Brukmanb8bda132004-03-11 23:52:43 +00008//===----------------------------------------------------------------------===//
9//
10// Implements the layout of a stack frame on the target machine.
11//
12//===----------------------------------------------------------------------===//
13
14#include "llvm/Target/TargetFrameInfo.h"
15#include <cstdlib>
16
17using namespace llvm;
18
Reid Spencera1aad3b2005-04-25 02:55:55 +000019TargetFrameInfo::~TargetFrameInfo()
20{
21}
22
Misha Brukmanb8bda132004-03-11 23:52:43 +000023//===--------------------------------------------------------------------===//
24// These methods provide details of the stack frame used by Sparc, thus they
25// are Sparc specific.
26//===--------------------------------------------------------------------===//
27
Misha Brukmanb8bda132004-03-11 23:52:43 +000028// This method adjusts a stack offset to meet alignment rules of target.
Misha Brukmanf976c852005-04-21 22:55:34 +000029int
Misha Brukmanb8bda132004-03-11 23:52:43 +000030TargetFrameInfo::adjustAlignment(int unalignedOffset, bool growUp,
Misha Brukman1fb623e2005-02-17 21:40:27 +000031 unsigned align) const {
32 abort();
33 return 0;
34}
Misha Brukmanb8bda132004-03-11 23:52:43 +000035
36// These methods compute offsets using the frame contents for a particular
37// function. The frame contents are obtained from the MachineFunction object
38// for the given function. The rest must be implemented by the
39// machine-specific subclass.
Misha Brukmanf976c852005-04-21 22:55:34 +000040//
Misha Brukmanb8bda132004-03-11 23:52:43 +000041int
42TargetFrameInfo::getIncomingArgOffset(MachineFunction& mcInfo, unsigned argNum)
Misha Brukman1fb623e2005-02-17 21:40:27 +000043 const {
44 abort();
45 return 0;
46}
Misha Brukmanb8bda132004-03-11 23:52:43 +000047
48int
49TargetFrameInfo::getOutgoingArgOffset(MachineFunction& mcInfo,
Misha Brukman1fb623e2005-02-17 21:40:27 +000050 unsigned argNum) const {
51 abort();
52 return 0;
53}
Misha Brukmanb8bda132004-03-11 23:52:43 +000054
55int
Misha Brukmanb8bda132004-03-11 23:52:43 +000056TargetFrameInfo::getFirstAutomaticVarOffset(MachineFunction& mcInfo,
Misha Brukman1fb623e2005-02-17 21:40:27 +000057 bool& growUp) const {
58 abort();
59 return 0;
60}
Misha Brukmanb8bda132004-03-11 23:52:43 +000061
Misha Brukmanf976c852005-04-21 22:55:34 +000062int
Misha Brukmanb8bda132004-03-11 23:52:43 +000063TargetFrameInfo::getRegSpillAreaOffset(MachineFunction& mcInfo, bool& growUp)
Misha Brukman1fb623e2005-02-17 21:40:27 +000064 const {
65 abort();
66 return 0;
67}
Misha Brukmanb8bda132004-03-11 23:52:43 +000068
69int
Misha Brukman1fb623e2005-02-17 21:40:27 +000070TargetFrameInfo::getTmpAreaOffset(MachineFunction& mcInfo, bool& growUp) const {
71 abort();
72 return 0;
73}
Misha Brukmanb8bda132004-03-11 23:52:43 +000074
Misha Brukmanf976c852005-04-21 22:55:34 +000075int
Misha Brukmanb8bda132004-03-11 23:52:43 +000076TargetFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo, bool& growUp)
Misha Brukman1fb623e2005-02-17 21:40:27 +000077 const {
78 abort();
79 return 0;
80}
Misha Brukmanb8bda132004-03-11 23:52:43 +000081