1 //===-- ARMInstPrinter.h - Convert ARM MCInst to assembly syntax ----------===//
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 class prints an ARM MCInst to a .s file.
12 //===----------------------------------------------------------------------===//
14 #ifndef ARMINSTPRINTER_H
15 #define ARMINSTPRINTER_H
17 #include "llvm/MC/MCInstPrinter.h"
23 class ARMInstPrinter
: public MCInstPrinter
{
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
,
49 void printAddrMode2OffsetOperand(const MCInst
*MI
, unsigned OpNum
,
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
,
56 void printAddrMode3OffsetOperand(const MCInst
*MI
, unsigned OpNum
,
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
,
66 void printBitfieldInvMaskImmOperand(const MCInst
*MI
, unsigned OpNum
,
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
,
75 void printThumbAddrModeImm5SOperand(const MCInst
*MI
, unsigned OpNum
,
76 raw_ostream
&O
, unsigned Scale
);
77 void printThumbAddrModeImm5S1Operand(const MCInst
*MI
, unsigned OpNum
,
79 void printThumbAddrModeImm5S2Operand(const MCInst
*MI
, unsigned OpNum
,
81 void printThumbAddrModeImm5S4Operand(const MCInst
*MI
, unsigned OpNum
,
83 void printThumbAddrModeSPOperand(const MCInst
*MI
, unsigned OpNum
,
86 void printT2SOOperand(const MCInst
*MI
, unsigned OpNum
, raw_ostream
&O
);
87 void printAddrModeImm12Operand(const MCInst
*MI
, unsigned OpNum
,
89 void printT2AddrModeImm8Operand(const MCInst
*MI
, unsigned OpNum
,
91 void printT2AddrModeImm8s4Operand(const MCInst
*MI
, unsigned OpNum
,
93 void printT2AddrModeImm8OffsetOperand(const MCInst
*MI
, unsigned OpNum
,
95 void printT2AddrModeImm8s4OffsetOperand(const MCInst
*MI
, unsigned OpNum
,
97 void printT2AddrModeSoRegOperand(const MCInst
*MI
, unsigned OpNum
,
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
,
107 void printSBitModifierOperand(const MCInst
*MI
, unsigned OpNum
,
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