From bcce80fa95e82ba9f7736525b81dbac577b5557e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 16 Jul 2012 14:17:08 +0000 Subject: AMDGPU: Add core backend files for R600/SI codegen v6 llvm-svn: 160270 --- llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp (limited to 'llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp') diff --git a/llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp b/llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp new file mode 100644 index 00000000000..87eca87e301 --- /dev/null +++ b/llvm/lib/Target/AMDGPU/AMDILFrameLowering.cpp @@ -0,0 +1,53 @@ +//===----------------------- AMDILFrameLowering.cpp -----------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//==-----------------------------------------------------------------------===// +// +// Interface to describe a layout of a stack frame on a AMDIL target machine +// +//===----------------------------------------------------------------------===// +#include "AMDILFrameLowering.h" +#include "llvm/CodeGen/MachineFrameInfo.h" + +using namespace llvm; +AMDILFrameLowering::AMDILFrameLowering(StackDirection D, unsigned StackAl, + int LAO, unsigned TransAl) + : TargetFrameLowering(D, StackAl, LAO, TransAl) +{ +} + +AMDILFrameLowering::~AMDILFrameLowering() +{ +} + +/// getFrameIndexOffset - Returns the displacement from the frame register to +/// the stack frame of the specified index. +int AMDILFrameLowering::getFrameIndexOffset(const MachineFunction &MF, + int FI) const { + const MachineFrameInfo *MFI = MF.getFrameInfo(); + return MFI->getObjectOffset(FI); +} + +const TargetFrameLowering::SpillSlot * +AMDILFrameLowering::getCalleeSavedSpillSlots(unsigned &NumEntries) const +{ + NumEntries = 0; + return 0; +} +void +AMDILFrameLowering::emitPrologue(MachineFunction &MF) const +{ +} +void +AMDILFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const +{ +} +bool +AMDILFrameLowering::hasFP(const MachineFunction &MF) const +{ + return false; +} -- cgit v1.2.3