LLVM  12.0.0git
Macros | Functions
PPCAsmPrinter.cpp File Reference
#include "MCTargetDesc/PPCInstPrinter.h"
#include "MCTargetDesc/PPCMCExpr.h"
#include "MCTargetDesc/PPCMCTargetDesc.h"
#include "MCTargetDesc/PPCPredicates.h"
#include "PPC.h"
#include "PPCInstrInfo.h"
#include "PPCMachineFunctionInfo.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "PPCTargetStreamer.h"
#include "TargetInfo/PowerPCTargetInfo.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCSectionXCOFF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCSymbolXCOFF.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
#include <new>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "asmprinter"
 

Functions

static MCSymbolgetMCSymbolForTOCPseudoMO (const MachineOperand &MO, AsmPrinter &AP)
 Map a machine operand for a TOC pseudo-machine instruction to its corresponding MCSymbol. More...
 
static bool isSpecialLLVMGlobalArrayForStaticInit (const GlobalVariable *GV)
 
static AsmPrintercreatePPCAsmPrinterPass (TargetMachine &tm, std::unique_ptr< MCStreamer > &&Streamer)
 createPPCAsmPrinterPass - Returns a pass that prints the PPC assembly code for a MachineFunction to the given output stream, in a format that the Darwin assembler can deal with. More...
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter ()
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asmprinter"

Definition at line 76 of file PPCAsmPrinter.cpp.

Function Documentation

◆ createPPCAsmPrinterPass()

static AsmPrinter* createPPCAsmPrinterPass ( TargetMachine tm,
std::unique_ptr< MCStreamer > &&  Streamer 
)
static

createPPCAsmPrinterPass - Returns a pass that prints the PPC assembly code for a MachineFunction to the given output stream, in a format that the Darwin assembler can deal with.

Definition at line 1820 of file PPCAsmPrinter.cpp.

References llvm::TargetMachine::getTargetTriple(), and llvm::Triple::isOSAIX().

Referenced by LLVMInitializePowerPCAsmPrinter().

◆ getMCSymbolForTOCPseudoMO()

static MCSymbol* getMCSymbolForTOCPseudoMO ( const MachineOperand MO,
AsmPrinter AP 
)
static

Map a machine operand for a TOC pseudo-machine instruction to its corresponding MCSymbol.

Definition at line 501 of file PPCAsmPrinter.cpp.

References llvm::MCInst::addOperand(), llvm::MCInstBuilder::addReg(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::GlobalValue::AppendingLinkage, assert(), llvm::GlobalValue::AvailableExternallyLinkage, B, llvm::ARCISD::BL, llvm::GlobalValue::CommonLinkage, contains(), llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::PPCMCExpr::createHa(), llvm::PPCMCExpr::createLo(), llvm::MCBinaryExpr::createSub(), llvm::GlobalValue::DefaultVisibility, DL, llvm::PPCTargetStreamer::emitAbiVersion(), llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::PPCTargetStreamer::emitLocalEntry(), llvm::AsmPrinter::emitStartOfAsmFile(), llvm::PPCTargetStreamer::emitTCEntry(), llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::Module::getDataLayout(), llvm::Module::getFunction(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::AsmPrinter::GetJTISymbol(), llvm::GlobalValue::getLinkage(), llvm::PPCFunctionInfo::getLocalEPSymbol(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::MCInst::getOperand(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), llvm::Module::getPICLevel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::Value::getPointerAlignment(), llvm::DataLayout::getPointerSizeInBits(), llvm::MCSectionXCOFF::getQualNameSymbol(), llvm::MCOperand::getReg(), llvm::MachineOperand::getReg(), getRegisterName(), llvm::AsmPrinter::getSymbol(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), llvm::MachineOperand::getType(), llvm::GlobalValue::getVisibility(), llvm::GlobalObject::hasComdat(), llvm::GlobalObject::hasSection(), llvm::GlobalValue::HiddenVisibility, llvm::GlobalValue::InternalLinkage, llvm::PPC::InvertPredicate(), llvm::MachineOperand::isBlockAddress(), llvm::MachineOperand::isCPI(), llvm::GlobalValue::isDeclaration(), llvm::MachineOperand::isGlobal(), llvm::MachineInstr::isInlineAsm(), llvm::MachineOperand::isJTI(), llvm::MachineOperand::isReg(), llvm::GlobalValue::isThreadLocal(), llvm::CodeModel::Large, llvm::ARM_MB::LD, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, LLVM_DEBUG, llvm_unreachable, llvm::LowerPPCMachineInstrToMCInst(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::make_range(), llvm::BitmaskEnumDetail::Mask(), llvm::MCSA_Extern, llvm::MCSA_Global, llvm::MCSA_Invalid, llvm::MCSA_LGlobal, llvm::MCSA_Weak, llvm::PPCISD::MFOCRF, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_JumpTableIndex, Name, llvm::MachineInstr::operands(), llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::AArch64CC::PL, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::ProtectedVisibility, R2, Reg, llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, llvm::MCSection::setAlignment(), llvm::MCInst::setOpcode(), llvm::AsmPrinter::SetupMachineFunction(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, llvm::CodeModel::Small, llvm::PICLevel::SmallPIC, llvm::SystemZISD::TM, llvm::PPCFunctionInfo::usesPICBase(), llvm::PPCFunctionInfo::usesTOCBasePtr(), llvm::MCSymbolRefExpr::VK_GOT, llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PPC_DTPREL_HA, llvm::MCSymbolRefExpr::VK_PPC_DTPREL_LO, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSGD, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSGD_HA, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSGD_LO, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSLD, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSLD_HA, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSLD_LO, llvm::MCSymbolRefExpr::VK_PPC_GOT_TPREL, llvm::MCSymbolRefExpr::VK_PPC_GOT_TPREL_HA, llvm::MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO, llvm::MCSymbolRefExpr::VK_PPC_HA, llvm::MCSymbolRefExpr::VK_PPC_L, llvm::MCSymbolRefExpr::VK_PPC_LO, llvm::MCSymbolRefExpr::VK_PPC_LOCAL, llvm::MCSymbolRefExpr::VK_PPC_TLSGD, llvm::MCSymbolRefExpr::VK_PPC_TLSLD, llvm::MCSymbolRefExpr::VK_PPC_TOC, llvm::MCSymbolRefExpr::VK_PPC_TOC_HA, llvm::MCSymbolRefExpr::VK_PPC_TOC_LO, llvm::MCSymbolRefExpr::VK_PPC_TOCBASE, llvm::MCSymbolRefExpr::VK_PPC_U, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.

◆ isSpecialLLVMGlobalArrayForStaticInit()

static bool isSpecialLLVMGlobalArrayForStaticInit ( const GlobalVariable GV)
static

◆ LLVMInitializePowerPCAsmPrinter()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter ( )