1 //===-- PIC16.h - Top-level interface for PIC16 representation --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the entry points for global functions defined in
11 // the LLVM PIC16 back-end.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TARGET_PIC16_H
16 #define LLVM_TARGET_PIC16_H
18 #include "llvm/Target/TargetMachine.h"
23 class PIC16TargetMachine;
25 class MachineCodeEmitter;
43 inline static const char *PIC16CondCodeToString(PIC16CC::CondCodes CC) {
45 default: assert(0 && "Unknown condition code");
46 case PIC16CC::NE: return "ne";
47 case PIC16CC::EQ: return "eq";
48 case PIC16CC::LT: return "lt";
49 case PIC16CC::ULT: return "lt";
50 case PIC16CC::LE: return "le";
51 case PIC16CC::GT: return "gt";
52 case PIC16CC::UGT: return "gt";
53 case PIC16CC::GE: return "ge";
57 inline static bool isSignedComparison(PIC16CC::CondCodes CC) {
59 default: assert(0 && "Unknown condition code");
71 return false; // condition codes for unsigned comparison.
76 FunctionPass *createPIC16ISelDag(PIC16TargetMachine &TM);
77 FunctionPass *createPIC16CodePrinterPass(raw_ostream &OS,
78 PIC16TargetMachine &TM,
79 CodeGenOpt::Level OptLevel,
81 } // end namespace llvm;
83 // Defines symbolic names for PIC16 registers. This defines a mapping from
84 // register name to register number.
85 #include "PIC16GenRegisterNames.inc"
87 // Defines symbolic names for the PIC16 instructions.
88 #include "PIC16GenInstrNames.inc"