Path: blob/main/contrib/llvm-project/llvm/lib/MC/MCInstrInfo.cpp
35234 views
//===- lib/MC/MCInstrInfo.cpp - Target Instruction Info -------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/MC/MCInstrInfo.h"9#include "llvm/MC/MCInst.h"10#include "llvm/MC/MCSubtargetInfo.h"1112using namespace llvm;1314bool MCInstrInfo::getDeprecatedInfo(MCInst &MI, const MCSubtargetInfo &STI,15std::string &Info) const {16unsigned Opcode = MI.getOpcode();17if (ComplexDeprecationInfos && ComplexDeprecationInfos[Opcode])18return ComplexDeprecationInfos[Opcode](MI, STI, Info);19if (DeprecatedFeatures && DeprecatedFeatures[Opcode] != uint8_t(-1U) &&20STI.getFeatureBits()[DeprecatedFeatures[Opcode]]) {21// FIXME: it would be nice to include the subtarget feature here.22Info = "deprecated";23return true;24}25return false;26}272829