Remove attribution from file headers, per discussion on llvmdev.
[oota-llvm.git] / lib / Target / ARM / ARM.h
1 //===-- ARM.h - Top-level interface for ARM representation---- --*- C++ -*-===//
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 the entry points for global functions defined in the LLVM
11 // ARM back-end.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef TARGET_ARM_H
16 #define TARGET_ARM_H
17
18 #include <iosfwd>
19 #include <cassert>
20
21 namespace llvm {
22
23 class ARMTargetMachine;
24 class FunctionPass;
25 class MachineCodeEmitter;
26
27 // Enums corresponding to ARM condition codes
28 namespace ARMCC {
29   enum CondCodes {
30     EQ,
31     NE,
32     HS,
33     LO,
34     MI,
35     PL,
36     VS,
37     VC,
38     HI,
39     LS,
40     GE,
41     LT,
42     GT,
43     LE,
44     AL
45   };
46   
47   inline static CondCodes getOppositeCondition(CondCodes CC){
48     switch (CC) {
49     default: assert(0 && "Unknown condition code");
50     case EQ: return NE;
51     case NE: return EQ;
52     case HS: return LO;
53     case LO: return HS;
54     case MI: return PL;
55     case PL: return MI;
56     case VS: return VC;
57     case VC: return VS;
58     case HI: return LS;
59     case LS: return HI;
60     case GE: return LT;
61     case LT: return GE;
62     case GT: return LE;
63     case LE: return GT;
64     }
65   }
66 }
67
68 inline static const char *ARMCondCodeToString(ARMCC::CondCodes CC) {
69   switch (CC) {
70   default: assert(0 && "Unknown condition code");
71   case ARMCC::EQ:  return "eq";
72   case ARMCC::NE:  return "ne";
73   case ARMCC::HS:  return "hs";
74   case ARMCC::LO:  return "lo";
75   case ARMCC::MI:  return "mi";
76   case ARMCC::PL:  return "pl";
77   case ARMCC::VS:  return "vs";
78   case ARMCC::VC:  return "vc";
79   case ARMCC::HI:  return "hi";
80   case ARMCC::LS:  return "ls";
81   case ARMCC::GE:  return "ge";
82   case ARMCC::LT:  return "lt";
83   case ARMCC::GT:  return "gt";
84   case ARMCC::LE:  return "le";
85   case ARMCC::AL:  return "al";
86   }
87 }
88
89 FunctionPass *createARMISelDag(ARMTargetMachine &TM);
90 FunctionPass *createARMCodePrinterPass(std::ostream &O, ARMTargetMachine &TM);
91 FunctionPass *createARMCodeEmitterPass(ARMTargetMachine &TM,
92                                        MachineCodeEmitter &MCE);
93 FunctionPass *createARMLoadStoreOptimizationPass();
94 FunctionPass *createARMConstantIslandPass();
95
96 } // end namespace llvm;
97
98 // Defines symbolic names for ARM registers.  This defines a mapping from
99 // register name to register number.
100 //
101 #include "ARMGenRegisterNames.inc"
102
103 // Defines symbolic names for the ARM instructions.
104 //
105 #include "ARMGenInstrNames.inc"
106
107
108 #endif