15const CSKYAttributeParser::DisplayHandler
16 CSKYAttributeParser::displayRoutines[] = {
35 &CSKYAttributeParser::dspVersion,
39 &CSKYAttributeParser::vdspVersion,
43 &CSKYAttributeParser::fpuVersion,
47 &CSKYAttributeParser::fpuABI,
51 &CSKYAttributeParser::fpuRounding,
55 &CSKYAttributeParser::fpuDenormal,
59 &CSKYAttributeParser::fpuException,
67 &CSKYAttributeParser::fpuHardFP,
70Error CSKYAttributeParser::handler(
uint64_t tag,
bool &handled) {
72 for (
const auto &AH : displayRoutines) {
74 if (
Error e = (this->*AH.routine)(tag))
84Error CSKYAttributeParser::dspVersion(
unsigned tag) {
85 static const char *
const strings[] = {
"Error",
"DSP Extension",
"DSP 2.0"};
89Error CSKYAttributeParser::vdspVersion(
unsigned tag) {
90 static const char *
const strings[] = {
"Error",
"VDSP Version 1",
95Error CSKYAttributeParser::fpuVersion(
unsigned tag) {
96 static const char *
const strings[] = {
"Error",
"FPU Version 1",
97 "FPU Version 2",
"FPU Version 3"};
101Error CSKYAttributeParser::fpuABI(
unsigned tag) {
102 static const char *
const strings[] = {
"Error",
"Soft",
"SoftFP",
"Hard"};
106Error CSKYAttributeParser::fpuRounding(
unsigned tag) {
107 static const char *
const strings[] = {
"None",
"Needed"};
111Error CSKYAttributeParser::fpuDenormal(
unsigned tag) {
112 static const char *
const strings[] = {
"None",
"Needed"};
116Error CSKYAttributeParser::fpuException(
unsigned tag) {
117 static const char *
const strings[] = {
"None",
"Needed"};
121Error CSKYAttributeParser::fpuHardFP(
unsigned tag) {
123 ListSeparator
LS(
" ");
125 std::string description;
129 description +=
"Half";
131 if ((
value >> 1) & 0x1) {
133 description +=
"Single";
135 if ((
value >> 2) & 0x1) {
137 description +=
"Double";
140 if (description.empty()) {
143 "unknown Tag_CSKY_FPU_HARDFP value: " +
Given that RA is a live value
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Error integerAttribute(unsigned tag)
DataExtractor::Cursor cursor
Error stringAttribute(unsigned tag)
Error parseStringAttribute(const char *name, unsigned tag, ArrayRef< const char * > strings)
void printAttribute(unsigned tag, unsigned value, StringRef valueDesc)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.