xref: /freebsd/contrib/llvm-project/llvm/lib/MC/MCInstrAnalysis.cpp (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 //===- MCInstrAnalysis.cpp - InstrDesc target hooks -----------------------===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "llvm/MC/MCInstrAnalysis.h"
10 
11 #include "llvm/ADT/APInt.h"
12 #include <cstdint>
13 
14 namespace llvm {
15 class MCSubtargetInfo;
16 }
17 
18 using namespace llvm;
19 
20 bool MCInstrAnalysis::clearsSuperRegisters(const MCRegisterInfo &MRI,
21                                            const MCInst &Inst,
22                                            APInt &Writes) const {
23   Writes.clearAllBits();
24   return false;
25 }
26 
27 bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
28                                      uint64_t /*Size*/,
29                                      uint64_t & /*Target*/) const {
30   return false;
31 }
32 
33 std::optional<uint64_t> MCInstrAnalysis::evaluateMemoryOperandAddress(
34     const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr,
35     uint64_t Size) const {
36   return std::nullopt;
37 }
38 
39 std::optional<uint64_t>
40 MCInstrAnalysis::getMemoryOperandRelocationOffset(const MCInst &Inst,
41                                                   uint64_t Size) const {
42   return std::nullopt;
43 }
44