LLVM 20.0.0git
Macros | Functions
ARMMCCodeEmitter.cpp File Reference
#include "MCTargetDesc/ARMAddressingModes.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "MCTargetDesc/ARMFixupKinds.h"
#include "MCTargetDesc/ARMMCExpr.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include "ARMGenMCCodeEmitter.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mccodeemitter"
 

Functions

 STATISTIC (MCNumEmitted, "Number of MC instructions emitted.")
 
 STATISTIC (MCNumCPRelocations, "Number of constant pool relocations created.")
 
static uint32_t getBranchTargetOpValue (const MCInst &MI, unsigned OpIdx, unsigned FixupKind, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI)
 getBranchTargetOpValue - Helper function to get the branch target operand, which is either an immediate or requires a fixup.
 
static int32_t encodeThumbBLOffset (int32_t offset)
 
static bool HasConditionalBranch (const MCInst &MI)
 Return true if this branch has a non-always predication.
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mccodeemitter"

Definition at line 44 of file ARMMCCodeEmitter.cpp.

Function Documentation

◆ encodeThumbBLOffset()

static int32_t encodeThumbBLOffset ( int32_t  offset)
static

Definition at line 629 of file ARMMCCodeEmitter.cpp.

◆ getBranchTargetOpValue()

static uint32_t getBranchTargetOpValue ( const MCInst MI,
unsigned  OpIdx,
unsigned  FixupKind,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
)
static

getBranchTargetOpValue - Helper function to get the branch target operand, which is either an immediate or requires a fixup.

Definition at line 610 of file ARMMCCodeEmitter.cpp.

References assert(), llvm::MCFixup::create(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), and MI.

◆ HasConditionalBranch()

static bool HasConditionalBranch ( const MCInst MI)
static

Return true if this branch has a non-always predication.

Definition at line 707 of file ARMMCCodeEmitter.cpp.

References llvm::ARMCC::AL, llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.

◆ STATISTIC() [1/2]

STATISTIC ( MCNumCPRelocations  ,
"Number of constant pool relocations created."   
)

◆ STATISTIC() [2/2]

STATISTIC ( MCNumEmitted  ,
"Number of MC instructions emitted."   
)