1 //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the BPF implementation of TargetFrameLowering class.
12 //===----------------------------------------------------------------------===//
14 #include "BPFFrameLowering.h"
15 #include "BPFInstrInfo.h"
16 #include "BPFSubtarget.h"
17 #include "llvm/CodeGen/MachineFrameInfo.h"
18 #include "llvm/CodeGen/MachineFunction.h"
19 #include "llvm/CodeGen/MachineInstrBuilder.h"
20 #include "llvm/CodeGen/MachineRegisterInfo.h"
24 bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; }
26 void BPFFrameLowering::emitPrologue(MachineFunction &MF,
27 MachineBasicBlock &MBB) const {}
29 void BPFFrameLowering::emitEpilogue(MachineFunction &MF,
30 MachineBasicBlock &MBB) const {}
32 void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF,
34 RegScavenger *RS) const {
35 TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS);
36 SavedRegs.reset(BPF::R6);
37 SavedRegs.reset(BPF::R7);
38 SavedRegs.reset(BPF::R8);
39 SavedRegs.reset(BPF::R9);