mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-02 13:12:09 +00:00

To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible. More patches will follow. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D146449
46 lines
1.6 KiB
C++
46 lines
1.6 KiB
C++
//=- RISCVMachineFunctionInfo.cpp - RISC-V machine function info --*- C++ -*-=//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares RISCV-specific per-machine-function information.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "RISCVMachineFunctionInfo.h"
|
|
|
|
using namespace llvm;
|
|
|
|
yaml::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo(
|
|
const llvm::RISCVMachineFunctionInfo &MFI)
|
|
: VarArgsFrameIndex(MFI.getVarArgsFrameIndex()),
|
|
VarArgsSaveSize(MFI.getVarArgsSaveSize()) {}
|
|
|
|
MachineFunctionInfo *RISCVMachineFunctionInfo::clone(
|
|
BumpPtrAllocator &Allocator, MachineFunction &DestMF,
|
|
const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)
|
|
const {
|
|
return DestMF.cloneInfo<RISCVMachineFunctionInfo>(*this);
|
|
}
|
|
|
|
void yaml::RISCVMachineFunctionInfo::mappingImpl(yaml::IO &YamlIO) {
|
|
MappingTraits<RISCVMachineFunctionInfo>::mapping(YamlIO, *this);
|
|
}
|
|
|
|
void RISCVMachineFunctionInfo::initializeBaseYamlFields(
|
|
const yaml::RISCVMachineFunctionInfo &YamlMFI) {
|
|
VarArgsFrameIndex = YamlMFI.VarArgsFrameIndex;
|
|
VarArgsSaveSize = YamlMFI.VarArgsSaveSize;
|
|
}
|
|
|
|
void RISCVMachineFunctionInfo::addSExt32Register(Register Reg) {
|
|
SExt32Registers.push_back(Reg);
|
|
}
|
|
|
|
bool RISCVMachineFunctionInfo::isSExt32Register(Register Reg) const {
|
|
return is_contained(SExt32Registers, Reg);
|
|
}
|