LLVM API Documentation
00001 //===-- AArch64MCInstLower.h - Lower MachineInstr to MCInst ---------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H 00011 #define LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H 00012 00013 #include "llvm/ADT/Triple.h" 00014 #include "llvm/Support/Compiler.h" 00015 00016 namespace llvm { 00017 class AsmPrinter; 00018 class MCAsmInfo; 00019 class MCContext; 00020 class MCInst; 00021 class MCOperand; 00022 class MCSymbol; 00023 class MachineInstr; 00024 class MachineModuleInfoMachO; 00025 class MachineOperand; 00026 class Mangler; 00027 00028 /// AArch64MCInstLower - This class is used to lower an MachineInstr 00029 /// into an MCInst. 00030 class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower { 00031 MCContext &Ctx; 00032 AsmPrinter &Printer; 00033 Triple TargetTriple; 00034 00035 public: 00036 AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer); 00037 00038 bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const; 00039 void Lower(const MachineInstr *MI, MCInst &OutMI) const; 00040 00041 MCOperand lowerSymbolOperandDarwin(const MachineOperand &MO, 00042 MCSymbol *Sym) const; 00043 MCOperand lowerSymbolOperandELF(const MachineOperand &MO, 00044 MCSymbol *Sym) const; 00045 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; 00046 00047 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const; 00048 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const; 00049 }; 00050 } 00051 00052 #endif