blob: 1e29b80c2d626953d292f77027808180b29d708b [file] [log] [blame]
Tim Northover3b0846e2014-05-24 12:50:23 +00001//===-- AArch64MCInstLower.h - Lower MachineInstr to MCInst ---------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000010#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H
11#define LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H
Tim Northover3b0846e2014-05-24 12:50:23 +000012
13#include "llvm/ADT/Triple.h"
14#include "llvm/Support/Compiler.h"
15
16namespace llvm {
17class AsmPrinter;
18class MCAsmInfo;
19class MCContext;
20class MCInst;
21class MCOperand;
22class MCSymbol;
23class MachineInstr;
24class MachineModuleInfoMachO;
25class MachineOperand;
26class Mangler;
27
28/// AArch64MCInstLower - This class is used to lower an MachineInstr
29/// into an MCInst.
30class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower {
31 MCContext &Ctx;
32 AsmPrinter &Printer;
33 Triple TargetTriple;
34
35public:
Alexey Samsonov96b02d12014-08-19 21:51:08 +000036 AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer);
Tim Northover3b0846e2014-05-24 12:50:23 +000037
38 bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const;
39 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
40
41 MCOperand lowerSymbolOperandDarwin(const MachineOperand &MO,
42 MCSymbol *Sym) const;
43 MCOperand lowerSymbolOperandELF(const MachineOperand &MO,
44 MCSymbol *Sym) const;
45 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
46
47 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
48 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
49};
Alexander Kornienkof00654e2015-06-23 09:49:53 +000050}
Tim Northover3b0846e2014-05-24 12:50:23 +000051
52#endif