LLVM 19.0.0git
Macros | Functions | Variables
CSKYAsmParser.cpp File Reference
#include "MCTargetDesc/CSKYInstPrinter.h"
#include "MCTargetDesc/CSKYMCExpr.h"
#include "MCTargetDesc/CSKYMCTargetDesc.h"
#include "MCTargetDesc/CSKYTargetStreamer.h"
#include "TargetInfo/CSKYTargetInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/Register.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/CSKYAttributes.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/TargetParser/CSKYTargetParser.h"
#include "CSKYGenCompressInstEmitter.inc"
#include "CSKYGenAsmMatcher.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "csky-asm-parser"
 
#define GEN_COMPRESS_INSTR
 
#define GET_ASSEMBLER_HEADER
 
#define GET_OPERAND_DIAGNOSTIC_TYPES
 
#define GET_REGISTER_MATCHER
 
#define GET_SUBTARGET_FEATURE_NAME
 
#define GET_MATCHER_IMPLEMENTATION
 
#define GET_MNEMONIC_SPELL_CHECKER
 

Functions

 STATISTIC (CSKYNumInstrsCompressed, "Number of C-SKY Compressed instructions emitted")
 
static MCRegister convertFPR32ToFPR64 (MCRegister Reg)
 
static std::string CSKYMnemonicSpellCheck (StringRef S, const FeatureBitset &FBS, unsigned VariantID=0)
 
static bool matchRegisterNameHelper (const MCSubtargetInfo &STI, MCRegister &Reg, StringRef Name)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeCSKYAsmParser ()
 

Variables

static cl::opt< boolEnableCompressedInst ("enable-csky-asm-compressed-inst", cl::Hidden, cl::init(false), cl::desc("Enable C-SKY asm compressed instruction"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "csky-asm-parser"

Definition at line 40 of file CSKYAsmParser.cpp.

◆ GEN_COMPRESS_INSTR

#define GEN_COMPRESS_INSTR

Definition at line 43 of file CSKYAsmParser.cpp.

◆ GET_ASSEMBLER_HEADER

#define GET_ASSEMBLER_HEADER

Definition at line 103 of file CSKYAsmParser.cpp.

◆ GET_MATCHER_IMPLEMENTATION

#define GET_MATCHER_IMPLEMENTATION

Definition at line 640 of file CSKYAsmParser.cpp.

◆ GET_MNEMONIC_SPELL_CHECKER

#define GET_MNEMONIC_SPELL_CHECKER

Definition at line 641 of file CSKYAsmParser.cpp.

◆ GET_OPERAND_DIAGNOSTIC_TYPES

#define GET_OPERAND_DIAGNOSTIC_TYPES

Definition at line 125 of file CSKYAsmParser.cpp.

◆ GET_REGISTER_MATCHER

#define GET_REGISTER_MATCHER

Definition at line 638 of file CSKYAsmParser.cpp.

◆ GET_SUBTARGET_FEATURE_NAME

#define GET_SUBTARGET_FEATURE_NAME

Definition at line 639 of file CSKYAsmParser.cpp.

Function Documentation

◆ convertFPR32ToFPR64()

static MCRegister convertFPR32ToFPR64 ( MCRegister  Reg)
static

Definition at line 644 of file CSKYAsmParser.cpp.

References assert().

◆ CSKYMnemonicSpellCheck()

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

◆ LLVMInitializeCSKYAsmParser()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeCSKYAsmParser ( )

Definition at line 1662 of file CSKYAsmParser.cpp.

References llvm::getTheCSKYTarget(), and X.

◆ matchRegisterNameHelper()

static bool matchRegisterNameHelper ( const MCSubtargetInfo STI,
MCRegister Reg,
StringRef  Name 
)
static

Definition at line 1003 of file CSKYAsmParser.cpp.

References MatchRegisterAltName(), MatchRegisterName(), and Name.

◆ STATISTIC()

STATISTIC ( CSKYNumInstrsCompressed  ,
"Number of C-SKY Compressed instructions emitted"   
)

Variable Documentation

◆ EnableCompressedInst

cl::opt< bool > EnableCompressedInst("enable-csky-asm-compressed-inst", cl::Hidden, cl::init(false), cl::desc("Enable C-SKY asm compressed instruction")) ( "enable-csky-asm-compressed-inst"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("Enable C-SKY asm compressed instruction")   
)
static