Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 1 | //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the BPF implementation of TargetFrameLowering class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 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" |
| 21 | |
| 22 | using namespace llvm; |
| 23 | |
| 24 | bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; } |
| 25 | |
Quentin Colombet | 61b305e | 2015-05-05 17:38:16 +0000 | [diff] [blame] | 26 | void BPFFrameLowering::emitPrologue(MachineFunction &MF, |
| 27 | MachineBasicBlock &MBB) const {} |
Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 28 | |
| 29 | void BPFFrameLowering::emitEpilogue(MachineFunction &MF, |
| 30 | MachineBasicBlock &MBB) const {} |
| 31 | |
Matthias Braun | 0256486 | 2015-07-14 17:17:13 +0000 | [diff] [blame] | 32 | void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF, |
| 33 | BitVector &SavedRegs, |
| 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); |
Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 40 | } |