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 *strings[] = {
"Error",
"DSP Extension",
"DSP 2.0"};
89Error CSKYAttributeParser::vdspVersion(
unsigned tag) {
90 static const char *strings[] = {
"Error",
"VDSP Version 1",
"VDSP Version 2"};
94Error CSKYAttributeParser::fpuVersion(
unsigned tag) {
95 static const char *strings[] = {
"Error",
"FPU Version 1",
"FPU Version 2",
100Error CSKYAttributeParser::fpuABI(
unsigned tag) {
101 static const char *strings[] = {
"Error",
"Soft",
"SoftFP",
"Hard"};
105Error CSKYAttributeParser::fpuRounding(
unsigned tag) {
106 static const char *strings[] = {
"None",
"Needed"};
110Error CSKYAttributeParser::fpuDenormal(
unsigned tag) {
111 static const char *strings[] = {
"None",
"Needed"};
115Error CSKYAttributeParser::fpuException(
unsigned tag) {
116 static const char *strings[] = {
"None",
"Needed"};
120Error CSKYAttributeParser::fpuHardFP(
unsigned tag) {
122 ListSeparator
LS(
" ");
124 std::string description;
128 description +=
"Half";
130 if ((
value >> 1) & 0x1) {
132 description +=
"Single";
134 if ((
value >> 2) & 0x1) {
136 description +=
"Double";
139 if (description.empty()) {
142 "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.