| 1 | //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===// |
|---|---|
| 2 | // |
| 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 |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file contains the BPF implementation of TargetFrameLowering class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #include "BPFFrameLowering.h" |
| 14 | #include "BPFSubtarget.h" |
| 15 | #include "llvm/CodeGen/MachineFrameInfo.h" |
| 16 | #include "llvm/CodeGen/MachineFunction.h" |
| 17 | |
| 18 | using namespace llvm; |
| 19 | |
| 20 | bool BPFFrameLowering::hasFPImpl(const MachineFunction &MF) const { |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | void BPFFrameLowering::emitPrologue(MachineFunction &MF, |
| 25 | MachineBasicBlock &MBB) const {} |
| 26 | |
| 27 | void BPFFrameLowering::emitEpilogue(MachineFunction &MF, |
| 28 | MachineBasicBlock &MBB) const {} |
| 29 | |
| 30 | void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF, |
| 31 | BitVector &SavedRegs, |
| 32 | RegScavenger *RS) const { |
| 33 | TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); |
| 34 | SavedRegs.reset(Idx: BPF::R6); |
| 35 | SavedRegs.reset(Idx: BPF::R7); |
| 36 | SavedRegs.reset(Idx: BPF::R8); |
| 37 | SavedRegs.reset(Idx: BPF::R9); |
| 38 | } |
| 39 |