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
22 class PIC16TargetMachine;
24 class MachineCodeEmitter;
42 inline static const char *PIC16CondCodeToString(PIC16CC::CondCodes CC) {
44 default: assert(0 && "Unknown condition code");
45 case PIC16CC::NE: return "ne";
46 case PIC16CC::EQ: return "eq";
47 case PIC16CC::LT: return "lt";
48 case PIC16CC::ULT: return "lt";
49 case PIC16CC::LE: return "le";
50 case PIC16CC::GT: return "gt";
51 case PIC16CC::UGT: return "gt";
52 case PIC16CC::GE: return "ge";
56 inline static bool isSignedComparison(PIC16CC::CondCodes CC) {
58 default: assert(0 && "Unknown condition code");
70 return false; // condition codes for unsigned comparison.
75 FunctionPass *createPIC16ISelDag(PIC16TargetMachine &TM);
76 FunctionPass *createPIC16CodePrinterPass(raw_ostream &OS,
77 PIC16TargetMachine &TM,
78 bool Fast, bool Verbose);
79 } // end namespace llvm;
81 // Defines symbolic names for PIC16 registers. This defines a mapping from
82 // register name to register number.
83 #include "PIC16GenRegisterNames.inc"
85 // Defines symbolic names for the PIC16 instructions.
86 #include "PIC16GenInstrNames.inc"