LLVM  10.0.0svn
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/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 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...
 
void LLVMInitializePowerPCAsmPrinter ()
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asmprinter"

Definition at line 75 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 1762 of file PPCAsmPrinter.cpp.

References llvm::TargetMachine::getTargetTriple(), llvm::Triple::isMacOSX(), 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 517 of file PPCAsmPrinter.cpp.

References llvm::MCInst::addOperand(), llvm::MCInstBuilder::addReg(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::array_lengthof(), assert(), B, llvm::ARCISD::BL, llvm::XCOFF::C_HIDEXT, contains(), llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::PPCMCExpr::createHa(), llvm::PPCMCExpr::createLo(), llvm::MCBinaryExpr::createSub(), llvm::PPC::DIR_64, llvm::PPC::DIR_7400, llvm::PPC::DIR_970, llvm::PPC::DIR_NONE, llvm::AsmPrinter::doFinalization(), llvm::Reloc::DynamicNoPIC, llvm::numbers::e, llvm::PPCTargetStreamer::emitAbiVersion(), llvm::AsmPrinter::EmitFunctionEntryLabel(), llvm::PPCTargetStreamer::emitLocalEntry(), llvm::PPCTargetStreamer::emitMachine(), llvm::AsmPrinter::EmitStartOfAsmFile(), llvm::PPCTargetStreamer::emitTCEntry(), llvm::Module::empty(), F(), first, llvm::GlobalObject::getAlignment(), llvm::GlobalValue::getAlignment(), llvm::MachineOperand::getBlockAddress(), llvm::AsmPrinter::GetBlockAddressSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::PPCSubtarget::getDarwinDirective(), llvm::SectionKind::getData(), llvm::Module::getDataLayout(), llvm::PointerType::getElementType(), llvm::Module::getFunction(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfoMachO::GetGVStubList(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::GlobalVariable::getInitializer(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), llvm::AsmPrinter::GetJTISymbol(), llvm::PPCFunctionInfo::getLocalEPSymbol(), llvm::MCObjectFileInfo::getNonLazySymbolPointerSection(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::MCInst::getOperand(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), llvm::Module::getPICLevel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::DataLayout::getPointerSizeInBits(), llvm::DataLayout::getPreferredAlignment(), llvm::MCOperand::getReg(), llvm::MachineOperand::getReg(), getRegisterName(), llvm::TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(), llvm::AsmPrinter::getSymbol(), llvm::SectionKind::getText(), llvm::MCObjectFileInfo::getTextCoalSection(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), llvm::MachineOperand::getType(), llvm::GlobalValue::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::PPCSubtarget::hasAltivec(), llvm::GlobalObject::hasComdat(), llvm::PPCSubtarget::hasMFOCRF(), llvm::GlobalObject::hasSection(), llvm::PPC::InvertPredicate(), llvm::MachineOperand::isBlockAddress(), llvm::SectionKind::isBSSLocal(), llvm::SectionKind::isCommon(), llvm::MachineOperand::isCPI(), llvm::SectionKind::isData(), llvm::MachineOperand::isGlobal(), llvm::MachineInstr::isInlineAsm(), llvm::MachineOperand::isJTI(), llvm::PPCSubtarget::isPPC64(), llvm::MachineOperand::isReg(), llvm::GlobalValue::isThreadLocal(), llvm::CodeModel::Large, llvm::ARM_MB::LD, LLVM_DEBUG, llvm_unreachable, llvm::LowerPPCMachineInstrToMCInst(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::make_range(), llvm::BitmaskEnumDetail::Mask(), llvm::MCAF_SubsectionsViaSymbols, llvm::MCSA_IndirectSymbol, llvm::PPCISD::MFOCRF, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineInstr::operands(), llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::Reloc::PIC_, llvm::AArch64CC::PL, Reg, llvm::report_fatal_error(), llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_SYMBOL_STUBS, llvm::ARMBuildAttrs::Section, llvm::MCSymbolXCOFF::setContainingCsect(), llvm::MCInst::setOpcode(), llvm::MCSymbolXCOFF::setStorageClass(), llvm::AsmPrinter::SetupMachineFunction(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, Size, llvm::CodeModel::Small, llvm::PICLevel::SmallPIC, llvm::SystemZISD::TM, llvm::PPCFunctionInfo::usesPICBase(), 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_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::XCOFF::XMC_DS, llvm::XCOFF::XMC_TC0, and llvm::XCOFF::XTY_SD.

◆ LLVMInitializePowerPCAsmPrinter()

void LLVMInitializePowerPCAsmPrinter ( )