LLVM: lib/Target/AVR/AVRTargetObjectFile.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
11
17
19
20namespace llvm {
23 ProgmemDataSection =
25 Progmem1DataSection =
27 Progmem2DataSection =
29 Progmem3DataSection =
31 Progmem4DataSection =
33 Progmem5DataSection =
35}
36
39
40
43 Kind.isReadOnly()) {
44
45 if (!AVRTM.getSubtargetImpl()->hasLPM()) {
46
49 "Current AVR subtarget does not support accessing program memory");
51 }
52
53
54 if (!AVRTM.getSubtargetImpl()->hasELPM() &&
56
58 "Current AVR subtarget does not support "
59 "accessing extended program memory");
60 return ProgmemDataSection;
61 }
64 return ProgmemDataSection;
66 return Progmem1DataSection;
68 return Progmem2DataSection;
70 return Progmem3DataSection;
72 return Progmem4DataSection;
74 return Progmem5DataSection;
75 default:
77 }
78 }
79
80
82}
83}
A generic AVR implementation.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
void Initialize(MCContext &ctx, const TargetMachine &TM) 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.
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
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.
Represents a location in source code.
SectionKind - This is a simple POD value that classifies the properties of a section.
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
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.