39 lines · cpp
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-exception6//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 18using namespace llvm;19 20bool BPFFrameLowering::hasFPImpl(const MachineFunction &MF) const {21 return true;22}23 24void BPFFrameLowering::emitPrologue(MachineFunction &MF,25 MachineBasicBlock &MBB) const {}26 27void BPFFrameLowering::emitEpilogue(MachineFunction &MF,28 MachineBasicBlock &MBB) const {}29 30void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF,31 BitVector &SavedRegs,32 RegScavenger *RS) const {33 TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS);34 SavedRegs.reset(BPF::R6);35 SavedRegs.reset(BPF::R7);36 SavedRegs.reset(BPF::R8);37 SavedRegs.reset(BPF::R9);38}39