diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-07-06 10:18:37 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-07-06 10:18:37 +0000 |
commit | 505996fdd5139201f166726dbd8b0247f7ac560b (patch) | |
tree | 240d6efac7aff12ff8dc8b48310c7504709a3aa8 /lib/Target/PIC16/PIC16.h | |
parent | 6933d3eff8e47a64803ece18b5a78748a674dc43 (diff) | |
download | llvm-505996fdd5139201f166726dbd8b0247f7ac560b.tar.gz llvm-505996fdd5139201f166726dbd8b0247f7ac560b.tar.bz2 llvm-505996fdd5139201f166726dbd8b0247f7ac560b.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16.h')
-rw-r--r-- | lib/Target/PIC16/PIC16.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h index 57b08b730d..0a71b130a0 100644 --- a/lib/Target/PIC16/PIC16.h +++ b/lib/Target/PIC16/PIC16.h @@ -221,17 +221,29 @@ namespace PIC16CC { return Func1 + tag + "# CODE"; } - // udata and idata section names are generated by a given number. + // udata, romdata and idata section names are generated by a given number. // @udata.<num>.# - static std::string getUdataSectionName(unsigned num) { + static std::string getUdataSectionName(unsigned num, + std::string prefix = "") { std::ostringstream o; - o << getTagName(PREFIX_SYMBOL) << "udata." << num << ".# UDATA"; + o << getTagName(PREFIX_SYMBOL) << prefix << "udata." << num + << ".# UDATA"; return o.str(); } - static std::string getIdataSectionName(unsigned num) { + static std::string getRomdataSectionName(unsigned num, + std::string prefix = "") { std::ostringstream o; - o << getTagName(PREFIX_SYMBOL) << "idata." << num << ".# IDATA"; + o << getTagName(PREFIX_SYMBOL) << prefix << "romdata." << num + << ".# ROMDATA"; + return o.str(); + } + + static std::string getIdataSectionName(unsigned num, + std::string prefix = "") { + std::ostringstream o; + o << getTagName(PREFIX_SYMBOL) << prefix << "idata." << num + << ".# IDATA"; return o.str(); } |