expose HonorSignDependentRoundingFPMathOption to .td files
[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 was developed by the "Instituto Nokia de Tecnologia" and
6 // is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 //
11 // This file contains the entry points for global functions defined in the LLVM
12 // ARM back-end.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef TARGET_ARM_H
17 #define TARGET_ARM_H
18
19 #include <iosfwd>
20 #include <cassert>
21
22 namespace llvm {
23
24 class ARMTargetMachine;
25 class FunctionPass;
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 *createARMLoadStoreOptimizationPass();
92 FunctionPass *createARMConstantIslandPass();
93
94 } // end namespace llvm;
95
96 // Defines symbolic names for ARM registers.  This defines a mapping from
97 // register name to register number.
98 //
99 #include "ARMGenRegisterNames.inc"
100
101 // Defines symbolic names for the ARM instructions.
102 //
103 #include "ARMGenInstrNames.inc"
104
105
106 #endif