Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
//===- PPCInstPrinter.h - Convert PPC MCInst to assembly syntax -*- C++ -*-===// | //===- PPCInstPrinter.h - Convert PPC MCInst to assembly syntax -*- C++ -*-===// | ||||
// | // | ||||
// The LLVM Compiler Infrastructure | // The LLVM Compiler Infrastructure | ||||
// | // | ||||
// This file is distributed under the University of Illinois Open Source | // This file is distributed under the University of Illinois Open Source | ||||
// License. See LICENSE.TXT for details. | // License. See LICENSE.TXT for details. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// This class prints an PPC MCInst to a .s file. | // This class prints an PPC MCInst to a .s file. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef LLVM_LIB_TARGET_POWERPC_INSTPRINTER_PPCINSTPRINTER_H | #ifndef LLVM_LIB_TARGET_POWERPC_INSTPRINTER_PPCINSTPRINTER_H | ||||
#define LLVM_LIB_TARGET_POWERPC_INSTPRINTER_PPCINSTPRINTER_H | #define LLVM_LIB_TARGET_POWERPC_INSTPRINTER_PPCINSTPRINTER_H | ||||
#include "llvm/ADT/Triple.h" | |||||
#include "llvm/MC/MCInstPrinter.h" | #include "llvm/MC/MCInstPrinter.h" | ||||
namespace llvm { | namespace llvm { | ||||
class PPCInstPrinter : public MCInstPrinter { | class PPCInstPrinter : public MCInstPrinter { | ||||
bool IsDarwin; | Triple TripleInfo; | ||||
echristo: "TT" is a standard Triple name. | |||||
Not Done ReplyInline ActionsChanged to TT alexandreyy: Changed to TT | |||||
public: | public: | ||||
PPCInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, | PPCInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, | ||||
const MCRegisterInfo &MRI, bool isDarwin) | const MCRegisterInfo &MRI, Triple T) | ||||
: MCInstPrinter(MAI, MII, MRI), IsDarwin(isDarwin) {} | : MCInstPrinter(MAI, MII, MRI), TripleInfo(T) {} | ||||
bool isDarwinSyntax() const { | |||||
return IsDarwin; | |||||
} | |||||
void printRegName(raw_ostream &OS, unsigned RegNo) const override; | void printRegName(raw_ostream &OS, unsigned RegNo) const override; | ||||
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, | void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot, | ||||
const MCSubtargetInfo &STI) override; | const MCSubtargetInfo &STI) override; | ||||
// Autogenerated by tblgen. | // Autogenerated by tblgen. | ||||
void printInstruction(const MCInst *MI, raw_ostream &O); | void printInstruction(const MCInst *MI, raw_ostream &O); | ||||
static const char *getRegisterName(unsigned RegNo); | static const char *getRegisterName(unsigned RegNo); | ||||
bool printAliasInstr(const MCInst *MI, raw_ostream &OS); | bool printAliasInstr(const MCInst *MI, raw_ostream &OS); | ||||
void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx, | void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx, | ||||
unsigned PrintMethodIdx, | unsigned PrintMethodIdx, | ||||
raw_ostream &OS); | raw_ostream &OS); | ||||
void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); | void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); | ||||
void printPredicateOperand(const MCInst *MI, unsigned OpNo, | void printPredicateOperand(const MCInst *MI, unsigned OpNo, | ||||
raw_ostream &O, const char *Modifier = nullptr); | raw_ostream &O, const char *Modifier = nullptr); | ||||
Show All 27 Lines |
"TT" is a standard Triple name.