72 #define DEBUG_TYPE "asmprinter"
84 std::unique_ptr<MCStreamer> Streamer)
85 :
AsmPrinter(TM, std::move(Streamer)), SM(*
this) {}
87 StringRef getPassName()
const override {
return "PowerPC Assembly Printer"; }
91 bool doInitialization(
Module &M)
override {
101 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
102 unsigned AsmVariant,
const char *ExtraCode,
104 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
105 unsigned AsmVariant,
const char *ExtraCode,
108 void EmitEndOfAsmFile(
Module &M)
override;
120 class PPCLinuxAsmPrinter :
public PPCAsmPrinter {
123 std::unique_ptr<MCStreamer> Streamer)
124 : PPCAsmPrinter(TM, std::move(Streamer)) {}
127 return "Linux PPC Assembly Printer";
130 bool doFinalization(
Module &M)
override;
131 void EmitStartOfAsmFile(
Module &M)
override;
133 void EmitFunctionEntryLabel()
override;
135 void EmitFunctionBodyStart()
override;
136 void EmitFunctionBodyEnd()
override;
141 class PPCDarwinAsmPrinter :
public PPCAsmPrinter {
144 std::unique_ptr<MCStreamer> Streamer)
145 : PPCAsmPrinter(TM, std::move(Streamer)) {}
148 return "Darwin PPC Assembly Printer";
151 bool doFinalization(
Module &M)
override;
152 void EmitStartOfAsmFile(
Module &M)
override;
160 switch (RegName[0]) {
165 if (RegName[1] ==
's')
168 case 'c':
if (RegName[1] ==
'r')
return RegName + 2;
192 Reg = PPC::VSX32 + (Reg - PPC::V0);
194 Reg = PPC::VSX32 + (Reg - PPC::VF0);
200 if (!Subtarget->isDarwin())
225 if (Subtarget->hasLazyResolverStub(GV)) {
226 SymToPrint = getSymbolWithGlobalValueBase(GV,
"$non_lazy_ptr");
237 SymToPrint->
print(O, MAI);
251 bool PPCAsmPrinter::PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
255 if (ExtraCode && ExtraCode[0]) {
256 if (ExtraCode[1] != 0)
return true;
258 switch (ExtraCode[0]) {
289 bool PPCAsmPrinter::PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
291 const char *ExtraCode,
293 if (ExtraCode && ExtraCode[0]) {
294 if (ExtraCode[1] != 0)
return true;
296 switch (ExtraCode[0]) {
297 default:
return true;
300 const char *RegName =
"r0";
301 if (!Subtarget->isDarwin())
303 O << RegName <<
", ";
335 TOCEntry = createTempSymbol(
"C");
339 void PPCAsmPrinter::EmitEndOfAsmFile(
Module &M) {
340 SM.serializeToStackMapSection();
347 assert(NumNOPBytes % 4 == 0 &&
"Invalid number of NOP bytes requested!");
353 while (NumNOPBytes > 0) {
354 if (MII == MBB.
end() || MII->isCall() ||
355 MII->getOpcode() == PPC::DBG_VALUE ||
356 MII->getOpcode() == TargetOpcode::PATCHPOINT ||
357 MII->getOpcode() == TargetOpcode::STACKMAP)
364 for (
unsigned i = 0;
i < NumNOPBytes;
i += 4)
374 unsigned EncodedBytes = 0;
377 if (CalleeMO.
isImm()) {
378 int64_t CallTarget = CalleeMO.
getImm();
380 assert((CallTarget & 0xFFFFFFFFFFFF) == CallTarget &&
381 "High 16 bits of call target should be zero.");
387 .addImm((CallTarget >> 32) & 0xFFFF));
392 .addImm(32).addImm(16));
397 .addImm((CallTarget >> 16) & 0xFFFF));
402 .addImm(CallTarget & 0xFFFF));
405 int TOCSaveOffset = Subtarget->isELFv2ABI() ? 24 : 40;
408 .addImm(TOCSaveOffset)
414 if (!Subtarget->isELFv2ABI()) {
421 .addReg(ScratchReg));
426 .addReg(ScratchReg));
431 .addReg(ScratchReg));
439 .addImm(TOCSaveOffset)
457 unsigned NumBytes = Opers.getNumPatchBytes();
458 assert(NumBytes >= EncodedBytes &&
459 "Patchpoint can't request size less than the length of a call.");
460 assert((NumBytes - EncodedBytes) % 4 == 0 &&
461 "Invalid number of NOP bytes requested!");
462 for (
unsigned i = EncodedBytes;
i < NumBytes;
i += 4)
471 MCSymbol *TlsGetAddr = OutContext.getOrCreateSymbol(Name);
477 "GETtls[ld]ADDR[32] must define GPR3");
481 "GETtls[ld]ADDR[32] must read GPR3");
483 if (!Subtarget->isPPC64() && !Subtarget->isDarwin() &&
484 isPositionIndependent())
492 EmitToStreamer(*OutStreamer,
494 PPC::BL8_NOP_TLS : PPC::BL_TLS)
502 void PPCAsmPrinter::EmitInstruction(
const MachineInstr *MI) {
504 bool isPPC64 = Subtarget->isPPC64();
505 bool isDarwin =
TM.getTargetTriple().isOSDarwin();
512 case TargetOpcode::DBG_VALUE:
514 case TargetOpcode::STACKMAP:
515 return LowerSTACKMAP(SM, *MI);
516 case TargetOpcode::PATCHPOINT:
517 return LowerPATCHPOINT(SM, *MI);
519 case PPC::MoveGOTtoLR: {
527 OutContext.getOrCreateSymbol(
StringRef(
"_GLOBAL_OFFSET_TABLE_"));
536 EmitToStreamer(*OutStreamer,
MCInstBuilder(PPC::BL).addExpr(OffsExpr));
539 case PPC::MovePCtoLR:
540 case PPC::MovePCtoLR8: {
545 MCSymbol *PICBase = MF->getPICBaseSymbol();
548 EmitToStreamer(*OutStreamer,
555 OutStreamer->EmitLabel(PICBase);
558 case PPC::UpdateGBR: {
581 EmitToStreamer(*OutStreamer, TmpInst);
587 EmitToStreamer(*OutStreamer, TmpInst);
605 MOSymbol = GetCPISymbol(MO.
getIndex());
607 MOSymbol = GetJTISymbol(MO.
getIndex());
617 MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol);
628 EmitToStreamer(*OutStreamer, TmpInst);
649 MOSymbol = GetCPISymbol(MO.
getIndex());
651 MOSymbol = GetJTISymbol(MO.
getIndex());
655 MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol);
661 EmitToStreamer(*OutStreamer, TmpInst);
665 case PPC::ADDIStocHA: {
677 "Invalid operand for ADDIStocHA!");
679 bool GlobalToc =
false;
684 unsigned char GVFlags = Subtarget->classifyGlobalReference(GV);
686 }
else if (MO.
isCPI()) {
687 MOSymbol = GetCPISymbol(MO.
getIndex());
688 }
else if (MO.
isJTI()) {
689 MOSymbol = GetJTISymbol(MO.
getIndex());
696 MOSymbol = lookUpOrCreateTOCEntry(MOSymbol);
709 EmitToStreamer(*OutStreamer, TmpInst);
723 "Invalid operand for LDtocL!");
727 MOSymbol = lookUpOrCreateTOCEntry(GetJTISymbol(MO.
getIndex()));
730 MOSymbol = lookUpOrCreateTOCEntry(MOSymbol);
732 else if (MO.
isCPI()) {
733 MOSymbol = GetCPISymbol(MO.
getIndex());
735 MOSymbol = lookUpOrCreateTOCEntry(MOSymbol);
741 unsigned char GVFlags = Subtarget->classifyGlobalReference(GV);
743 "LDtocL used on symbol that could be accessed directly is "
744 "invalid. Must match ADDIStocHA."));
745 MOSymbol = lookUpOrCreateTOCEntry(MOSymbol);
752 EmitToStreamer(*OutStreamer, TmpInst);
755 case PPC::ADDItocL: {
770 unsigned char GVFlags = Subtarget->classifyGlobalReference(GV);
773 "Interposable definitions must use indirect access."));
775 }
else if (MO.
isCPI()) {
776 MOSymbol = GetCPISymbol(MO.
getIndex());
783 EmitToStreamer(*OutStreamer, TmpInst);
786 case PPC::ADDISgotTprelHA: {
789 assert(Subtarget->isPPC64() &&
"Not supported for 32-bit PowerPC");
793 const MCExpr *SymGotTprel =
799 .addExpr(SymGotTprel));
802 case PPC::LDgotTprelL:
803 case PPC::LDgotTprelL32: {
816 EmitToStreamer(*OutStreamer, TmpInst);
820 case PPC::PPC32PICGOT: {
821 MCSymbol *GOTSymbol = OutContext.getOrCreateSymbol(
StringRef(
"_GLOBAL_OFFSET_TABLE_"));
822 MCSymbol *GOTRef = OutContext.createTempSymbol();
823 MCSymbol *NextInstr = OutContext.createTempSymbol();
833 OutStreamer->EmitLabel(GOTRef);
834 OutStreamer->EmitValue(OffsExpr, 4);
835 OutStreamer->EmitLabel(NextInstr);
848 case PPC::PPC32GOT: {
850 OutContext.getOrCreateSymbol(
StringRef(
"_GLOBAL_OFFSET_TABLE_"));
857 .addExpr(SymGotTlsL));
861 .addExpr(SymGotTlsHA));
864 case PPC::ADDIStlsgdHA: {
867 assert(Subtarget->isPPC64() &&
"Not supported for 32-bit PowerPC");
871 const MCExpr *SymGotTlsGD =
877 .addExpr(SymGotTlsGD));
880 case PPC::ADDItlsgdL:
883 case PPC::ADDItlsgdL32: {
893 EmitToStreamer(*OutStreamer,
897 .addExpr(SymGotTlsGD));
900 case PPC::GETtlsADDR:
903 case PPC::GETtlsADDR32: {
909 case PPC::ADDIStlsldHA: {
912 assert(Subtarget->isPPC64() &&
"Not supported for 32-bit PowerPC");
916 const MCExpr *SymGotTlsLD =
922 .addExpr(SymGotTlsLD));
925 case PPC::ADDItlsldL:
928 case PPC::ADDItlsldL32: {
938 EmitToStreamer(*OutStreamer,
942 .addExpr(SymGotTlsLD));
945 case PPC::GETtlsldADDR:
948 case PPC::GETtlsldADDR32: {
954 case PPC::ADDISdtprelHA:
957 case PPC::ADDISdtprelHA32: {
968 MCInstBuilder(Subtarget->isPPC64() ? PPC::ADDIS8 : PPC::ADDIS)
971 .addExpr(SymDtprel));
974 case PPC::ADDIdtprelL:
977 case PPC::ADDIdtprelL32: {
986 EmitToStreamer(*OutStreamer,
990 .addExpr(SymDtprel));
995 if (!Subtarget->hasMFOCRF()) {
1009 if (!Subtarget->hasMFOCRF()) {
1012 unsigned NewOpcode =
1013 MI->
getOpcode() == PPC::MTOCRF ? PPC::MTCRF : PPC::MTCRF8;
1014 unsigned Mask = 0x80 >> OutContext.getRegisterInfo()
1034 if (!Subtarget->isDarwin()) {
1035 unsigned OpNum = (MI->
getOpcode() == PPC::STD) ? 2 : 1;
1046 EmitToStreamer(*OutStreamer, TmpInst);
1049 void PPCLinuxAsmPrinter::EmitStartOfAsmFile(
Module &M) {
1050 if (static_cast<const PPCTargetMachine &>(
TM).isELFv2ABI()) {
1058 if (static_cast<const PPCTargetMachine &>(
TM).isPPC64() ||
1059 !isPositionIndependent())
1065 OutStreamer->SwitchSection(OutContext.getELFSection(
1068 MCSymbol *TOCSym = OutContext.getOrCreateSymbol(
Twine(
".LTOC"));
1069 MCSymbol *CurrentPos = OutContext.createTempSymbol();
1071 OutStreamer->EmitLabel(CurrentPos);
1080 OutStreamer->EmitAssignment(TOCSym, tocExpr);
1082 OutStreamer->SwitchSection(getObjFileLowering().getTextSection());
1085 void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
1087 if (!Subtarget->isPPC64() &&
1088 (!isPositionIndependent() ||
1092 if (!Subtarget->isPPC64()) {
1096 MCSymbol *PICBase = MF->getPICBaseSymbol();
1097 OutStreamer->EmitLabel(RelocSymbol);
1105 OutStreamer->EmitValue(OffsExpr, 4);
1106 OutStreamer->EmitLabel(CurrentFnSym);
1113 if (Subtarget->isELFv2ABI()) {
1119 && !MF->getRegInfo().use_empty(PPC::X2)) {
1124 const MCExpr *TOCDeltaExpr =
1131 OutStreamer->EmitValue(TOCDeltaExpr, 8);
1140 OutStreamer->SwitchSection(Section);
1141 OutStreamer->EmitLabel(CurrentFnSym);
1142 OutStreamer->EmitValueToAlignment(8);
1143 MCSymbol *Symbol1 = CurrentFnSymForSize;
1150 OutStreamer->EmitValue(
1154 OutStreamer->EmitIntValue(0, 8 );
1155 OutStreamer->SwitchSection(Current.first, Current.second);
1158 bool PPCLinuxAsmPrinter::doFinalization(
Module &M) {
1170 Section = OutStreamer->getContext().getELFSection(
1173 Section = OutStreamer->getContext().getELFSection(
1175 OutStreamer->SwitchSection(Section);
1178 E = TOC.end();
I !=
E; ++
I) {
1179 OutStreamer->EmitLabel(
I->second);
1184 OutStreamer->EmitValueToAlignment(4);
1185 OutStreamer->EmitSymbolValue(S, 4);
1194 void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
1226 if (Subtarget->isELFv2ABI()
1228 && !MF->getRegInfo().use_empty(PPC::X2)) {
1235 OutStreamer->EmitLabel(GlobalEntryLabel);
1241 const MCExpr *TOCDeltaExpr =
1243 GlobalEntryLabelExp, OutContext);
1245 const MCExpr *TOCDeltaHi =
1250 .addExpr(TOCDeltaHi));
1252 const MCExpr *TOCDeltaLo =
1257 .addExpr(TOCDeltaLo));
1260 const MCExpr *TOCOffsetDeltaExpr =
1262 GlobalEntryLabelExp, OutContext);
1266 .addExpr(TOCOffsetDeltaExpr)
1275 OutStreamer->EmitLabel(LocalEntryLabel);
1278 const MCExpr *LocalOffsetExp =
1280 GlobalEntryLabelExp, OutContext);
1286 TS->
emitLocalEntry(cast<MCSymbolELF>(CurrentFnSym), LocalOffsetExp);
1293 void PPCLinuxAsmPrinter::EmitFunctionBodyEnd() {
1301 if (Subtarget->isPPC64()) {
1302 OutStreamer->EmitIntValue(0, 4);
1303 OutStreamer->EmitIntValue(0, 8);
1307 void PPCDarwinAsmPrinter::EmitStartOfAsmFile(
Module &M) {
1308 static const char *
const CPUDirectives[] = {
1352 "CPUDirectives[] might not be up-to-date!");
1363 OutStreamer->SwitchSection(
1364 OutContext.getMachOSection(
"__TEXT",
"__picsymbolstub1",
1369 OutStreamer->SwitchSection(
1370 OutContext.getMachOSection(
"__TEXT",
"__symbol_stub1",
1375 OutStreamer->SwitchSection(getObjFileLowering().getTextSection());
1378 bool PPCDarwinAsmPrinter::doFinalization(
Module &M) {
1379 bool isPPC64 = getDataLayout().getPointerSizeInBits() == 64;
1388 if (MAI->doesSupportExceptionHandling()) {
1391 for (
const Function *Personality : MMI->getPersonalities()) {
1394 getSymbolWithGlobalValueBase(Personality,
"$non_lazy_ptr");
1407 if (!Stubs.empty()) {
1410 EmitAlignment(isPPC64 ? 3 : 2);
1412 for (
unsigned i = 0, e = Stubs.size();
i != e; ++
i) {
1414 OutStreamer->EmitLabel(Stubs[
i].first);
1417 OutStreamer->EmitSymbolAttribute(MCSym.
getPointer(),
1422 OutStreamer->EmitIntValue(0, isPPC64 ? 8 : 4 );
1431 OutStreamer->EmitValue(
1437 OutStreamer->AddBlankLine();
1457 std::unique_ptr<MCStreamer> &&Streamer) {
1459 return new PPCDarwinAsmPrinter(tm, std::move(Streamer));
1460 return new PPCLinuxAsmPrinter(tm, std::move(Streamer));
MCSection * getNonLazySymbolPointerSection() const
VectorType::iterator iterator
PointerIntPair< MCSymbol *, 1, bool > StubValueTy
virtual void EmitStartOfAsmFile(Module &)
This virtual method can be overridden by targets that want to emit something at the start of their fi...
A parsed version of the target data layout string in and methods for querying it. ...
SymbolListTy GetGVStubList()
Accessor methods to return the set of stubs in sorted order.
StringRef getPrivateGlobalPrefix() const
S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.
const GlobalValue * getGlobal() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
MachineBasicBlock * getMBB() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module. ...
bool doFinalization(Module &M) override
Shut down the asmprinter.
static MCOperand createExpr(const MCExpr *Val)
Target & getThePPC32Target()
bool isBlockAddress() const
isBlockAddress - Tests if this is a MO_BlockAddress operand.
const MCInstrDesc & getDesc() const
Returns the target instruction descriptor of this MachineInstr.
This class implements a map that also provides access to all stored values in a deterministic order...
MachineBasicBlock reference.
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
MCSymbol * getGlobalEPSymbol() const
const Triple & getTargetTriple() const
static bool isVRRegister(unsigned Reg)
bool isMacOSX() const
isMacOSX - Is this a Mac OS X triple.
bool isJTI() const
isJTI - Tests if this is a MO_JumpTableIndex operand.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
PPCFunctionInfo - This class is derived from MachineFunction private PowerPC target-specific informat...
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
bool hasInternalLinkage() const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
Base class for the full range of assembler expressions which are needed for parsing.
Reg
All possible values of the reg field in the ModR/M byte.
MCSymbol * getTOCOffsetSymbol() const
Represent a reference to a symbol from inside an expression.
unsigned getNumOperands() const
Access to explicit operands of the instruction.
bool isCPI() const
isCPI - Tests if this is a MO_ConstantPoolIndex operand.
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
static std::string getRegisterName(const TargetRegisterInfo *TRI, unsigned Reg)
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
PointerTy getPointer() const
R32 = MFOCRF(CRREG, INFLAG) - Represents the MFOCRF instruction.
virtual void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset)=0
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
Target & getThePPC64Target()
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
MCInstBuilder & addExpr(const MCExpr *Val)
Add a new MCExpr operand.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
const MachineBasicBlock * getParent() const
Function * getFunction(StringRef Name) const
Look up the specified function in the module symbol table.
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
Address of a global value.
MCInstBuilder & addReg(unsigned Reg)
Add a new register operand.
PointerIntPair - This class implements a pair of a pointer and small integer.
The VSX instruction that uses VSX register (vs0-vs63), instead of VMX register (v0-v31).
MO_NLP_FLAG - If this bit is set, the symbol reference is actually to the non_lazy_ptr for the global...
void LLVMInitializePowerPCAsmPrinter()
const MachineOperand & getOperand(unsigned i) const
virtual void emitAbiVersion(int AbiVersion)=0
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, raw_ostream &OS)
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant...
This class is intended to be used as a driving class for all asm writers.
static const char * getRegisterName(unsigned RegNo)
Address of a basic block.
.subsections_via_symbols (MachO)
int64_t getOffset() const
Return the offset from the symbol in this operand.
MI-level patchpoint operands.
static const PPCMCExpr * createLo(const MCExpr *Expr, bool isDarwin, MCContext &Ctx)
MCSection * getTextCoalSection() const
MCSymbol * getLocalEPSymbol() const
MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
StubValueTy & getGVStubEntry(MCSymbol *Sym)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void recordPatchPoint(const MachineInstr &MI)
Generate a stackmap record for a patchpoint instruction.
static AsmPrinter * createPPCAsmPrinterPass(TargetMachine &tm, std::unique_ptr< MCStreamer > &&Streamer)
createPPCAsmPrinterPass - Returns a pass that prints the PPC assembly code for a MachineFunction to t...
void setOpcode(unsigned Op)
PICLevel::Level getPICLevel() const
Returns the PIC level (small or large model)
MachineOperand class - Representation of each machine instruction operand.
Module.h This file contains the declarations for the Module class.
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
static bool isVFRegister(unsigned Reg)
Target & getThePPC64LETarget()
void recordStackMap(const MachineInstr &MI)
Generate a stackmap record for a stackmap instruction.
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
Representation of each machine instruction.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
static bool printOperand(raw_ostream &OS, const SelectionDAG *G, const SDValue Value)
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
This represents a section on linux, lots of unix variants and some bare metal systems.
virtual void EmitFunctionEntryLabel()
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
MachineModuleInfoMachO - This is a MachineModuleInfoImpl implementation for MachO targets...
bool isPPC64() const
isPPC64 - Return true if we are generating code for 64-bit pointer mode.
unsigned getReg() const
getReg - Returns the register number.
unsigned getAlignment() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
virtual void emitTCEntry(const MCSymbol &S)=0
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static const PPCMCExpr * createHa(const MCExpr *Expr, bool isDarwin, MCContext &Ctx)
unsigned getDarwinDirective() const
getDarwinDirective - Returns the -m directive specified for the cpu.
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.
void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, AsmPrinter &AP, bool isDarwin)
static void RegisterAsmPrinter(Target &T, Target::AsmPrinterCtorTy Fn)
RegisterAsmPrinter - Register an AsmPrinter implementation for the given target.
StringRef - Represent a constant reference to a string, i.e.
const BlockAddress * getBlockAddress() const
Address of indexed Constant in Constant Pool.
virtual void emitMachine(StringRef CPU)=0
Instances of this class represent operands of the MCInst class.
MCSymbol * getPICOffsetSymbol() const
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
const MCOperand & getOperand(unsigned i) const
static const char * stripRegisterPrefix(const char *RegName)
stripRegisterPrefix - This method strips the character prefix from a register name so that only the n...
static SectionKind getText()