Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 1 | //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file contains the BPF implementation of TargetFrameLowering class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #include "BPFFrameLowering.h" |
| 14 | #include "BPFInstrInfo.h" |
| 15 | #include "BPFSubtarget.h" |
| 16 | #include "llvm/CodeGen/MachineFrameInfo.h" |
| 17 | #include "llvm/CodeGen/MachineFunction.h" |
| 18 | #include "llvm/CodeGen/MachineInstrBuilder.h" |
| 19 | #include "llvm/CodeGen/MachineRegisterInfo.h" |
| 20 | |
| 21 | using namespace llvm; |
| 22 | |
| 23 | bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; } |
| 24 | |
Quentin Colombet | 61b305e | 2015-05-05 17:38:16 +0000 | [diff] [blame] | 25 | void BPFFrameLowering::emitPrologue(MachineFunction &MF, |
| 26 | MachineBasicBlock &MBB) const {} |
Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 27 | |
| 28 | void BPFFrameLowering::emitEpilogue(MachineFunction &MF, |
| 29 | MachineBasicBlock &MBB) const {} |
| 30 | |
Matthias Braun | 0256486 | 2015-07-14 17:17:13 +0000 | [diff] [blame] | 31 | void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF, |
| 32 | BitVector &SavedRegs, |
| 33 | RegScavenger *RS) const { |
| 34 | TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); |
| 35 | SavedRegs.reset(BPF::R6); |
| 36 | SavedRegs.reset(BPF::R7); |
| 37 | SavedRegs.reset(BPF::R8); |
| 38 | SavedRegs.reset(BPF::R9); |
Alexei Starovoitov | e4c8c80 | 2015-01-24 17:51:26 +0000 | [diff] [blame] | 39 | } |