xref: /freebsd/contrib/llvm-project/llvm/lib/MC/MCInstrAnalysis.cpp (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
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 "llvm/MC/MCInst.h"
13 #include "llvm/MC/MCInstrDesc.h"
14 #include "llvm/MC/MCInstrInfo.h"
15 #include <cstdint>
16 
17 using namespace llvm;
18 
19 bool MCInstrAnalysis::clearsSuperRegisters(const MCRegisterInfo &MRI,
20                                            const MCInst &Inst,
21                                            APInt &Writes) const {
22   Writes.clearAllBits();
23   return false;
24 }
25 
26 bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
27                                      uint64_t /*Size*/,
28                                      uint64_t & /*Target*/) const {
29   return false;
30 }
31 
32 Optional<uint64_t> MCInstrAnalysis::evaluateMemoryOperandAddress(
33     const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr,
34     uint64_t Size) const {
35   return None;
36 }
37 
38 Optional<uint64_t>
39 MCInstrAnalysis::getMemoryOperandRelocationOffset(const MCInst &Inst,
40                                                   uint64_t Size) const {
41   return None;
42 }
43