brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 474ccff Raw
54 lines · c
1//===-- AArch64MCInstLower.h - Lower MachineInstr to MCInst ---------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H10#define LLVM_LIB_TARGET_AARCH64_AARCH64MCINSTLOWER_H11 12#include "llvm/IR/GlobalValue.h"13#include "llvm/Support/Compiler.h"14#include "llvm/TargetParser/Triple.h"15 16namespace llvm {17class AsmPrinter;18class MCContext;19class MCInst;20class MCOperand;21class MCSymbol;22class MachineInstr;23class MachineOperand;24 25/// AArch64MCInstLower - This class is used to lower an MachineInstr26/// into an MCInst.27class LLVM_LIBRARY_VISIBILITY AArch64MCInstLower {28  MCContext &Ctx;29  AsmPrinter &Printer;30  Triple TargetTriple;31 32public:33  AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer);34 35  bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const;36  void Lower(const MachineInstr *MI, MCInst &OutMI) const;37 38  MCOperand lowerSymbolOperandMachO(const MachineOperand &MO,39                                    MCSymbol *Sym) const;40  MCOperand lowerSymbolOperandELF(const MachineOperand &MO,41                                  MCSymbol *Sym) const;42  MCOperand lowerSymbolOperandCOFF(const MachineOperand &MO,43                                   MCSymbol *Sym) const;44  MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;45 46  MCSymbol *GetGlobalValueSymbol(const GlobalValue *GV,47                                 unsigned TargetFlags) const;48  MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;49  MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;50};51}52 53#endif54