auto *Section = cast<MCSectionELF>(TLOF.SectionForGlobal(&GO, TM));
if (Section->getName().startswith(".data"))
NeedsCopyData = true;
- else if (Section->getName().startswith(".rodata") && SubTM->hasPROGMEM())
- // AVRs that have a separate PROGMEM (that's most AVRs) store .rodata
- // sections in RAM.
+ else if (Section->getName().startswith(".rodata") && SubTM->hasLPM())
+ // AVRs that have a separate program memory (that's most AVRs) store
+ // .rodata sections in RAM.
NeedsCopyData = true;
else if (Section->getName().startswith(".bss"))
NeedsClearBSS = true;
"The device supports the 16-bit MOVW "
"instruction">;
-// The device has a separate flash namespace that must be accessed using special
-// instructions like lpm.
-def FeaturePROGMEM : SubtargetFeature<"progmem", "m_hasPROGMEM", "true",
- "The device has a separate flash namespace">;
-
// The device supports the `LPM` instruction, with implied destination being r0.
def FeatureLPM : SubtargetFeature<"lpm", "m_hasLPM", "true",
"The device supports the `LPM` instruction">;
// device should have.
def FamilyAVR0 : Family<"avr0", []>;
-def FamilyAVR1 : Family<"avr1", [FamilyAVR0, FeatureLPM, FeaturePROGMEM, FeatureMMR]>;
+def FamilyAVR1 : Family<"avr1", [FamilyAVR0, FeatureLPM, FeatureMMR]>;
def FamilyAVR2
: Family<"avr2",
FeatureSmallStack]>;
def FamilyXMEGA3 : Family<"xmega3",
- [FamilyAVR0, FeatureLPM, FeaturePROGMEM, FeatureIJMPCALL,
+ [FamilyAVR0, FeatureLPM, FeatureIJMPCALL,
FeatureADDSUBIW, FeatureSRAM, FeatureJMPCALL,
FeatureMultiplication, FeatureMOVW, FeatureLPMX,
FeatureBREAK]>;
def FamilyXMEGA : Family<"xmega",
- [FamilyAVR0, FeatureLPM, FeaturePROGMEM, FeatureIJMPCALL,
+ [FamilyAVR0, FeatureLPM, FeatureIJMPCALL,
FeatureADDSUBIW, FeatureSRAM, FeatureJMPCALL,
FeatureMultiplication, FeatureMOVW, FeatureLPMX,
FeatureSPM, FeatureBREAK, FeatureEIJMPCALL,
bool hasLPMX() const { return m_hasLPMX; }
bool hasELPM() const { return m_hasELPM; }
bool hasELPMX() const { return m_hasELPMX; }
- bool hasPROGMEM() const { return m_hasPROGMEM; }
bool hasSPM() const { return m_hasSPM; }
bool hasSPMX() const { return m_hasSPMX; }
bool hasDES() const { return m_hasDES; }
bool m_hasLPMX = false;
bool m_hasELPM = false;
bool m_hasELPMX = false;
- bool m_hasPROGMEM = false;
bool m_hasSPM = false;
bool m_hasSPMX = false;
bool m_hasDES = false;