[llvm-commits] [llvm] r59623 - /llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h
Sanjiv Gupta
sanjiv.gupta at microchip.com
Wed Nov 19 04:12:50 PST 2008
Author: sgupta
Date: Wed Nov 19 06:12:49 2008
New Revision: 59623
URL: http://llvm.org/viewvc/llvm-project?rev=59623&view=rev
Log:
Forgot to add this in the previous commit.
Added:
llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h
Added: llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h?rev=59623&view=auto
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h (added)
+++ llvm/trunk/lib/Target/PIC16/PIC16AsmPrinter.h Wed Nov 19 06:12:49 2008
@@ -0,0 +1,62 @@
+//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains a printer that converts from our internal representation
+// of machine-dependent LLVM code to PIC16 assembly language.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef PIC16ASMPRINTER_H
+#define PIC16ASMPRINTER_H
+
+#include "PIC16.h"
+#include "PIC16TargetMachine.h"
+#include "llvm/CodeGen/AsmPrinter.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Target/TargetAsmInfo.h"
+#include "llvm/Target/TargetMachine.h"
+
+namespace llvm {
+ struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter {
+ PIC16AsmPrinter(raw_ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
+ : AsmPrinter(O, TM, T) {
+ CurrentBankselLabelInBasicBlock = "";
+ IsRomData = false;
+ }
+ private :
+ virtual const char *getPassName() const {
+ return "PIC16 Assembly Printer";
+ }
+
+ bool runOnMachineFunction(MachineFunction &F);
+ void printOperand(const MachineInstr *MI, int opNum);
+ void SwitchToUDataSection(const char *NewSection,
+ const GlobalValue *GV = NULL);
+ void SwitchToRomDataSection(const char *NewSection,
+ const GlobalValue *GV = NULL);
+ bool printInstruction(const MachineInstr *MI); // definition autogenerated.
+ bool printMachineInstruction(const MachineInstr *MI);
+ void EmitInitData (Module &M);
+ void EmitUnInitData (Module &M);
+ void EmitRomData (Module &M);
+ virtual void EmitConstantValueOnly(const Constant *CV);
+ void emitFunctionData(MachineFunction &MF);
+ void emitFunctionTempData(MachineFunction &MF);
+
+ protected:
+ bool doInitialization(Module &M);
+ bool doFinalization(Module &M);
+
+ private:
+ std::string CurrentBankselLabelInBasicBlock;
+ bool IsRomData;
+ };
+} // end of namespace
+
+#endif
More information about the llvm-commits
mailing list