Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 1 | //===-- PIC16.h - Top-level interface for PIC16 representation --*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Sanjiv Gupta | 2d4e7f7 | 2008-05-14 06:50:01 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the entry points for global functions defined in |
| 11 | // the LLVM PIC16 back-end. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Sanjiv Gupta | b1b5ffd | 2008-11-19 11:00:54 +0000 | [diff] [blame] | 15 | #ifndef LLVM_TARGET_PIC16_H |
| 16 | #define LLVM_TARGET_PIC16_H |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 17 | |
Bill Wendling | 98a366d | 2009-04-29 23:29:43 +0000 | [diff] [blame] | 18 | #include "llvm/Target/TargetMachine.h" |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 19 | #include <iosfwd> |
| 20 | #include <cassert> |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 21 | #include <sstream> |
Nick Lewycky | 4a22886 | 2009-05-08 06:22:25 +0000 | [diff] [blame] | 22 | #include <cstring> |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 23 | #include <string> |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 24 | |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 25 | namespace llvm { |
| 26 | class PIC16TargetMachine; |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 27 | class FunctionPass; |
| 28 | class MachineCodeEmitter; |
Owen Anderson | cb37188 | 2008-08-21 00:14:44 +0000 | [diff] [blame] | 29 | class raw_ostream; |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 30 | |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 31 | namespace PIC16CC { |
| 32 | enum CondCodes { |
| 33 | EQ, |
| 34 | NE, |
| 35 | LT, |
| 36 | LE, |
| 37 | GT, |
Sanjiv Gupta | 08b9b05 | 2009-01-21 05:44:05 +0000 | [diff] [blame] | 38 | GE, |
| 39 | ULT, |
| 40 | UGT, |
| 41 | ULE, |
| 42 | UGE |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 43 | }; |
| 44 | } |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 45 | // A Central class to manage all ABI naming conventions. |
| 46 | // PAN - [P]ic16 [A]BI [N]ames |
| 47 | class PAN { |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 48 | public: |
| 49 | // Map the name of the symbol to its section name. |
| 50 | // Current ABI: |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 51 | // ----------------------------------------------------- |
| 52 | // ALL Names are prefixed with the symobl '@'. |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 53 | // ------------------------------------------------------ |
| 54 | // Global variables do not have any '.' in their names. |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 55 | // These are maily function names and global variable names. |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 56 | // Example - @foo, @i |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 57 | // ------------------------------------------------------- |
| 58 | // Functions and auto variables. |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 59 | // Names are mangled as <prefix><funcname>.<tag>.<varname> |
| 60 | // Where <prefix> is '@' and <tag> is any one of |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 61 | // the following |
| 62 | // .auto. - an automatic var of a function. |
| 63 | // .temp. - temproray data of a function. |
| 64 | // .ret. - return value label for a function. |
| 65 | // .frame. - Frame label for a function where retval, args |
| 66 | // and temps are stored. |
| 67 | // .args. - Label used to pass arguments to a direct call. |
| 68 | // Example - Function name: @foo |
| 69 | // Its frame: @foo.frame. |
| 70 | // Its retval: @foo.ret. |
| 71 | // Its local vars: @foo.auto.a |
| 72 | // Its temp data: @foo.temp. |
| 73 | // Its arg passing: @foo.args. |
| 74 | //---------------------------------------------- |
| 75 | // Libcall - compiler generated libcall names must have a .lib. |
| 76 | // This id will be used to emit extern decls for libcalls. |
| 77 | // Example - libcall name: @sra_i8.lib. |
| 78 | // To pass args: @sra_i8.args. |
| 79 | // To return val: @sra_i8.ret. |
| 80 | //---------------------------------------------- |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 81 | // SECTION Names |
| 82 | // uninitialized globals - @udata.<num>.# |
| 83 | // initialized globals - @idata.<num>.# |
| 84 | // Function frame - @<func>.frame_section. |
| 85 | // Function autos - @<func>.autos_section. |
| 86 | // Declarations - @section.0 |
| 87 | //---------------------------------------------------------- |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 88 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 89 | // Tags used to mangle different names. |
| 90 | enum TAGS { |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 91 | PREFIX_SYMBOL, |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 92 | GLOBAL, |
| 93 | STATIC_LOCAL, |
| 94 | AUTOS_LABEL, |
| 95 | FRAME_LABEL, |
| 96 | RET_LABEL, |
| 97 | ARGS_LABEL, |
| 98 | TEMPS_LABEL, |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 99 | |
| 100 | LIBCALL, |
| 101 | |
| 102 | FRAME_SECTION, |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 103 | AUTOS_SECTION, |
| 104 | CODE_SECTION |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 105 | }; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 106 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 107 | // Textual names of the tags. |
| 108 | inline static const char *getTagName(TAGS tag) { |
| 109 | switch (tag) { |
| 110 | default: return ""; |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 111 | case PREFIX_SYMBOL: return "@"; |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 112 | case AUTOS_LABEL: return ".auto."; |
| 113 | case FRAME_LABEL: return ".frame."; |
| 114 | case TEMPS_LABEL: return ".temp."; |
| 115 | case ARGS_LABEL: return ".args."; |
| 116 | case RET_LABEL: return ".ret."; |
| 117 | case LIBCALL: return ".lib."; |
| 118 | case FRAME_SECTION: return ".fpdata."; |
| 119 | case AUTOS_SECTION: return ".fadata."; |
| 120 | case CODE_SECTION: return "code"; |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 121 | } |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 122 | } |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 123 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 124 | // Get tag type for the Symbol. |
| 125 | inline static TAGS getSymbolTag(const std::string &Sym) { |
| 126 | if (Sym.find(getTagName(TEMPS_LABEL)) != std::string::npos) |
| 127 | return TEMPS_LABEL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 128 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 129 | if (Sym.find(getTagName(FRAME_LABEL)) != std::string::npos) |
| 130 | return FRAME_LABEL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 131 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 132 | if (Sym.find(getTagName(RET_LABEL)) != std::string::npos) |
| 133 | return RET_LABEL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 134 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 135 | if (Sym.find(getTagName(ARGS_LABEL)) != std::string::npos) |
| 136 | return ARGS_LABEL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 137 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 138 | if (Sym.find(getTagName(AUTOS_LABEL)) != std::string::npos) |
| 139 | return AUTOS_LABEL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 140 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 141 | if (Sym.find(getTagName(LIBCALL)) != std::string::npos) |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 142 | return LIBCALL; |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 143 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 144 | // It does not have any Tag. So its a true global or static local. |
| 145 | if (Sym.find(".") == std::string::npos) |
| 146 | return GLOBAL; |
| 147 | |
| 148 | // If a . is there, then it may be static local. |
| 149 | // We should mangle these as well in clang. |
| 150 | if (Sym.find(".") != std::string::npos) |
| 151 | return STATIC_LOCAL; |
| 152 | |
| 153 | assert (0 && "Could not determine Symbol's tag"); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 154 | } |
| 155 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 156 | // addPrefix - add prefix symbol to a name if there isn't one already. |
| 157 | inline static std::string addPrefix (const std::string &Name) { |
| 158 | std::string prefix = getTagName (PREFIX_SYMBOL); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 159 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 160 | // If this name already has a prefix, nothing to do. |
| 161 | if (Name.compare(0, prefix.size(), prefix) == 0) |
| 162 | return Name; |
| 163 | |
| 164 | return prefix + Name; |
| 165 | } |
| 166 | |
| 167 | // Get mangled func name from a mangled sym name. |
| 168 | // In all cases func name is the first component before a '.'. |
| 169 | static inline std::string getFuncNameForSym(const std::string &Sym1) { |
| 170 | assert (getSymbolTag(Sym1) != GLOBAL && "not belongs to a function"); |
| 171 | |
| 172 | std::string Sym = addPrefix(Sym1); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 173 | |
| 174 | // Position of the . after func name. That's where func name ends. |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 175 | size_t func_name_end = Sym.find ('.'); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 176 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 177 | return Sym.substr (0, func_name_end); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 178 | } |
| 179 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 180 | // Get Frame start label for a func. |
| 181 | static std::string getFrameLabel(const std::string &Func) { |
| 182 | std::string Func1 = addPrefix(Func); |
| 183 | std::string tag = getTagName(FRAME_LABEL); |
| 184 | return Func1 + tag; |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 185 | } |
| 186 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 187 | static std::string getRetvalLabel(const std::string &Func) { |
| 188 | std::string Func1 = addPrefix(Func); |
| 189 | std::string tag = getTagName(RET_LABEL); |
| 190 | return Func1 + tag; |
| 191 | } |
| 192 | |
| 193 | static std::string getArgsLabel(const std::string &Func) { |
| 194 | std::string Func1 = addPrefix(Func); |
| 195 | std::string tag = getTagName(ARGS_LABEL); |
| 196 | return Func1 + tag; |
| 197 | } |
| 198 | |
| 199 | static std::string getTempdataLabel(const std::string &Func) { |
| 200 | std::string Func1 = addPrefix(Func); |
| 201 | std::string tag = getTagName(TEMPS_LABEL); |
| 202 | return Func1 + tag; |
| 203 | } |
| 204 | |
| 205 | static std::string getFrameSectionName(const std::string &Func) { |
| 206 | std::string Func1 = addPrefix(Func); |
| 207 | std::string tag = getTagName(FRAME_SECTION); |
| 208 | return Func1 + tag + " UDATA_OVR"; |
| 209 | } |
| 210 | |
| 211 | static std::string getAutosSectionName(const std::string &Func) { |
| 212 | std::string Func1 = addPrefix(Func); |
| 213 | std::string tag = getTagName(AUTOS_SECTION); |
| 214 | return Func1 + tag + " UDATA_OVR"; |
| 215 | } |
| 216 | |
| 217 | static std::string getCodeSectionName(const std::string &Func) { |
| 218 | std::string Func1 = addPrefix(Func); |
| 219 | std::string tag = getTagName(CODE_SECTION); |
| 220 | return Func1 + tag + " CODE"; |
| 221 | } |
| 222 | |
| 223 | // udata and idata section names are generated by a given number. |
| 224 | // @udata.<num>.# |
| 225 | static std::string getUdataSectionName(unsigned num) { |
| 226 | std::ostringstream o; |
| 227 | o << getTagName(PREFIX_SYMBOL) << "udata." << num << ".# UDATA"; |
| 228 | return o.str(); |
| 229 | } |
| 230 | |
| 231 | static std::string getIdataSectionName(unsigned num) { |
| 232 | std::ostringstream o; |
| 233 | o << getTagName(PREFIX_SYMBOL) << "idata." << num << ".# IDATA"; |
| 234 | return o.str(); |
| 235 | } |
| 236 | |
| 237 | inline static bool isLocalName (const std::string &Name) { |
| 238 | if (getSymbolTag(Name) == AUTOS_LABEL) |
| 239 | return true; |
| 240 | |
| 241 | return false; |
| 242 | } |
| 243 | |
| 244 | inline static bool isLocalToFunc (std::string &Func, std::string &Var) { |
| 245 | if (! isLocalName(Var)) return false; |
| 246 | |
| 247 | std::string Func1 = addPrefix(Func); |
| 248 | // Extract func name of the varilable. |
| 249 | const std::string &fname = getFuncNameForSym(Var); |
| 250 | |
| 251 | if (fname.compare(Func1) == 0) |
| 252 | return true; |
| 253 | |
| 254 | return false; |
| 255 | } |
| 256 | |
| 257 | |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 258 | // Get the section for the given external symbol names. |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 259 | // This tries to find the type (Tag) of the symbol from its mangled name |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 260 | // and return appropriate section name for it. |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 261 | static inline std::string getSectionNameForSym(const std::string &Sym1) { |
| 262 | std::string Sym = addPrefix(Sym1); |
| 263 | |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 264 | std::string SectionName; |
| 265 | |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 266 | std::string Fname = getFuncNameForSym (Sym); |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 267 | TAGS id = getSymbolTag (Sym); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 268 | |
| 269 | switch (id) { |
| 270 | default : assert (0 && "Could not determine external symbol type"); |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 271 | case FRAME_LABEL: |
| 272 | case RET_LABEL: |
| 273 | case TEMPS_LABEL: |
| 274 | case ARGS_LABEL: { |
| 275 | return getFrameSectionName(Fname); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 276 | } |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 277 | case AUTOS_LABEL: { |
| 278 | return getAutosSectionName(Fname); |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 279 | } |
| 280 | } |
| 281 | } |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 282 | |
Sanjiv Gupta | 211f362 | 2009-05-10 05:23:47 +0000 | [diff] [blame^] | 283 | }; // class PAN. |
| 284 | |
| 285 | |
| 286 | // External symbol names require memory to live till the program end. |
| 287 | // So we have to allocate it and keep. |
| 288 | inline static const char *createESName (const std::string &name) { |
| 289 | char *tmpName = new char[name.size() + 1]; |
| 290 | strcpy (tmpName, name.c_str()); |
| 291 | return tmpName; |
| 292 | } |
Sanjiv Gupta | 573eb5e | 2009-05-08 04:50:14 +0000 | [diff] [blame] | 293 | |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 294 | |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 295 | |
| 296 | inline static const char *PIC16CondCodeToString(PIC16CC::CondCodes CC) { |
| 297 | switch (CC) { |
| 298 | default: assert(0 && "Unknown condition code"); |
| 299 | case PIC16CC::NE: return "ne"; |
| 300 | case PIC16CC::EQ: return "eq"; |
| 301 | case PIC16CC::LT: return "lt"; |
Sanjiv Gupta | 08b9b05 | 2009-01-21 05:44:05 +0000 | [diff] [blame] | 302 | case PIC16CC::ULT: return "lt"; |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 303 | case PIC16CC::LE: return "le"; |
| 304 | case PIC16CC::GT: return "gt"; |
Sanjiv Gupta | 08b9b05 | 2009-01-21 05:44:05 +0000 | [diff] [blame] | 305 | case PIC16CC::UGT: return "gt"; |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 306 | case PIC16CC::GE: return "ge"; |
| 307 | } |
| 308 | } |
| 309 | |
Sanjiv Gupta | 08b9b05 | 2009-01-21 05:44:05 +0000 | [diff] [blame] | 310 | inline static bool isSignedComparison(PIC16CC::CondCodes CC) { |
| 311 | switch (CC) { |
| 312 | default: assert(0 && "Unknown condition code"); |
| 313 | case PIC16CC::NE: |
| 314 | case PIC16CC::EQ: |
| 315 | case PIC16CC::LT: |
| 316 | case PIC16CC::LE: |
| 317 | case PIC16CC::GE: |
| 318 | case PIC16CC::GT: |
| 319 | return true; |
| 320 | case PIC16CC::ULT: |
| 321 | case PIC16CC::UGT: |
| 322 | case PIC16CC::ULE: |
| 323 | case PIC16CC::UGE: |
| 324 | return false; // condition codes for unsigned comparison. |
| 325 | } |
| 326 | } |
| 327 | |
Sanjiv Gupta | 1b04694 | 2009-01-13 19:18:47 +0000 | [diff] [blame] | 328 | |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 329 | |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 330 | FunctionPass *createPIC16ISelDag(PIC16TargetMachine &TM); |
Owen Anderson | cb37188 | 2008-08-21 00:14:44 +0000 | [diff] [blame] | 331 | FunctionPass *createPIC16CodePrinterPass(raw_ostream &OS, |
Bill Wendling | 57f0db8 | 2009-02-24 08:30:20 +0000 | [diff] [blame] | 332 | PIC16TargetMachine &TM, |
Bill Wendling | 98a366d | 2009-04-29 23:29:43 +0000 | [diff] [blame] | 333 | CodeGenOpt::Level OptLevel, |
| 334 | bool Verbose); |
Sanjiv Gupta | d8d27f4 | 2009-05-06 08:02:01 +0000 | [diff] [blame] | 335 | // Banksel optimzer pass. |
| 336 | FunctionPass *createPIC16MemSelOptimizerPass(); |
Sanjiv Gupta | 0e68771 | 2008-05-13 09:02:57 +0000 | [diff] [blame] | 337 | } // end namespace llvm; |
| 338 | |
| 339 | // Defines symbolic names for PIC16 registers. This defines a mapping from |
| 340 | // register name to register number. |
| 341 | #include "PIC16GenRegisterNames.inc" |
| 342 | |
| 343 | // Defines symbolic names for the PIC16 instructions. |
| 344 | #include "PIC16GenInstrNames.inc" |
| 345 | |
| 346 | #endif |