LLVM  6.0.0svn
Macros | Functions
PPCAsmPrinter.cpp File Reference
#include "InstPrinter/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 "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/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolELF.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 const charstripRegisterPrefix (const char *RegName)
 stripRegisterPrefix - This method strips the character prefix from a register name so that only the number is left. 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 73 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 1598 of file PPCAsmPrinter.cpp.

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

Referenced by LLVMInitializePowerPCAsmPrinter().

◆ LLVMInitializePowerPCAsmPrinter()

void LLVMInitializePowerPCAsmPrinter ( )

◆ stripRegisterPrefix()

static const char* stripRegisterPrefix ( const char RegName)
static

stripRegisterPrefix - This method strips the character prefix from a register name so that only the number is left.

Used by for linux asm.

Definition at line 163 of file PPCAsmPrinter.cpp.

References llvm::MCInstBuilder::addExpr(), llvm::MCInst::addOperand(), llvm::MCInstBuilder::addReg(), llvm::array_lengthof(), assert(), B, llvm::ARCISD::BL, llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCOperand::createExpr(), llvm::PPCMCExpr::createHa(), llvm::PPCMCExpr::createLo(), llvm::MCBinaryExpr::createSub(), DEBUG, llvm::PPC::DIR_64, llvm::PPC::DIR_7400, llvm::PPC::DIR_970, llvm::PPC::DIR_NONE, llvm::AsmPrinter::doFinalization(), llvm::Reloc::DynamicNoPIC, E, llvm::PPCTargetStreamer::emitAbiVersion(), llvm::AsmPrinter::EmitFunctionEntryLabel(), llvm::PPCTargetStreamer::emitLocalEntry(), llvm::PPCTargetStreamer::emitMachine(), llvm::AsmPrinter::EmitStartOfAsmFile(), llvm::PPCTargetStreamer::emitTCEntry(), llvm::MachineBasicBlock::end(), F(), first, llvm::GlobalValue::getAlignment(), llvm::MachineOperand::getBlockAddress(), llvm::PatchPointOpers::getCallTarget(), llvm::PPCSubtarget::getDarwinDirective(), llvm::MachineInstr::getDesc(), llvm::Module::getFunction(), llvm::MachineOperand::getGlobal(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfoMachO::GetGVStubList(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), llvm::PPCFunctionInfo::getLocalEPSymbol(), llvm::MachineOperand::getMBB(), llvm::PatchPointOpers::getNextScratchIdx(), llvm::MCObjectFileInfo::getNonLazySymbolPointerSection(), llvm::MachineInstr::getNumOperands(), llvm::PatchPointOpers::getNumPatchBytes(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::MCInst::getOperand(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::GlobalValue::getParent(), llvm::Module::getPICLevel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::DataLayout::getPointerSizeInBits(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MachineOperand::getReg(), getReg(), llvm::PPCInstPrinter::getRegisterName(), getRegisterName(), llvm::object::getSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::SectionKind::getText(), llvm::MCObjectFileInfo::getTextCoalSection(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), llvm::MachineOperand::getType(), llvm::PPCSubtarget::hasAltivec(), llvm::GlobalValue::hasInternalLinkage(), llvm::PPCSubtarget::hasMFOCRF(), I, llvm::PPC::InvertPredicate(), llvm::MachineOperand::isBlockAddress(), llvm::MachineOperand::isCPI(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isJTI(), llvm::PPCSubtarget::isPPC64(), llvm::MachineOperand::isReg(), llvm::PPCInstrInfo::isVFRegister(), llvm::PPCInstrInfo::isVRRegister(), Kind, llvm::CodeModel::Large, llvm::ARM_MB::LD, llvm_unreachable, llvm::LowerPPCMachineInstrToMCInst(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::make_range(), llvm::BitmaskEnumDetail::Mask(), llvm::MCAF_SubsectionsViaSymbols, llvm::MCSA_IndirectSymbol, llvm::PPCISD::MFOCRF, MI, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_MachineBasicBlock, llvm::PPCII::MO_NLP_FLAG, llvm::MachineOperand::MO_Register, llvm::RISCVFenceField::O, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::Reloc::PIC_, llvm::AArch64CC::PL, llvm::MCSymbol::print(), llvm::AsmPrinter::PrintAsmOperand(), printOperand(), llvm::StackMaps::recordPatchPoint(), llvm::StackMaps::recordStackMap(), llvm::MachO::S_ATTR_PURE_INSTRUCTIONS, llvm::MachO::S_SYMBOL_STUBS, llvm::ARMBuildAttrs::Section, llvm::MCInst::setOpcode(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, llvm::PICLevel::SmallPIC, llvm::SystemZISD::TM, llvm::MCInstrDesc::TSFlags, llvm::PPCFunctionInfo::usesPICBase(), llvm::PPCII::UseVSXReg, llvm::MCSymbolRefExpr::VK_GOT, llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PLT, 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_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, and llvm::MCSymbolRefExpr::VK_PPC_TOCBASE.