2009-10-19 19:56:26 +00:00
|
|
|
//===-- ARMInstPrinter.h - Convert ARM MCInst to assembly syntax ----------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This class prints an ARM MCInst to a .s file.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ARMINSTPRINTER_H
|
|
|
|
#define ARMINSTPRINTER_H
|
|
|
|
|
|
|
|
#include "llvm/MC/MCInstPrinter.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2011-03-21 04:13:46 +00:00
|
|
|
|
|
|
|
class MCOperand;
|
|
|
|
class TargetMachine;
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2009-10-19 19:56:26 +00:00
|
|
|
class ARMInstPrinter : public MCInstPrinter {
|
|
|
|
public:
|
2011-03-31 00:39:16 +00:00
|
|
|
ARMInstPrinter(TargetMachine &TM, const MCAsmInfo &MAI)
|
|
|
|
: MCInstPrinter(MAI) {}
|
2009-10-19 19:56:26 +00:00
|
|
|
|
2010-04-04 05:04:31 +00:00
|
|
|
virtual void printInst(const MCInst *MI, raw_ostream &O);
|
2010-10-28 21:37:33 +00:00
|
|
|
virtual StringRef getOpcodeName(unsigned Opcode) const;
|
2011-03-05 18:43:32 +00:00
|
|
|
virtual StringRef getRegName(unsigned RegNo) const;
|
2010-10-28 21:37:33 +00:00
|
|
|
|
|
|
|
static const char *getInstructionName(unsigned Opcode);
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2009-10-19 19:56:26 +00:00
|
|
|
// Autogenerated by tblgen.
|
2010-04-04 04:47:45 +00:00
|
|
|
void printInstruction(const MCInst *MI, raw_ostream &O);
|
2009-10-19 19:56:26 +00:00
|
|
|
static const char *getRegisterName(unsigned RegNo);
|
|
|
|
|
|
|
|
|
2010-11-03 01:11:15 +00:00
|
|
|
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printSOImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printSORegOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-03-31 23:26:08 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode2Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-03-31 23:26:08 +00:00
|
|
|
void printAM2PostIndexOp(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printAM2PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode2OffsetOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2011-04-04 17:18:19 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode3Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-04-04 17:18:19 +00:00
|
|
|
void printAM3PostIndexOp(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode3OffsetOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2011-04-04 17:18:19 +00:00
|
|
|
|
2010-11-03 01:11:15 +00:00
|
|
|
void printLdStmModeOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printAddrMode5Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode6Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-03-24 21:04:58 +00:00
|
|
|
void printAddrMode7Operand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printAddrMode6OffsetOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-03-10 18:59:38 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printBitfieldInvMaskImmOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-08-12 20:46:17 +00:00
|
|
|
void printMemBOption(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-08-16 18:27:34 +00:00
|
|
|
void printShiftImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2009-11-19 06:57:41 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printThumbS4ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printThumbITMask(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printThumbAddrModeRROperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-12-14 03:36:38 +00:00
|
|
|
void printThumbAddrModeImm5SOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O, unsigned Scale);
|
|
|
|
void printThumbAddrModeImm5S1Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printThumbAddrModeImm5S2Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printThumbAddrModeImm5S4Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printThumbAddrModeSPOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2010-04-04 04:47:45 +00:00
|
|
|
void printT2SOOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-10-25 20:00:01 +00:00
|
|
|
void printAddrModeImm12Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printT2AddrModeImm8Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printT2AddrModeImm8s4Operand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printT2AddrModeImm8OffsetOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printT2AddrModeImm8s4OffsetOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printT2AddrModeSoRegOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2010-10-13 21:00:04 +00:00
|
|
|
void printSetendOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-02-14 13:09:44 +00:00
|
|
|
void printCPSIMod(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printCPSIFlag(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printMSRMaskOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printPredicateOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printMandatoryPredicateOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printSBitModifierOperand(const MCInst *MI, unsigned OpNum,
|
|
|
|
raw_ostream &O);
|
|
|
|
void printRegisterList(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printNoHashImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2011-01-13 21:46:02 +00:00
|
|
|
void printPImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printCImmediate(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-04-04 04:47:45 +00:00
|
|
|
void printVFPf32ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
|
|
|
void printVFPf64ImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2010-06-11 21:34:50 +00:00
|
|
|
void printNEONModImmOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2009-10-19 22:23:04 +00:00
|
|
|
|
2010-09-17 21:25:10 +00:00
|
|
|
void printPCLabel(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
2009-10-19 19:56:26 +00:00
|
|
|
};
|
2010-09-17 21:25:10 +00:00
|
|
|
|
2010-11-14 19:40:38 +00:00
|
|
|
} // end namespace llvm
|
2009-10-19 19:56:26 +00:00
|
|
|
|
|
|
|
#endif
|