Use BranchProbability instead of floating points in IfConverter.
[llvm/stm8.git] / lib / Target / ARM / InstPrinter / ARMInstPrinter.h
blobf227f4a836dd90d33dc3d14974492381fbb6ba6e
1 //===-- ARMInstPrinter.h - Convert ARM MCInst to assembly syntax ----------===//
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 class prints an ARM MCInst to a .s file.
12 //===----------------------------------------------------------------------===//
14 #ifndef ARMINSTPRINTER_H
15 #define ARMINSTPRINTER_H
17 #include "llvm/MC/MCInstPrinter.h"
19 namespace llvm {
21 class MCOperand;
23 class ARMInstPrinter : public MCInstPrinter {
24 public:
25 ARMInstPrinter(const MCAsmInfo &MAI)
26 : MCInstPrinter(MAI) {}
28 virtual void printInst(const MCInst *MI, raw_ostream &O);
29 virtual StringRef getOpcodeName(unsigned Opcode) const;
30 virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
32 static const char *getInstructionName(unsigned Opcode);
34 // Autogenerated by tblgen.
35 void printInstruction(const MCInst *MI, raw_ostream &O);
36 static const char *getRegisterName(unsigned RegNo);
39 void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
41 void printSOImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
43 void printSORegOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
45 void printAddrMode2Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
46 void printAM2PostIndexOp(const MCInst *MI, unsigned OpNum, raw_ostream &O);
47 void printAM2PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum,
48 raw_ostream &O);
49 void printAddrMode2OffsetOperand(const MCInst *MI, unsigned OpNum,
50 raw_ostream &O);
52 void printAddrMode3Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
53 void printAM3PostIndexOp(const MCInst *MI, unsigned OpNum, raw_ostream &O);
54 void printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum,
55 raw_ostream &O);
56 void printAddrMode3OffsetOperand(const MCInst *MI, unsigned OpNum,
57 raw_ostream &O);
59 void printLdStmModeOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
60 void printAddrMode5Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
61 void printAddrMode6Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
62 void printAddrMode7Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
63 void printAddrMode6OffsetOperand(const MCInst *MI, unsigned OpNum,
64 raw_ostream &O);
66 void printBitfieldInvMaskImmOperand(const MCInst *MI, unsigned OpNum,
67 raw_ostream &O);
68 void printMemBOption(const MCInst *MI, unsigned OpNum, raw_ostream &O);
69 void printShiftImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
71 void printThumbS4ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
72 void printThumbITMask(const MCInst *MI, unsigned OpNum, raw_ostream &O);
73 void printThumbAddrModeRROperand(const MCInst *MI, unsigned OpNum,
74 raw_ostream &O);
75 void printThumbAddrModeImm5SOperand(const MCInst *MI, unsigned OpNum,
76 raw_ostream &O, unsigned Scale);
77 void printThumbAddrModeImm5S1Operand(const MCInst *MI, unsigned OpNum,
78 raw_ostream &O);
79 void printThumbAddrModeImm5S2Operand(const MCInst *MI, unsigned OpNum,
80 raw_ostream &O);
81 void printThumbAddrModeImm5S4Operand(const MCInst *MI, unsigned OpNum,
82 raw_ostream &O);
83 void printThumbAddrModeSPOperand(const MCInst *MI, unsigned OpNum,
84 raw_ostream &O);
86 void printT2SOOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
87 void printAddrModeImm12Operand(const MCInst *MI, unsigned OpNum,
88 raw_ostream &O);
89 void printT2AddrModeImm8Operand(const MCInst *MI, unsigned OpNum,
90 raw_ostream &O);
91 void printT2AddrModeImm8s4Operand(const MCInst *MI, unsigned OpNum,
92 raw_ostream &O);
93 void printT2AddrModeImm8OffsetOperand(const MCInst *MI, unsigned OpNum,
94 raw_ostream &O);
95 void printT2AddrModeImm8s4OffsetOperand(const MCInst *MI, unsigned OpNum,
96 raw_ostream &O);
97 void printT2AddrModeSoRegOperand(const MCInst *MI, unsigned OpNum,
98 raw_ostream &O);
100 void printSetendOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
101 void printCPSIMod(const MCInst *MI, unsigned OpNum, raw_ostream &O);
102 void printCPSIFlag(const MCInst *MI, unsigned OpNum, raw_ostream &O);
103 void printMSRMaskOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
104 void printPredicateOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
105 void printMandatoryPredicateOperand(const MCInst *MI, unsigned OpNum,
106 raw_ostream &O);
107 void printSBitModifierOperand(const MCInst *MI, unsigned OpNum,
108 raw_ostream &O);
109 void printRegisterList(const MCInst *MI, unsigned OpNum, raw_ostream &O);
110 void printNoHashImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
111 void printPImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
112 void printCImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
113 void printVFPf32ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
114 void printVFPf64ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
115 void printNEONModImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
117 void printPCLabel(const MCInst *MI, unsigned OpNum, raw_ostream &O);
120 } // end namespace llvm
122 #endif