41 if (Features[CSKY::ProcCK801])
43 else if (Features[CSKY::ProcCK802])
45 else if (Features[CSKY::ProcCK803])
47 else if (Features[CSKY::ProcCK804])
49 else if (Features[CSKY::ProcCK805])
51 else if (Features[CSKY::ProcCK807])
53 else if (Features[CSKY::ProcCK810])
55 else if (Features[CSKY::ProcCK860])
60 if (Features[CSKY::FeatureFPUV2_SF] || Features[CSKY::FeatureFPUV3_SF])
72 void CSKYTargetELFStreamer::emitAttribute(
unsigned Attribute,
unsigned Value) {
76 void CSKYTargetELFStreamer::emitTextAttribute(
unsigned Attribute,
78 setAttributeItem(
Attribute, String,
true);
81 void CSKYTargetELFStreamer::finishAttributeSection() {
85 if (AttributeSection) {
96 const size_t VendorHeaderSize = 4 + CurrentVendor.
size() + 1;
99 const size_t TagHeaderSize = 1 + 4;
101 const size_t ContentsSize = calculateContentSize();
112 for (AttributeItem item : Contents) {
117 case AttributeType::Numeric:
120 case AttributeType::Text:
124 case AttributeType::NumericAndText:
135 size_t CSKYTargetELFStreamer::calculateContentSize()
const {
137 for (AttributeItem item : Contents) {
139 case AttributeType::Hidden:
141 case AttributeType::Numeric:
145 case AttributeType::Text:
147 Result += item.StringValue.size() + 1;
149 case AttributeType::NumericAndText:
152 Result += item.StringValue.size() + 1;
159 void CSKYELFStreamer::EmitMappingSymbol(
StringRef Name) {
172 Name +
"." +
Twine(MappingSymbolCounter++)));
179 void CSKYTargetELFStreamer::emitTargetAttributes(
const MCSubtargetInfo &STI) {
183 if (ArchID == CSKY::ArchKind::CK804)
184 ArchID = CSKY::ArchKind::CK803;
195 unsigned ISAFlag = 0;
270 unsigned ISAExtFlag = 0;
300 else if (STI.
hasFeature(CSKY::FeatureFPUV3_HF) ||
305 bool hasAnyFloatExt = STI.
hasFeature(CSKY::FeatureFPUV2_SF) ||
311 if (hasAnyFloatExt && STI.
hasFeature(CSKY::ModeHardFloat) &&
314 else if (hasAnyFloatExt && STI.
hasFeature(CSKY::ModeHardFloat))
319 unsigned HardFPFlag = 0;
329 if (HardFPFlag != 0) {