summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-06 10:18:37 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-06 10:18:37 +0000
commitb89d3db1fda59ab90dd2ceb386e2df6e0843692b (patch)
tree0871decf65c6be56a6954ab81bf604a2e5185461 /llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h
parentf539f0328988b4af7b253de5efb6c1e5b4f774f7 (diff)
downloadbcm5719-llvm-b89d3db1fda59ab90dd2ceb386e2df6e0843692b.tar.gz
bcm5719-llvm-b89d3db1fda59ab90dd2ceb386e2df6e0843692b.zip
Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections. Implement _address macro to allow users to place objects at a particular address. Placing objects at a memory address: crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter. llvm-svn: 74822
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h')
-rw-r--r--llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h b/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h
index b7292b8ea78..b97336bac35 100644
--- a/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h
+++ b/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.h
@@ -48,7 +48,7 @@ namespace llvm {
mutable std::vector<PIC16Section *> BSSSections;
mutable std::vector<PIC16Section *> IDATASections;
mutable std::vector<PIC16Section *> AutosSections;
- mutable PIC16Section *ROSection;
+ mutable std::vector<PIC16Section *> ROSections;
mutable PIC16Section *ExternalVarDecls;
mutable PIC16Section *ExternalVarDefs;
virtual ~PIC16TargetAsmInfo();
@@ -62,9 +62,16 @@ namespace llvm {
const Section *getBSSSectionForGlobal(const GlobalVariable *GV) const;
const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const;
const Section *getSectionForAuto(const GlobalVariable *GV) const;
+ const Section *CreateBSSSectionForGlobal(const GlobalVariable *GV,
+ std::string Addr = "") const;
+ const Section *CreateIDATASectionForGlobal(const GlobalVariable *GV,
+ std::string Addr = "") const;
+ const Section *getROSectionForGlobal(const GlobalVariable *GV) const;
+ const Section *CreateROSectionForGlobal(const GlobalVariable *GV,
+ std::string Addr = "") const;
virtual const Section *SelectSectionForGlobal(const GlobalValue *GV) const;
-
-
+ const Section * CreateSectionForGlobal(const GlobalValue *GV,
+ std::string Addr = "") const;
public:
void SetSectionForGVs(Module &M);
std::vector<PIC16Section *> getBSSSections() const {
@@ -76,6 +83,10 @@ namespace llvm {
std::vector<PIC16Section *> getAutosSections() const {
return AutosSections;
}
+ std::vector<PIC16Section *> getROSections() const {
+ return ROSections;
+ }
+ virtual const Section* SectionForGlobal(const GlobalValue *GV) const;
};
} // namespace llvm
OpenPOWER on IntegriCloud