blob: 7255b3254f8cde06a5c19cdb75b3f8f0143230ee [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
19//===--------------------------------------------------------------------===//
20// These methods provide details of the stack frame used by Sparc, thus they
21// are Sparc specific.
22//===--------------------------------------------------------------------===//
23
Misha Brukmanb8bda132004-03-11 23:52:43 +000024// This method adjusts a stack offset to meet alignment rules of target.
Misha Brukmanf976c852005-04-21 22:55:34 +000025int
Misha Brukmanb8bda132004-03-11 23:52:43 +000026TargetFrameInfo::adjustAlignment(int unalignedOffset, bool growUp,
Misha Brukman1fb623e2005-02-17 21:40:27 +000027 unsigned align) const {
28 abort();
29 return 0;
30}
Misha Brukmanb8bda132004-03-11 23:52:43 +000031
32// These methods compute offsets using the frame contents for a particular
33// function. The frame contents are obtained from the MachineFunction object
34// for the given function. The rest must be implemented by the
35// machine-specific subclass.
Misha Brukmanf976c852005-04-21 22:55:34 +000036//
Misha Brukmanb8bda132004-03-11 23:52:43 +000037int
38TargetFrameInfo::getIncomingArgOffset(MachineFunction& mcInfo, unsigned argNum)
Misha Brukman1fb623e2005-02-17 21:40:27 +000039 const {
40 abort();
41 return 0;
42}
Misha Brukmanb8bda132004-03-11 23:52:43 +000043
44int
45TargetFrameInfo::getOutgoingArgOffset(MachineFunction& mcInfo,
Misha Brukman1fb623e2005-02-17 21:40:27 +000046 unsigned argNum) const {
47 abort();
48 return 0;
49}
Misha Brukmanb8bda132004-03-11 23:52:43 +000050
51int
Misha Brukmanb8bda132004-03-11 23:52:43 +000052TargetFrameInfo::getFirstAutomaticVarOffset(MachineFunction& mcInfo,
Misha Brukman1fb623e2005-02-17 21:40:27 +000053 bool& growUp) const {
54 abort();
55 return 0;
56}
Misha Brukmanb8bda132004-03-11 23:52:43 +000057
Misha Brukmanf976c852005-04-21 22:55:34 +000058int
Misha Brukmanb8bda132004-03-11 23:52:43 +000059TargetFrameInfo::getRegSpillAreaOffset(MachineFunction& mcInfo, bool& growUp)
Misha Brukman1fb623e2005-02-17 21:40:27 +000060 const {
61 abort();
62 return 0;
63}
Misha Brukmanb8bda132004-03-11 23:52:43 +000064
65int
Misha Brukman1fb623e2005-02-17 21:40:27 +000066TargetFrameInfo::getTmpAreaOffset(MachineFunction& mcInfo, bool& growUp) const {
67 abort();
68 return 0;
69}
Misha Brukmanb8bda132004-03-11 23:52:43 +000070
Misha Brukmanf976c852005-04-21 22:55:34 +000071int
Misha Brukmanb8bda132004-03-11 23:52:43 +000072TargetFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo, bool& growUp)
Misha Brukman1fb623e2005-02-17 21:40:27 +000073 const {
74 abort();
75 return 0;
76}
Misha Brukmanb8bda132004-03-11 23:52:43 +000077