10b57cec5SDimitry Andric //===-- Mips16RegisterInfo.h - Mips16 Register Information ------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file contains the Mips16 implementation of the TargetRegisterInfo class. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H 140b57cec5SDimitry Andric #define LLVM_LIB_TARGET_MIPS_MIPS16REGISTERINFO_H 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric #include "MipsRegisterInfo.h" 170b57cec5SDimitry Andric 180b57cec5SDimitry Andric namespace llvm { 190b57cec5SDimitry Andric 200b57cec5SDimitry Andric class Mips16RegisterInfo : public MipsRegisterInfo { 210b57cec5SDimitry Andric public: 220b57cec5SDimitry Andric Mips16RegisterInfo(); 230b57cec5SDimitry Andric 240b57cec5SDimitry Andric bool requiresRegisterScavenging(const MachineFunction &MF) const override; 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric bool requiresFrameIndexScavenging(const MachineFunction &MF) const override; 270b57cec5SDimitry Andric 280b57cec5SDimitry Andric bool useFPForScavengingIndex(const MachineFunction &MF) const override; 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric bool saveScavengerRegister(MachineBasicBlock &MBB, 310b57cec5SDimitry Andric MachineBasicBlock::iterator I, 320b57cec5SDimitry Andric MachineBasicBlock::iterator &UseMI, 330b57cec5SDimitry Andric const TargetRegisterClass *RC, 34*5ffd83dbSDimitry Andric Register Reg) const override; 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric const TargetRegisterClass *intRegClass(unsigned Size) const override; 370b57cec5SDimitry Andric 380b57cec5SDimitry Andric private: 390b57cec5SDimitry Andric void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo, 400b57cec5SDimitry Andric int FrameIndex, uint64_t StackSize, 410b57cec5SDimitry Andric int64_t SPOffset) const override; 420b57cec5SDimitry Andric }; 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric } // end namespace llvm 450b57cec5SDimitry Andric 460b57cec5SDimitry Andric #endif 47