2014-05-24 20:50:23 +08:00
|
|
|
//===-- AArch64MCInstLower.h - Lower MachineInstr to MCInst ---------------===//
|
2014-03-29 18:18:08 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H
|
|
|
|
#define LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H
|
2014-03-29 18:18:08 +08: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 20:50:23 +08:00
|
|
|
/// AArch64MCInstLower - This class is used to lower an MachineInstr
|
2014-03-29 18:18:08 +08:00
|
|
|
/// into an MCInst.
|
2014-05-24 20:50:23 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower {
|
2014-03-29 18:18:08 +08:00
|
|
|
MCContext &Ctx;
|
|
|
|
AsmPrinter &Printer;
|
|
|
|
Triple TargetTriple;
|
|
|
|
|
|
|
|
public:
|
2014-08-20 05:51:08 +08:00
|
|
|
AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer);
|
2014-03-29 18:18:08 +08: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;
|
2017-06-28 07:58:19 +08:00
|
|
|
MCOperand lowerSymbolOperandCOFF(const MachineOperand &MO,
|
|
|
|
MCSymbol *Sym) const;
|
2014-03-29 18:18:08 +08:00
|
|
|
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
|
|
|
|
|
|
|
|
MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
|
|
|
|
MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
|
|
|
|
};
|
2015-06-23 17:49:53 +08:00
|
|
|
}
|
2014-03-29 18:18:08 +08:00
|
|
|
|
|
|
|
#endif
|