2014-05-24 12:50:23 +00:00
|
|
|
//===-- AArch64MCInstLower.h - Lower MachineInstr to MCInst ---------------===//
|
2014-03-29 10:18:08 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-05-24 12:50:23 +00:00
|
|
|
#ifndef AArch64_MCINSTLOWER_H
|
|
|
|
#define AArch64_MCINSTLOWER_H
|
2014-03-29 10:18:08 +00:00
|
|
|
|
|
|
|
#include "llvm/ADT/Triple.h"
|
|
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class AsmPrinter;
|
|
|
|
class MCAsmInfo;
|
|
|
|
class MCContext;
|
|
|
|
class MCInst;
|
|
|
|
class MCOperand;
|
|
|
|
class MCSymbol;
|
|
|
|
class MachineInstr;
|
|
|
|
class MachineModuleInfoMachO;
|
|
|
|
class MachineOperand;
|
|
|
|
class Mangler;
|
|
|
|
|
2014-05-24 12:50:23 +00:00
|
|
|
/// AArch64MCInstLower - This class is used to lower an MachineInstr
|
2014-03-29 10:18:08 +00:00
|
|
|
/// into an MCInst.
|
2014-05-24 12:50:23 +00:00
|
|
|
class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower {
|
2014-03-29 10:18:08 +00:00
|
|
|
MCContext &Ctx;
|
|
|
|
AsmPrinter &Printer;
|
|
|
|
Triple TargetTriple;
|
|
|
|
|
|
|
|
public:
|
2014-05-24 12:50:23 +00:00
|
|
|
AArch64MCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer);
|
2014-03-29 10:18:08 +00:00
|
|
|
|
|
|
|
bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const;
|
|
|
|
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
|
|
|
|
|
|
|
|
MCOperand lowerSymbolOperandDarwin(const MachineOperand &MO,
|
|
|
|
MCSymbol *Sym) const;
|
|
|
|
MCOperand lowerSymbolOperandELF(const MachineOperand &MO,
|
|
|
|
MCSymbol *Sym) const;
|
|
|
|
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
|
|
|
|
|
|
|
|
MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
|
|
|
|
MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|