LLVM  14.0.0git
Namespaces | Macros | Functions | Variables
MipsAsmParser.cpp File Reference
#include "MCTargetDesc/MipsABIFlagsSection.h"
#include "MCTargetDesc/MipsABIInfo.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "MCTargetDesc/MipsMCExpr.h"
#include "MCTargetDesc/MipsMCTargetDesc.h"
#include "MipsTargetStreamer.h"
#include "TargetInfo/MipsTargetInfo.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
#include "llvm/MC/MCParser/MCAsmParserUtils.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "MipsGenAsmMatcher.inc"

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "mips-asm-parser"
 
#define GET_ASSEMBLER_HEADER
 
#define GET_OPERAND_DIAGNOSTIC_TYPES
 
#define GET_REGISTER_MATCHER
 
#define GET_MATCHER_IMPLEMENTATION
 
#define GET_MNEMONIC_SPELL_CHECKER
 

Functions

static const MCInstrDescgetInstDesc (unsigned Opcode)
 
static bool hasShortDelaySlot (MCInst &Inst)
 
static const MCSymbolgetSingleMCSymbol (const MCExpr *Expr)
 
static unsigned countMCSymbolRefExpr (const MCExpr *Expr)
 
static bool isEvaluated (const MCExpr *Expr)
 
static bool needsExpandMemInst (MCInst &Inst)
 
template<unsigned N>
static bool isShiftedUIntAtAnyPosition (uint64_t x)
 Can the value be represented by a unsigned N-bit value and a shift left? More...
 
static unsigned nextReg (unsigned Reg)
 
static uint64_t convertIntToDoubleImm (uint64_t ImmOp64)
 
static uint32_t covertDoubleImmToSingleImm (uint64_t ImmOp64)
 
static unsigned getRegisterForMxtrDSP (MCInst &Inst, bool IsMFDSP)
 
static unsigned getRegisterForMxtrFP (MCInst &Inst, bool IsMFTC1)
 
static unsigned getRegisterForMxtrC0 (MCInst &Inst, bool IsMFTC0)
 
static SMLoc RefineErrorLoc (const SMLoc Loc, const OperandVector &Operands, uint64_t ErrorInfo)
 
static std::string MipsMnemonicSpellCheck (StringRef S, const FeatureBitset &FBS, unsigned VariantID=0)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmParser ()
 

Variables

cl::opt< bool > EmitJalrReloc
 
const MCInstrDesc llvm::MipsInsts []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mips-asm-parser"

Definition at line 62 of file MipsAsmParser.cpp.

◆ GET_ASSEMBLER_HEADER

#define GET_ASSEMBLER_HEADER

Definition at line 167 of file MipsAsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 8907 of file MipsAsmParser.cpp.

◆ GET_MNEMONIC_SPELL_CHECKER

#define GET_MNEMONIC_SPELL_CHECKER

Definition at line 8908 of file MipsAsmParser.cpp.

◆ GET_OPERAND_DIAGNOSTIC_TYPES

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 522 of file MipsAsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 8906 of file MipsAsmParser.cpp.

Function Documentation

◆ convertIntToDoubleImm()

static uint64_t convertIntToDoubleImm ( uint64_t  ImmOp64)
static

◆ countMCSymbolRefExpr()

static unsigned countMCSymbolRefExpr ( const MCExpr Expr)
static

Definition at line 1804 of file MipsAsmParser.cpp.

◆ covertDoubleImmToSingleImm()

static uint32_t covertDoubleImmToSingleImm ( uint64_t  ImmOp64)
static

Definition at line 3350 of file MipsAsmParser.cpp.

References llvm::BitsToDouble(), and llvm::FloatToBits().

◆ getInstDesc()

static const MCInstrDesc& getInstDesc ( unsigned  Opcode)
static

Definition at line 1754 of file MipsAsmParser.cpp.

References llvm::MipsInsts.

Referenced by needsExpandMemInst().

◆ getRegisterForMxtrC0()

static unsigned getRegisterForMxtrC0 ( MCInst Inst,
bool  IsMFTC0 
)
static

◆ getRegisterForMxtrDSP()

static unsigned getRegisterForMxtrDSP ( MCInst Inst,
bool  IsMFDSP 
)
static

◆ getRegisterForMxtrFP()

static unsigned getRegisterForMxtrFP ( MCInst Inst,
bool  IsMFTC1 
)
static

◆ getSingleMCSymbol()

static const MCSymbol* getSingleMCSymbol ( const MCExpr Expr)
static

Definition at line 1780 of file MipsAsmParser.cpp.

◆ hasShortDelaySlot()

static bool hasShortDelaySlot ( MCInst Inst)
static

◆ isEvaluated()

static bool isEvaluated ( const MCExpr Expr)
static

◆ isShiftedUIntAtAnyPosition()

template<unsigned N>
static bool isShiftedUIntAtAnyPosition ( uint64_t  x)
static

Can the value be represented by a unsigned N-bit value and a shift left?

Definition at line 2682 of file MipsAsmParser.cpp.

References llvm::findFirstSet(), and x.

◆ LLVMInitializeMipsAsmParser()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsAsmParser ( )

◆ MipsMnemonicSpellCheck()

static std::string MipsMnemonicSpellCheck ( StringRef  S,
const FeatureBitset FBS,
unsigned  VariantID = 0 
)
static

◆ needsExpandMemInst()

static bool needsExpandMemInst ( MCInst Inst)
static

◆ nextReg()

static unsigned nextReg ( unsigned  Reg)
static

Definition at line 3222 of file MipsAsmParser.cpp.

References contains(), llvm_unreachable, RA, Reg, T1, and llvm::X86II::T8.

◆ RefineErrorLoc()

static SMLoc RefineErrorLoc ( const SMLoc  Loc,
const OperandVector Operands,
uint64_t  ErrorInfo 
)
static

Definition at line 5914 of file MipsAsmParser.cpp.

References Operands.

Variable Documentation

◆ EmitJalrReloc

cl::opt<bool> EmitJalrReloc