46 if (!AVRTM.getSubtargetImpl()->hasLPM()) {
50 "Current AVR subtarget does not support accessing program memory");
55 if (!AVRTM.getSubtargetImpl()->hasELPM() &&
59 "Current AVR subtarget does not support "
60 "accessing extended program memory");
61 return ProgmemDataSection;
65 return ProgmemDataSection;
67 return Progmem1DataSection;
69 return Progmem2DataSection;
71 return Progmem3DataSection;
73 return Progmem4DataSection;
75 return Progmem5DataSection;
A generic AVR implementation.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
void initialize(MCContext &ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
bool hasSection() const
Check if this global has a custom object file section.
Context object for machine code objects.
LLVM_ABI void reportError(SMLoc L, const Twine &Msg)
MCContext & getContext() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
A Module instance is used to store all the information related to an LLVM module.
Represents a location in source code.
SectionKind - This is a simple POD value that classifies the properties of a section.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
Primary interface to the complete machine description for the target machine.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
AddressSpace getAddressSpace(T *V)
bool isProgramMemoryAddress(T *V)
Checks if a given type is a pointer to program memory.
This is an optimization pass for GlobalISel generic memory operations.