LCOV - code coverage report
Current view: top level - lib/MC - MCInstrAnalysis.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 9 9 100.0 %
Date: 2018-10-20 13:21:21 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- MCInstrAnalysis.cpp - InstrDesc target hooks -----------------------===//
       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             : #include "llvm/MC/MCInstrAnalysis.h"
      11             : 
      12             : #include "llvm/ADT/APInt.h"
      13             : #include "llvm/MC/MCInst.h"
      14             : #include "llvm/MC/MCInstrDesc.h"
      15             : #include "llvm/MC/MCInstrInfo.h"
      16             : #include <cstdint>
      17             : 
      18             : using namespace llvm;
      19             : 
      20         200 : bool MCInstrAnalysis::clearsSuperRegisters(const MCRegisterInfo &MRI,
      21             :                                            const MCInst &Inst,
      22             :                                            APInt &Writes) const {
      23         200 :   Writes.clearAllBits();
      24         200 :   return false;
      25             : }
      26             : 
      27      244230 : bool MCInstrAnalysis::evaluateBranch(const MCInst &Inst, uint64_t Addr,
      28             :                                      uint64_t Size, uint64_t &Target) const {
      29      244230 :   if (Inst.getNumOperands() == 0 ||
      30      488396 :       Info->get(Inst.getOpcode()).OpInfo[0].OperandType != MCOI::OPERAND_PCREL)
      31             :     return false;
      32             : 
      33      234279 :   int64_t Imm = Inst.getOperand(0).getImm();
      34      234279 :   Target = Addr+Size+Imm;
      35      234279 :   return true;
      36             : }

Generated by: LCOV version 1.13