blob: 795b79ad53b652cb00360d64c810214803493700 [file] [log] [blame]
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +00001//===-- PIC16AsmPrinter.cpp - PIC16 LLVM assembly writer ------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains a printer that converts from our internal representation
11// of machine-dependent LLVM code to PIC16 assembly language.
12//
13//===----------------------------------------------------------------------===//
14
15#include "PIC16AsmPrinter.h"
Chris Lattner19435562009-08-15 06:13:40 +000016#include "MCSectionPIC16.h"
Chris Lattner621c44d2009-08-22 20:48:53 +000017#include "PIC16MCAsmInfo.h"
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000018#include "llvm/DerivedTypes.h"
19#include "llvm/Function.h"
20#include "llvm/Module.h"
21#include "llvm/CodeGen/DwarfWriter.h"
22#include "llvm/CodeGen/MachineFrameInfo.h"
23#include "llvm/CodeGen/DwarfWriter.h"
24#include "llvm/CodeGen/MachineModuleInfo.h"
Chris Lattner73266f92009-08-19 05:49:37 +000025#include "llvm/MC/MCStreamer.h"
Chris Lattnerc6f802d2009-09-13 17:14:04 +000026#include "llvm/MC/MCSymbol.h"
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000027#include "llvm/Target/TargetRegistry.h"
28#include "llvm/Target/TargetLoweringObjectFile.h"
29#include "llvm/Support/ErrorHandling.h"
30#include "llvm/Support/FormattedStream.h"
31#include "llvm/Support/Mangler.h"
32#include <cstring>
33using namespace llvm;
34
35#include "PIC16GenAsmWriter.inc"
36
37PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
Chris Lattner621c44d2009-08-22 20:48:53 +000038 const MCAsmInfo *T, bool V)
Chris Lattner181c7cb2009-08-22 20:56:12 +000039: AsmPrinter(O, TM, T, V), DbgInfo(O, T) {
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000040 PTLI = static_cast<PIC16TargetLowering*>(TM.getTargetLowering());
Chris Lattnera5ef4d32009-08-22 21:43:10 +000041 PMAI = static_cast<const PIC16MCAsmInfo*>(T);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000042 PTOF = (PIC16TargetObjectFile*)&PTLI->getObjFileLowering();
43}
44
45bool PIC16AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
Chris Lattner32d4cc72009-09-09 23:14:36 +000046 processDebugLoc(MI->getDebugLoc());
47
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000048 printInstruction(MI);
Chris Lattner32d4cc72009-09-09 23:14:36 +000049
50 if (VerboseAsm && !MI->getDebugLoc().isUnknown())
51 EmitComments(*MI);
52 O << '\n';
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000053 return true;
54}
55
56/// runOnMachineFunction - This emits the frame section, autos section and
57/// assembly for each instruction. Also takes care of function begin debug
58/// directive and file begin debug directive (if required) for the function.
59///
60bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
61 this->MF = &MF;
62
63 // This calls the base class function required to be called at beginning
64 // of runOnMachineFunction.
65 SetupMachineFunction(MF);
66
67 // Get the mangled name.
68 const Function *F = MF.getFunction();
69 CurrentFnName = Mang->getMangledName(F);
70
71 // Emit the function frame (args and temps).
72 EmitFunctionFrame(MF);
73
74 DbgInfo.BeginFunction(MF);
75
76 // Emit the autos section of function.
Chris Lattner08e63732009-08-21 23:08:09 +000077 EmitAutos(CurrentFnName);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000078
79 // Now emit the instructions of function in its code section.
80 const MCSection *fCodeSection =
Chris Lattner7f504882009-08-21 23:12:15 +000081 getObjFileLowering().getSectionForFunction(CurrentFnName);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000082 // Start the Code Section.
83 O << "\n";
Chris Lattner73266f92009-08-19 05:49:37 +000084 OutStreamer.SwitchSection(fCodeSection);
Chris Lattner7f504882009-08-21 23:12:15 +000085
86 // Emit the frame address of the function at the beginning of code.
87 O << "\tretlw low(" << PAN::getFrameLabel(CurrentFnName) << ")\n";
88 O << "\tretlw high(" << PAN::getFrameLabel(CurrentFnName) << ")\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000089
90 // Emit function start label.
91 O << CurrentFnName << ":\n";
Chris Lattner7f504882009-08-21 23:12:15 +000092
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +000093 DebugLoc CurDL;
94 O << "\n";
95 // Print out code for the function.
96 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
97 I != E; ++I) {
98
99 // Print a label for the basic block.
100 if (I != MF.begin()) {
Chris Lattnerda5fb6d2009-09-14 03:15:54 +0000101 EmitBasicBlockStart(I);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000102 O << '\n';
103 }
104
105 // Print a basic block.
106 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
107 II != E; ++II) {
108
109 // Emit the line directive if source line changed.
110 const DebugLoc DL = II->getDebugLoc();
111 if (!DL.isUnknown() && DL != CurDL) {
112 DbgInfo.ChangeDebugLoc(MF, DL);
113 CurDL = DL;
114 }
115
116 // Print the assembly for the instruction.
117 printMachineInstruction(II);
118 }
119 }
120
121 // Emit function end debug directives.
122 DbgInfo.EndFunction(MF);
123
124 return false; // we didn't modify anything.
125}
126
127
128// printOperand - print operand of insn.
129void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
130 const MachineOperand &MO = MI->getOperand(opNum);
131
132 switch (MO.getType()) {
133 case MachineOperand::MO_Register:
Chris Lattnerf0a25de2009-09-13 20:31:40 +0000134 O << getRegisterName(MO.getReg());
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000135 return;
136
137 case MachineOperand::MO_Immediate:
138 O << (int)MO.getImm();
139 return;
140
141 case MachineOperand::MO_GlobalAddress: {
142 std::string Sname = Mang->getMangledName(MO.getGlobal());
143 // FIXME: currently we do not have a memcpy def coming in the module
144 // by any chance, as we do not link in those as .bc lib. So these calls
145 // are always external and it is safe to emit an extern.
146 if (PAN::isMemIntrinsic(Sname)) {
147 LibcallDecls.push_back(createESName(Sname));
148 }
Chris Lattner7f504882009-08-21 23:12:15 +0000149
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000150 O << Sname;
151 break;
152 }
153 case MachineOperand::MO_ExternalSymbol: {
154 const char *Sname = MO.getSymbolName();
155
156 // If its a libcall name, record it to decls section.
157 if (PAN::getSymbolTag(Sname) == PAN::LIBCALL) {
Chris Lattner7f504882009-08-21 23:12:15 +0000158 LibcallDecls.push_back(Sname);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000159 }
160
161 // Record a call to intrinsic to print the extern declaration for it.
162 std::string Sym = Sname;
163 if (PAN::isMemIntrinsic(Sym)) {
164 Sym = PAN::addPrefix(Sym);
165 LibcallDecls.push_back(createESName(Sym));
166 }
Chris Lattner7f504882009-08-21 23:12:15 +0000167
168 O << Sym;
169 break;
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000170 }
171 case MachineOperand::MO_MachineBasicBlock:
Chris Lattnerc6f802d2009-09-13 17:14:04 +0000172 GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000173 return;
174
175 default:
176 llvm_unreachable(" Operand type not supported.");
177 }
178}
179
180/// printCCOperand - Print the cond code operand.
181///
182void PIC16AsmPrinter::printCCOperand(const MachineInstr *MI, int opNum) {
183 int CC = (int)MI->getOperand(opNum).getImm();
184 O << PIC16CondCodeToString((PIC16CC::CondCodes)CC);
185}
186
187// This function is used to sort the decls list.
188// should return true if s1 should come before s2.
189static bool is_before(const char *s1, const char *s2) {
190 return strcmp(s1, s2) <= 0;
191}
192
193// This is used by list::unique below.
194// unique will filter out duplicates if it knows them.
195static bool is_duplicate(const char *s1, const char *s2) {
196 return !strcmp(s1, s2);
197}
198
199/// printLibcallDecls - print the extern declarations for compiler
200/// intrinsics.
201///
202void PIC16AsmPrinter::printLibcallDecls() {
203 // If no libcalls used, return.
204 if (LibcallDecls.empty()) return;
205
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000206 O << MAI->getCommentString() << "External decls for libcalls - BEGIN." <<"\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000207 // Remove duplicate entries.
208 LibcallDecls.sort(is_before);
209 LibcallDecls.unique(is_duplicate);
210
211 for (std::list<const char*>::const_iterator I = LibcallDecls.begin();
212 I != LibcallDecls.end(); I++) {
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000213 O << MAI->getExternDirective() << *I << "\n";
214 O << MAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n";
215 O << MAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000216 }
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000217 O << MAI->getCommentString() << "External decls for libcalls - END." <<"\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000218}
219
220/// doInitialization - Perfrom Module level initializations here.
221/// One task that we do here is to sectionize all global variables.
222/// The MemSelOptimizer pass depends on the sectionizing.
223///
224bool PIC16AsmPrinter::doInitialization(Module &M) {
225 bool Result = AsmPrinter::doInitialization(M);
226
227 // FIXME:: This is temporary solution to generate the include file.
228 // The processor should be passed to llc as in input and the header file
229 // should be generated accordingly.
230 O << "\n\t#include P16F1937.INC\n";
231
232 // Set the section names for all globals.
233 for (Module::global_iterator I = M.global_begin(), E = M.global_end();
234 I != E; ++I)
235 if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage()) {
236 const MCSection *S = getObjFileLowering().SectionForGlobal(I, Mang, TM);
237
238 I->setSection(((const MCSectionPIC16*)S)->getName());
239 }
240
241 DbgInfo.BeginModule(M);
242 EmitFunctionDecls(M);
243 EmitUndefinedVars(M);
244 EmitDefinedVars(M);
245 EmitIData(M);
246 EmitUData(M);
247 EmitRomData(M);
248 return Result;
249}
250
251/// Emit extern decls for functions imported from other modules, and emit
252/// global declarations for function defined in this module and which are
253/// available to other modules.
254///
255void PIC16AsmPrinter::EmitFunctionDecls(Module &M) {
256 // Emit declarations for external functions.
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000257 O <<"\n"<<MAI->getCommentString() << "Function Declarations - BEGIN." <<"\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000258 for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) {
259 if (I->isIntrinsic())
260 continue;
261
262 std::string Name = Mang->getMangledName(I);
263 if (Name.compare("@abort") == 0)
264 continue;
265
266 if (!I->isDeclaration() && !I->hasExternalLinkage())
267 continue;
268
269 // Do not emit memcpy, memset, and memmove here.
270 // Calls to these routines can be generated in two ways,
271 // 1. User calling the standard lib function
272 // 2. Codegen generating these calls for llvm intrinsics.
273 // In the first case a prototype is alread availale, while in
274 // second case the call is via and externalsym and the prototype is missing.
275 // So declarations for these are currently always getting printing by
276 // tracking both kind of references in printInstrunction.
277 if (I->isDeclaration() && PAN::isMemIntrinsic(Name)) continue;
278
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000279 const char *directive = I->isDeclaration() ? MAI->getExternDirective() :
280 MAI->getGlobalDirective();
Chris Lattner7f504882009-08-21 23:12:15 +0000281
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000282 O << directive << Name << "\n";
283 O << directive << PAN::getRetvalLabel(Name) << "\n";
284 O << directive << PAN::getArgsLabel(Name) << "\n";
285 }
286
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000287 O << MAI->getCommentString() << "Function Declarations - END." <<"\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000288}
289
290// Emit variables imported from other Modules.
291void PIC16AsmPrinter::EmitUndefinedVars(Module &M) {
292 std::vector<const GlobalVariable*> Items = PTOF->ExternalVarDecls->Items;
293 if (!Items.size()) return;
294
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000295 O << "\n" << MAI->getCommentString() << "Imported Variables - BEGIN" << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000296 for (unsigned j = 0; j < Items.size(); j++) {
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000297 O << MAI->getExternDirective() << Mang->getMangledName(Items[j]) << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000298 }
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000299 O << MAI->getCommentString() << "Imported Variables - END" << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000300}
301
302// Emit variables defined in this module and are available to other modules.
303void PIC16AsmPrinter::EmitDefinedVars(Module &M) {
304 std::vector<const GlobalVariable*> Items = PTOF->ExternalVarDefs->Items;
305 if (!Items.size()) return;
306
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000307 O << "\n" << MAI->getCommentString() << "Exported Variables - BEGIN" << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000308 for (unsigned j = 0; j < Items.size(); j++) {
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000309 O << MAI->getGlobalDirective() << Mang->getMangledName(Items[j]) << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000310 }
Chris Lattnera5ef4d32009-08-22 21:43:10 +0000311 O << MAI->getCommentString() << "Exported Variables - END" << "\n";
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000312}
313
314// Emit initialized data placed in ROM.
315void PIC16AsmPrinter::EmitRomData(Module &M) {
316 // Print ROM Data section.
317 const std::vector<PIC16Section*> &ROSections = PTOF->ROSections;
318 for (unsigned i = 0; i < ROSections.size(); i++) {
319 const std::vector<const GlobalVariable*> &Items = ROSections[i]->Items;
320 if (!Items.size()) continue;
321 O << "\n";
Chris Lattner73266f92009-08-19 05:49:37 +0000322 OutStreamer.SwitchSection(PTOF->ROSections[i]->S_);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000323 for (unsigned j = 0; j < Items.size(); j++) {
324 O << Mang->getMangledName(Items[j]);
325 Constant *C = Items[j]->getInitializer();
326 int AddrSpace = Items[j]->getType()->getAddressSpace();
327 EmitGlobalConstant(C, AddrSpace);
328 }
329 }
330}
331
332bool PIC16AsmPrinter::doFinalization(Module &M) {
333 printLibcallDecls();
334 EmitRemainingAutos();
335 DbgInfo.EndModule(M);
336 O << "\n\t" << "END\n";
337 return AsmPrinter::doFinalization(M);
338}
339
340void PIC16AsmPrinter::EmitFunctionFrame(MachineFunction &MF) {
341 const Function *F = MF.getFunction();
342 std::string FuncName = Mang->getMangledName(F);
343 const TargetData *TD = TM.getTargetData();
344 // Emit the data section name.
345 O << "\n";
Chris Lattner08e63732009-08-21 23:08:09 +0000346
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000347 const MCSection *fPDataSection =
Chris Lattner08e63732009-08-21 23:08:09 +0000348 getObjFileLowering().getSectionForFunctionFrame(CurrentFnName);
Chris Lattner73266f92009-08-19 05:49:37 +0000349 OutStreamer.SwitchSection(fPDataSection);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000350
351 // Emit function frame label
352 O << PAN::getFrameLabel(CurrentFnName) << ":\n";
353
354 const Type *RetType = F->getReturnType();
355 unsigned RetSize = 0;
356 if (RetType->getTypeID() != Type::VoidTyID)
357 RetSize = TD->getTypeAllocSize(RetType);
358
359 //Emit function return value space
360 // FIXME: Do not emit RetvalLable when retsize is zero. To do this
361 // we will need to avoid printing a global directive for Retval label
362 // in emitExternandGloblas.
363 if(RetSize > 0)
364 O << PAN::getRetvalLabel(CurrentFnName) << " RES " << RetSize << "\n";
365 else
366 O << PAN::getRetvalLabel(CurrentFnName) << ": \n";
367
368 // Emit variable to hold the space for function arguments
369 unsigned ArgSize = 0;
370 for (Function::const_arg_iterator argi = F->arg_begin(),
371 arge = F->arg_end(); argi != arge ; ++argi) {
372 const Type *Ty = argi->getType();
373 ArgSize += TD->getTypeAllocSize(Ty);
374 }
375
376 O << PAN::getArgsLabel(CurrentFnName) << " RES " << ArgSize << "\n";
377
378 // Emit temporary space
379 int TempSize = PTLI->GetTmpSize();
380 if (TempSize > 0)
381 O << PAN::getTempdataLabel(CurrentFnName) << " RES " << TempSize << '\n';
382}
383
384void PIC16AsmPrinter::EmitIData(Module &M) {
385
386 // Print all IDATA sections.
387 const std::vector<PIC16Section*> &IDATASections = PTOF->IDATASections;
388 for (unsigned i = 0; i < IDATASections.size(); i++) {
389 O << "\n";
390 if (IDATASections[i]->S_->getName().find("llvm.") != std::string::npos)
391 continue;
Chris Lattner73266f92009-08-19 05:49:37 +0000392 OutStreamer.SwitchSection(IDATASections[i]->S_);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000393 std::vector<const GlobalVariable*> Items = IDATASections[i]->Items;
394 for (unsigned j = 0; j < Items.size(); j++) {
395 std::string Name = Mang->getMangledName(Items[j]);
396 Constant *C = Items[j]->getInitializer();
397 int AddrSpace = Items[j]->getType()->getAddressSpace();
398 O << Name;
399 EmitGlobalConstant(C, AddrSpace);
400 }
401 }
402}
403
404void PIC16AsmPrinter::EmitUData(Module &M) {
405 const TargetData *TD = TM.getTargetData();
406
407 // Print all BSS sections.
408 const std::vector<PIC16Section*> &BSSSections = PTOF->BSSSections;
409 for (unsigned i = 0; i < BSSSections.size(); i++) {
410 O << "\n";
Chris Lattner73266f92009-08-19 05:49:37 +0000411 OutStreamer.SwitchSection(BSSSections[i]->S_);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000412 std::vector<const GlobalVariable*> Items = BSSSections[i]->Items;
413 for (unsigned j = 0; j < Items.size(); j++) {
414 std::string Name = Mang->getMangledName(Items[j]);
415 Constant *C = Items[j]->getInitializer();
416 const Type *Ty = C->getType();
417 unsigned Size = TD->getTypeAllocSize(Ty);
418
419 O << Name << " RES " << Size << "\n";
420 }
421 }
422}
423
Chris Lattner08e63732009-08-21 23:08:09 +0000424void PIC16AsmPrinter::EmitAutos(std::string FunctName) {
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000425 // Section names for all globals are already set.
426 const TargetData *TD = TM.getTargetData();
427
428 // Now print Autos section for this function.
Chris Lattner08e63732009-08-21 23:08:09 +0000429 std::string SectionName = PAN::getAutosSectionName(FunctName);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000430 const std::vector<PIC16Section*> &AutosSections = PTOF->AutosSections;
431 for (unsigned i = 0; i < AutosSections.size(); i++) {
432 O << "\n";
433 if (AutosSections[i]->S_->getName() == SectionName) {
434 // Set the printing status to true
435 AutosSections[i]->setPrintedStatus(true);
Chris Lattner73266f92009-08-19 05:49:37 +0000436 OutStreamer.SwitchSection(AutosSections[i]->S_);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000437 const std::vector<const GlobalVariable*> &Items = AutosSections[i]->Items;
438 for (unsigned j = 0; j < Items.size(); j++) {
439 std::string VarName = Mang->getMangledName(Items[j]);
440 Constant *C = Items[j]->getInitializer();
441 const Type *Ty = C->getType();
442 unsigned Size = TD->getTypeAllocSize(Ty);
443 // Emit memory reserve directive.
444 O << VarName << " RES " << Size << "\n";
445 }
446 break;
447 }
448 }
449}
450
451// Print autos that were not printed during the code printing of functions.
452// As the functions might themselves would have got deleted by the optimizer.
453void PIC16AsmPrinter::EmitRemainingAutos() {
454 const TargetData *TD = TM.getTargetData();
455
456 // Now print Autos section for this function.
457 std::vector <PIC16Section *>AutosSections = PTOF->AutosSections;
458 for (unsigned i = 0; i < AutosSections.size(); i++) {
459
460 // if the section is already printed then don't print again
461 if (AutosSections[i]->isPrinted())
462 continue;
463
464 // Set status as printed
465 AutosSections[i]->setPrintedStatus(true);
466
467 O << "\n";
Chris Lattner73266f92009-08-19 05:49:37 +0000468 OutStreamer.SwitchSection(AutosSections[i]->S_);
Sanjiv Gupta8aae07e2009-08-13 16:37:05 +0000469 const std::vector<const GlobalVariable*> &Items = AutosSections[i]->Items;
470 for (unsigned j = 0; j < Items.size(); j++) {
471 std::string VarName = Mang->getMangledName(Items[j]);
472 Constant *C = Items[j]->getInitializer();
473 const Type *Ty = C->getType();
474 unsigned Size = TD->getTypeAllocSize(Ty);
475 // Emit memory reserve directive.
476 O << VarName << " RES " << Size << "\n";
477 }
478 }
479}
480
481
482extern "C" void LLVMInitializePIC16AsmPrinter() {
483 RegisterAsmPrinter<PIC16AsmPrinter> X(ThePIC16Target);
484}
485
486