/src/keystone/llvm/lib/MC/MCInstrDesc.cpp
Line | Count | Source |
1 | | //===------ llvm/MC/MCInstrDesc.cpp- Instruction Descriptors --------------===// |
2 | | // |
3 | | // The LLVM Compiler Infrastructure |
4 | | // |
5 | | // This file is distributed under the University of Illinois Open Source |
6 | | // License. See LICENSE.TXT for details. |
7 | | // |
8 | | //===----------------------------------------------------------------------===// |
9 | | // |
10 | | // This file defines methods on the MCOperandInfo and MCInstrDesc classes, which |
11 | | // are used to describe target instructions and their operands. |
12 | | // |
13 | | //===----------------------------------------------------------------------===// |
14 | | |
15 | | #include "llvm/MC/MCInstrDesc.h" |
16 | | #include "llvm/MC/MCInst.h" |
17 | | #include "llvm/MC/MCRegisterInfo.h" |
18 | | #include "llvm/MC/MCSubtargetInfo.h" |
19 | | |
20 | | using namespace llvm_ks; |
21 | | |
22 | | bool MCInstrDesc::getDeprecatedInfo(MCInst &MI, const MCSubtargetInfo &STI, |
23 | 149k | std::string &Info) const { |
24 | 149k | if (ComplexDeprecationInfo) |
25 | 3.48k | return ComplexDeprecationInfo(MI, STI, Info); |
26 | 145k | if (DeprecatedFeature != -1 && STI.getFeatureBits()[DeprecatedFeature]) { |
27 | | // FIXME: it would be nice to include the subtarget feature here. |
28 | 291 | Info = "deprecated"; |
29 | 291 | return true; |
30 | 291 | } |
31 | 145k | return false; |
32 | 145k | } |