LLVM  14.0.0git
Classes | Functions | Variables
RISCVISAInfo.cpp File Reference
#include "llvm/Support/RISCVISAInfo.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <array>
#include <string>
#include <vector>
Include dependency graph for RISCVISAInfo.cpp:

Go to the source code of this file.

Classes

struct  FindByName
 

Functions

static bool stripExperimentalPrefix (StringRef &Ext)
 
static Optional< RISCVExtensionVersion > findDefaultVersion (StringRef ExtName)
 
static StringRef getExtensionTypeDesc (StringRef Ext)
 
static StringRef getExtensionType (StringRef Ext)
 
static Optional< RISCVExtensionVersion > isExperimentalExtension (StringRef Ext)
 
static int singleLetterExtensionRank (char Ext)
 
static int multiLetterExtensionRank (const std::string &ExtName)
 
static Error getExtensionVersion (StringRef Ext, StringRef In, unsigned &Major, unsigned &Minor, unsigned &ConsumeLength, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck)
 

Variables

static constexpr StringLiteral AllStdExts = "mafdqlcbjtpvn"
 
static const RISCVSupportedExtension SupportedExtensions []
 
static const RISCVSupportedExtension SupportedExperimentalExtensions []
 

Function Documentation

◆ findDefaultVersion()

static Optional<RISCVExtensionVersion> findDefaultVersion ( StringRef  ExtName)
static

◆ getExtensionType()

static StringRef getExtensionType ( StringRef  Ext)
static

Definition at line 119 of file RISCVISAInfo.cpp.

References llvm::MipsISD::Ext.

Referenced by llvm::RISCVISAInfo::parseArchString().

◆ getExtensionTypeDesc()

static StringRef getExtensionTypeDesc ( StringRef  Ext)
static

Definition at line 107 of file RISCVISAInfo.cpp.

References llvm::MipsISD::Ext.

Referenced by llvm::RISCVISAInfo::parseArchString().

◆ getExtensionVersion()

static Error getExtensionVersion ( StringRef  Ext,
StringRef  In,
unsigned &  Major,
unsigned &  Minor,
unsigned &  ConsumeLength,
bool  EnableExperimentalExtension,
bool  ExperimentalExtensionVersionCheck 
)
static

◆ isExperimentalExtension()

static Optional<RISCVExtensionVersion> isExperimentalExtension ( StringRef  Ext)
static

◆ multiLetterExtensionRank()

static int multiLetterExtensionRank ( const std::string &  ExtName)
static

◆ singleLetterExtensionRank()

static int singleLetterExtensionRank ( char  Ext)
static

◆ stripExperimentalPrefix()

static bool stripExperimentalPrefix ( StringRef Ext)
static

Variable Documentation

◆ AllStdExts

constexpr StringLiteral AllStdExts = "mafdqlcbjtpvn"
staticconstexpr

◆ SupportedExperimentalExtensions

const RISCVSupportedExtension SupportedExperimentalExtensions[]
static
Initial value:
= {
{"v", RISCVExtensionVersion{0, 10}},
{"zba", RISCVExtensionVersion{1, 0}},
{"zbb", RISCVExtensionVersion{1, 0}},
{"zbc", RISCVExtensionVersion{1, 0}},
{"zbe", RISCVExtensionVersion{0, 93}},
{"zbf", RISCVExtensionVersion{0, 93}},
{"zbm", RISCVExtensionVersion{0, 93}},
{"zbp", RISCVExtensionVersion{0, 93}},
{"zbr", RISCVExtensionVersion{0, 93}},
{"zbs", RISCVExtensionVersion{1, 0}},
{"zbt", RISCVExtensionVersion{0, 93}},
{"zvamo", RISCVExtensionVersion{0, 10}},
{"zvlsseg", RISCVExtensionVersion{0, 10}},
{"zfhmin", RISCVExtensionVersion{0, 1}},
{"zfh", RISCVExtensionVersion{0, 1}},
}

Definition at line 51 of file RISCVISAInfo.cpp.

Referenced by findDefaultVersion(), isExperimentalExtension(), llvm::RISCVISAInfo::isSupportedExtension(), llvm::RISCVISAInfo::isSupportedExtensionFeature(), and llvm::RISCVISAInfo::parseFeatures().

◆ SupportedExtensions

const RISCVSupportedExtension SupportedExtensions[]
static
Initial value:
= {
{"i", RISCVExtensionVersion{2, 0}},
{"e", RISCVExtensionVersion{1, 9}},
{"m", RISCVExtensionVersion{2, 0}},
{"a", RISCVExtensionVersion{2, 0}},
{"f", RISCVExtensionVersion{2, 0}},
{"d", RISCVExtensionVersion{2, 0}},
{"c", RISCVExtensionVersion{2, 0}},
}

Definition at line 41 of file RISCVISAInfo.cpp.

Referenced by findDefaultVersion(), llvm::RISCVISAInfo::isSupportedExtension(), llvm::RISCVISAInfo::isSupportedExtensionFeature(), and llvm::RISCVISAInfo::parseFeatures().