LLVM 20.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/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.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/MCInstrInfo.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/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 "llvm/TargetParser/SubtargetFeature.h"
#include "llvm/TargetParser/Triple.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

namespace  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 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, const MCInstrDesc &MCID)
 
template<unsigned N>
static bool isShiftedUIntAtAnyPosition (uint64_t x)
 Can the value be represented by a unsigned N-bit value and a shift left?
 
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< boolEmitJalrReloc
 

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 168 of file MipsAsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 8975 of file MipsAsmParser.cpp.

◆ GET_MNEMONIC_SPELL_CHECKER

#define GET_MNEMONIC_SPELL_CHECKER

Definition at line 8976 of file MipsAsmParser.cpp.

◆ GET_OPERAND_DIAGNOSTIC_TYPES

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 520 of file MipsAsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 8974 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 1805 of file MipsAsmParser.cpp.

References countMCSymbolRefExpr().

Referenced by countMCSymbolRefExpr().

◆ covertDoubleImmToSingleImm()

static uint32_t covertDoubleImmToSingleImm ( uint64_t  ImmOp64)
static

Definition at line 3419 of file MipsAsmParser.cpp.

◆ 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 1781 of file MipsAsmParser.cpp.

References getSingleMCSymbol().

Referenced by getSingleMCSymbol().

◆ 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 2744 of file MipsAsmParser.cpp.

References llvm::countr_zero().

◆ 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,
const MCInstrDesc MCID 
)
static

◆ nextReg()

static unsigned nextReg ( unsigned  Reg)
static

Definition at line 3291 of file MipsAsmParser.cpp.

References contains(), llvm_unreachable, and Reg.

◆ RefineErrorLoc()

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

Definition at line 5983 of file MipsAsmParser.cpp.

References Operands.

Variable Documentation

◆ EmitJalrReloc

cl::opt<bool> EmitJalrReloc
extern