LLVM 17.0.0git
Classes | Namespaces | Macros | Functions | Variables
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/SmallPtrSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.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/MCDirectives.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCSectionELF.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/MC/TargetRegistry.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
#include <new>

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< std::pair< const MCSymbol *, MCSymbolRefExpr::VariantKind > >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "asmprinter"
 
#define GENBOOLCOMMENT(Prefix, V, Field)
 
#define GENVALUECOMMENT(PrefixAndName, V, Field)
 

Functions

static MCSymbolcreateMCSymbolForTlsGetAddr (MCContext &Ctx)
 This helper function creates the TlsGetAddr MCSymbol for AIX.
 
static MCSymbolgetMCSymbolForTOCPseudoMO (const MachineOperand &MO, AsmPrinter &AP)
 Map a machine operand for a TOC pseudo-machine instruction to its corresponding MCSymbol.
 
static bool isSpecialLLVMGlobalArrayToSkip (const GlobalVariable *GV)
 
static bool isSpecialLLVMGlobalArrayForStaticInit (const GlobalVariable *GV)
 
static unsigned mapToSinitPriority (int P)
 
static std::string convertToSinitPriority (int Priority)
 
static AsmPrintercreatePPCAsmPrinterPass (TargetMachine &tm, std::unique_ptr< MCStreamer > &&Streamer)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter ()
 

Variables

static cl::opt< boolEnableSSPCanaryBitInTB ("aix-ssp-tb-bit", cl::init(false), cl::desc("Enable Passing SSP Canary info in Trackback on AIX"), cl::Hidden)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asmprinter"

Definition at line 81 of file PPCAsmPrinter.cpp.

◆ GENBOOLCOMMENT

#define GENBOOLCOMMENT (   Prefix,
  V,
  Field 
)
Value:
CommentOS << (Prefix) << ((V) & (TracebackTable::Field##Mask) ? "+" : "-") \
<< #Field

◆ GENVALUECOMMENT

#define GENVALUECOMMENT (   PrefixAndName,
  V,
  Field 
)
Value:
CommentOS << (PrefixAndName) << " = " \
<< static_cast<unsigned>(((V) & (TracebackTable::Field##Mask)) >> \
(TracebackTable::Field##Shift))

Function Documentation

◆ convertToSinitPriority()

static std::string convertToSinitPriority ( int  Priority)
static

◆ createMCSymbolForTlsGetAddr()

static MCSymbol * createMCSymbolForTlsGetAddr ( MCContext Ctx)
static

This helper function creates the TlsGetAddr MCSymbol for AIX.

We will create the csect and use the qual-name symbol instead of creating just the external symbol.

Definition at line 561 of file PPCAsmPrinter.cpp.

References llvm::MCSectionXCOFF::getQualNameSymbol(), llvm::SectionKind::getText(), llvm::MCContext::getXCOFFSection(), llvm::XCOFF::XMC_PR, and llvm::XCOFF::XTY_ER.

◆ createPPCAsmPrinterPass()

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

◆ getMCSymbolForTOCPseudoMO()

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

◆ isSpecialLLVMGlobalArrayForStaticInit()

static bool isSpecialLLVMGlobalArrayForStaticInit ( const GlobalVariable GV)
static

◆ isSpecialLLVMGlobalArrayToSkip()

static bool isSpecialLLVMGlobalArrayToSkip ( const GlobalVariable GV)
static

◆ LLVMInitializePowerPCAsmPrinter()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter ( )

◆ mapToSinitPriority()

static unsigned mapToSinitPriority ( int  P)
static

Definition at line 2728 of file PPCAsmPrinter.cpp.

References P, and llvm::report_fatal_error().

Referenced by convertToSinitPriority().

Variable Documentation

◆ EnableSSPCanaryBitInTB

cl::opt< bool > EnableSSPCanaryBitInTB("aix-ssp-tb-bit", cl::init(false), cl::desc("Enable Passing SSP Canary info in Trackback on AIX"), cl::Hidden) ( "aix-ssp-tb-bit"  ,
cl::init(false)  ,
cl::desc("Enable Passing SSP Canary info in Trackback on AIX")  ,
cl::Hidden   
)
static