1 //===-- AsmPrinter.cpp - Common AsmPrinter code ---------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the AsmPrinter class.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/CodeGen/AsmPrinter.h"
15 #include "llvm/Assembly/Writer.h"
16 #include "llvm/DerivedTypes.h"
17 #include "llvm/Constants.h"
18 #include "llvm/Module.h"
19 #include "llvm/CodeGen/MachineConstantPool.h"
20 #include "llvm/CodeGen/MachineJumpTableInfo.h"
21 #include "llvm/Support/Mangler.h"
22 #include "llvm/Support/MathExtras.h"
23 #include "llvm/Target/TargetMachine.h"
28 AsmPrinter::AsmPrinter(std::ostream &o, TargetMachine &tm)
29 : FunctionNumber(0), O(o), TM(tm),
32 PrivateGlobalPrefix("."),
33 GlobalVarAddrPrefix(""),
34 GlobalVarAddrSuffix(""),
35 FunctionAddrPrefix(""),
36 FunctionAddrSuffix(""),
37 InlineAsmStart("#APP\n\t"),
38 InlineAsmEnd("\t#NO_APP\n"),
39 ZeroDirective("\t.zero\t"),
40 ZeroDirectiveSuffix(0),
41 AsciiDirective("\t.ascii\t"),
42 AscizDirective("\t.asciz\t"),
43 Data8bitsDirective("\t.byte\t"),
44 Data16bitsDirective("\t.short\t"),
45 Data32bitsDirective("\t.long\t"),
46 Data64bitsDirective("\t.quad\t"),
47 AlignDirective("\t.align\t"),
48 AlignmentIsInBytes(true),
49 SwitchToSectionDirective("\t.section\t"),
51 ConstantPoolSection("\t.section .rodata\n"),
52 JumpTableSection("\t.section .rodata\n"),
53 StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
54 StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"),
56 COMMDirective("\t.comm\t"),
57 COMMDirectiveTakesAlignment(true),
58 HasDotTypeDotSizeDirective(true) {
62 /// SwitchSection - Switch to the specified section of the executable if we
63 /// are not already in it!
65 void AsmPrinter::SwitchSection(const char *NewSection, const GlobalValue *GV) {
68 // Microsoft ML/MASM has a fundamentally different approach to handling
72 if (*NewSection == 0) {
73 // Simply end the current section, if any.
74 if (CurrentSection != "") {
75 O << CurrentSection << "\tends\n";
81 bool isData = strcmp(NewSection , ".data") == 0;
83 if (GV && GV->hasSection())
84 NS = GV->getSection();
90 if (CurrentSection != NS) {
91 if (CurrentSection != "")
92 O << CurrentSection << "\tends\n";
94 O << CurrentSection << (isData ? "\tsegment 'DATA'\n"
95 : "\tsegment 'CODE'\n");
98 if (GV && GV->hasSection())
99 NS = SwitchToSectionDirective + GV->getSection();
101 NS = std::string("\t")+NewSection;
103 if (CurrentSection != NS) {
105 if (!CurrentSection.empty())
106 O << CurrentSection << '\n';
111 bool AsmPrinter::doInitialization(Module &M) {
112 Mang = new Mangler(M, GlobalPrefix);
114 if (!M.getModuleInlineAsm().empty())
115 O << CommentString << " Start of file scope inline assembly\n"
116 << M.getModuleInlineAsm()
117 << "\n" << CommentString << " End of file scope inline assembly\n";
119 SwitchSection("", 0); // Reset back to no section.
121 if (MachineDebugInfo *DebugInfo = getAnalysisToUpdate<MachineDebugInfo>()) {
122 DebugInfo->AnalyzeModule(M);
128 bool AsmPrinter::doFinalization(Module &M) {
129 delete Mang; Mang = 0;
133 void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
134 // What's my mangled name?
135 CurrentFnName = Mang->getValueName(MF.getFunction());
136 IncrementFunctionNumber();
139 /// EmitConstantPool - Print to the current output stream assembly
140 /// representations of the constants in the constant pool MCP. This is
141 /// used to print out constants which have been "spilled to memory" by
142 /// the code generator.
144 void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
145 const std::vector<MachineConstantPoolEntry> &CP = MCP->getConstants();
146 if (CP.empty()) return;
147 const TargetData *TD = TM.getTargetData();
149 SwitchSection(ConstantPoolSection, 0);
150 EmitAlignment(MCP->getConstantPoolAlignment());
151 for (unsigned i = 0, e = CP.size(); i != e; ++i) {
152 O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << '_' << i
153 << ":\t\t\t\t\t" << CommentString << " ";
154 WriteTypeSymbolic(O, CP[i].Val->getType(), 0) << '\n';
155 EmitGlobalConstant(CP[i].Val);
157 unsigned EntSize = TM.getTargetData()->getTypeSize(CP[i].Val->getType());
158 unsigned ValEnd = CP[i].Offset + EntSize;
159 // Emit inter-object padding for alignment.
160 EmitZeros(CP[i+1].Offset-ValEnd);
165 /// EmitJumpTableInfo - Print assembly representations of the jump tables used
166 /// by the current function to the current output stream.
168 void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI) {
169 const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables();
170 if (JT.empty()) return;
171 const TargetData *TD = TM.getTargetData();
173 // FIXME: someday we need to handle PIC jump tables
174 assert((TM.getRelocationModel() == Reloc::Static ||
175 TM.getRelocationModel() == Reloc::DynamicNoPIC) &&
176 "Unhandled relocation model emitting jump table information!");
178 SwitchSection(JumpTableSection, 0);
179 EmitAlignment(Log2_32(TD->getPointerAlignment()));
180 for (unsigned i = 0, e = JT.size(); i != e; ++i) {
181 O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << '_' << i
183 const std::vector<MachineBasicBlock*> &JTBBs = JT[i].MBBs;
184 for (unsigned ii = 0, ee = JTBBs.size(); ii != ee; ++ii) {
185 O << Data32bitsDirective << ' ';
186 printBasicBlockLabel(JTBBs[ii]);
192 /// EmitSpecialLLVMGlobal - Check to see if the specified global is a
193 /// special global used by LLVM. If so, emit it and return true, otherwise
194 /// do nothing and return false.
195 bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
196 // Ignore debug and non-emitted data.
197 if (GV->getSection() == "llvm.metadata") return true;
199 if (!GV->hasAppendingLinkage()) return false;
201 assert(GV->hasInitializer() && "Not a special LLVM global!");
203 if (GV->getName() == "llvm.used")
204 return true; // No need to emit this at all.
206 if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) {
207 SwitchSection(StaticCtorsSection, 0);
209 EmitXXStructorList(GV->getInitializer());
213 if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) {
214 SwitchSection(StaticDtorsSection, 0);
216 EmitXXStructorList(GV->getInitializer());
223 /// EmitXXStructorList - Emit the ctor or dtor list. This just prints out the
224 /// function pointers, ignoring the init priority.
225 void AsmPrinter::EmitXXStructorList(Constant *List) {
226 // Should be an array of '{ int, void ()* }' structs. The first value is the
227 // init priority, which we ignore.
228 if (!isa<ConstantArray>(List)) return;
229 ConstantArray *InitList = cast<ConstantArray>(List);
230 for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
231 if (ConstantStruct *CS = dyn_cast<ConstantStruct>(InitList->getOperand(i))){
232 if (CS->getNumOperands() != 2) return; // Not array of 2-element structs.
234 if (CS->getOperand(1)->isNullValue())
235 return; // Found a null terminator, exit printing.
236 // Emit the function pointer.
237 EmitGlobalConstant(CS->getOperand(1));
241 /// getPreferredAlignmentLog - Return the preferred alignment of the
242 /// specified global, returned in log form. This includes an explicitly
243 /// requested alignment (if the global has one).
244 unsigned AsmPrinter::getPreferredAlignmentLog(const GlobalVariable *GV) const {
245 unsigned Alignment = TM.getTargetData()->getTypeAlignmentShift(GV->getType());
246 if (GV->getAlignment() > (1U << Alignment))
247 Alignment = Log2_32(GV->getAlignment());
249 if (GV->hasInitializer()) {
250 // Always round up alignment of global doubles to 8 bytes.
251 if (GV->getType()->getElementType() == Type::DoubleTy && Alignment < 3)
254 // If the global is not external, see if it is large. If so, give it a
256 if (TM.getTargetData()->getTypeSize(GV->getType()->getElementType()) > 128)
257 Alignment = 4; // 16-byte alignment.
263 // EmitAlignment - Emit an alignment directive to the specified power of two.
264 void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const {
265 if (GV && GV->getAlignment())
266 NumBits = Log2_32(GV->getAlignment());
267 if (NumBits == 0) return; // No need to emit alignment.
268 if (AlignmentIsInBytes) NumBits = 1 << NumBits;
269 O << AlignDirective << NumBits << "\n";
272 /// EmitZeros - Emit a block of zeros.
274 void AsmPrinter::EmitZeros(uint64_t NumZeros) const {
277 O << ZeroDirective << NumZeros;
278 if (ZeroDirectiveSuffix)
279 O << ZeroDirectiveSuffix;
282 for (; NumZeros; --NumZeros)
283 O << Data8bitsDirective << "0\n";
288 // Print out the specified constant, without a storage class. Only the
289 // constants valid in constant expressions can occur here.
290 void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
291 if (CV->isNullValue() || isa<UndefValue>(CV))
293 else if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
294 assert(CB == ConstantBool::True);
296 } else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV))
297 if (((CI->getValue() << 32) >> 32) == CI->getValue())
300 O << (uint64_t)CI->getValue();
301 else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV))
303 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
304 // This is a constant address for a global variable or function. Use the
305 // name of the variable or function as the address value, possibly
306 // decorating it with GlobalVarAddrPrefix/Suffix or
307 // FunctionAddrPrefix/Suffix (these all default to "" )
308 if (isa<Function>(GV))
309 O << FunctionAddrPrefix << Mang->getValueName(GV) << FunctionAddrSuffix;
311 O << GlobalVarAddrPrefix << Mang->getValueName(GV) << GlobalVarAddrSuffix;
312 } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
313 const TargetData *TD = TM.getTargetData();
314 switch(CE->getOpcode()) {
315 case Instruction::GetElementPtr: {
316 // generate a symbolic expression for the byte address
317 const Constant *ptrVal = CE->getOperand(0);
318 std::vector<Value*> idxVec(CE->op_begin()+1, CE->op_end());
319 if (int64_t Offset = TD->getIndexedOffset(ptrVal->getType(), idxVec)) {
322 EmitConstantValueOnly(ptrVal);
324 O << ") + " << Offset;
326 O << ") - " << -Offset;
328 EmitConstantValueOnly(ptrVal);
332 case Instruction::Cast: {
333 // Support only non-converting or widening casts for now, that is, ones
334 // that do not involve a change in value. This assertion is really gross,
335 // and may not even be a complete check.
336 Constant *Op = CE->getOperand(0);
337 const Type *OpTy = Op->getType(), *Ty = CE->getType();
339 // Remember, kids, pointers can be losslessly converted back and forth
340 // into 32-bit or wider integers, regardless of signedness. :-P
341 assert(((isa<PointerType>(OpTy)
342 && (Ty == Type::LongTy || Ty == Type::ULongTy
343 || Ty == Type::IntTy || Ty == Type::UIntTy))
344 || (isa<PointerType>(Ty)
345 && (OpTy == Type::LongTy || OpTy == Type::ULongTy
346 || OpTy == Type::IntTy || OpTy == Type::UIntTy))
347 || (((TD->getTypeSize(Ty) >= TD->getTypeSize(OpTy))
348 && OpTy->isLosslesslyConvertibleTo(Ty))))
349 && "FIXME: Don't yet support this kind of constant cast expr");
350 EmitConstantValueOnly(Op);
353 case Instruction::Add:
355 EmitConstantValueOnly(CE->getOperand(0));
357 EmitConstantValueOnly(CE->getOperand(1));
361 assert(0 && "Unsupported operator!");
364 assert(0 && "Unknown constant value!");
368 /// toOctal - Convert the low order bits of X into an octal digit.
370 static inline char toOctal(int X) {
374 /// printAsCString - Print the specified array as a C compatible string, only if
375 /// the predicate isString is true.
377 static void printAsCString(std::ostream &O, const ConstantArray *CVA,
379 assert(CVA->isString() && "Array is not string compatible!");
382 for (unsigned i = 0; i != LastElt; ++i) {
384 (unsigned char)cast<ConstantInt>(CVA->getOperand(i))->getRawValue();
388 } else if (C == '\\') {
390 } else if (isprint(C)) {
394 case '\b': O << "\\b"; break;
395 case '\f': O << "\\f"; break;
396 case '\n': O << "\\n"; break;
397 case '\r': O << "\\r"; break;
398 case '\t': O << "\\t"; break;
401 O << toOctal(C >> 6);
402 O << toOctal(C >> 3);
403 O << toOctal(C >> 0);
411 /// EmitString - Emit a zero-byte-terminated string constant.
413 void AsmPrinter::EmitString(const ConstantArray *CVA) const {
414 unsigned NumElts = CVA->getNumOperands();
415 if (AscizDirective && NumElts &&
416 cast<ConstantInt>(CVA->getOperand(NumElts-1))->getRawValue() == 0) {
418 printAsCString(O, CVA, NumElts-1);
421 printAsCString(O, CVA, NumElts);
426 /// EmitGlobalConstant - Print a general LLVM constant to the .s file.
428 void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
429 const TargetData *TD = TM.getTargetData();
431 if (CV->isNullValue() || isa<UndefValue>(CV)) {
432 EmitZeros(TD->getTypeSize(CV->getType()));
434 } else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) {
435 if (CVA->isString()) {
437 } else { // Not a string. Print the values in successive locations
438 for (unsigned i = 0, e = CVA->getNumOperands(); i != e; ++i)
439 EmitGlobalConstant(CVA->getOperand(i));
442 } else if (const ConstantStruct *CVS = dyn_cast<ConstantStruct>(CV)) {
443 // Print the fields in successive locations. Pad to align if needed!
444 const StructLayout *cvsLayout = TD->getStructLayout(CVS->getType());
445 uint64_t sizeSoFar = 0;
446 for (unsigned i = 0, e = CVS->getNumOperands(); i != e; ++i) {
447 const Constant* field = CVS->getOperand(i);
449 // Check if padding is needed and insert one or more 0s.
450 uint64_t fieldSize = TD->getTypeSize(field->getType());
451 uint64_t padSize = ((i == e-1? cvsLayout->StructSize
452 : cvsLayout->MemberOffsets[i+1])
453 - cvsLayout->MemberOffsets[i]) - fieldSize;
454 sizeSoFar += fieldSize + padSize;
456 // Now print the actual field value
457 EmitGlobalConstant(field);
459 // Insert the field padding unless it's zero bytes...
462 assert(sizeSoFar == cvsLayout->StructSize &&
463 "Layout of constant struct may be incorrect!");
465 } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {
466 // FP Constants are printed as integer constants to avoid losing
468 double Val = CFP->getValue();
469 if (CFP->getType() == Type::DoubleTy) {
470 if (Data64bitsDirective)
471 O << Data64bitsDirective << DoubleToBits(Val) << "\t" << CommentString
472 << " double value: " << Val << "\n";
473 else if (TD->isBigEndian()) {
474 O << Data32bitsDirective << unsigned(DoubleToBits(Val) >> 32)
475 << "\t" << CommentString << " double most significant word "
477 O << Data32bitsDirective << unsigned(DoubleToBits(Val))
478 << "\t" << CommentString << " double least significant word "
481 O << Data32bitsDirective << unsigned(DoubleToBits(Val))
482 << "\t" << CommentString << " double least significant word " << Val
484 O << Data32bitsDirective << unsigned(DoubleToBits(Val) >> 32)
485 << "\t" << CommentString << " double most significant word " << Val
490 O << Data32bitsDirective << FloatToBits(Val) << "\t" << CommentString
491 << " float " << Val << "\n";
494 } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) {
495 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
496 uint64_t Val = CI->getRawValue();
498 if (Data64bitsDirective)
499 O << Data64bitsDirective << Val << "\n";
500 else if (TD->isBigEndian()) {
501 O << Data32bitsDirective << unsigned(Val >> 32)
502 << "\t" << CommentString << " Double-word most significant word "
504 O << Data32bitsDirective << unsigned(Val)
505 << "\t" << CommentString << " Double-word least significant word "
508 O << Data32bitsDirective << unsigned(Val)
509 << "\t" << CommentString << " Double-word least significant word "
511 O << Data32bitsDirective << unsigned(Val >> 32)
512 << "\t" << CommentString << " Double-word most significant word "
517 } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
518 const PackedType *PTy = CP->getType();
520 for (unsigned I = 0, E = PTy->getNumElements(); I < E; ++I)
521 EmitGlobalConstant(CP->getOperand(I));
526 const Type *type = CV->getType();
527 switch (type->getTypeID()) {
529 case Type::UByteTyID: case Type::SByteTyID:
530 O << Data8bitsDirective;
532 case Type::UShortTyID: case Type::ShortTyID:
533 O << Data16bitsDirective;
535 case Type::PointerTyID:
536 if (TD->getPointerSize() == 8) {
537 O << Data64bitsDirective;
540 //Fall through for pointer size == int size
541 case Type::UIntTyID: case Type::IntTyID:
542 O << Data32bitsDirective;
544 case Type::ULongTyID: case Type::LongTyID:
545 assert(Data64bitsDirective &&"Target cannot handle 64-bit constant exprs!");
546 O << Data64bitsDirective;
548 case Type::FloatTyID: case Type::DoubleTyID:
549 assert (0 && "Should have already output floating point constant.");
551 assert (0 && "Can't handle printing this type of thing");
554 EmitConstantValueOnly(CV);
558 /// printInlineAsm - This method formats and prints the specified machine
559 /// instruction that is an inline asm.
560 void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
562 unsigned NumOperands = MI->getNumOperands();
564 // Count the number of register definitions.
565 unsigned NumDefs = 0;
566 for (; MI->getOperand(NumDefs).isDef(); ++NumDefs)
567 assert(NumDefs != NumOperands-1 && "No asm string?");
569 assert(MI->getOperand(NumDefs).isExternalSymbol() && "No asm string?");
571 // Disassemble the AsmStr, printing out the literal pieces, the operands, etc.
572 const char *AsmStr = MI->getOperand(NumDefs).getSymbolName();
574 // The variant of the current asmprinter: FIXME: change.
575 int AsmPrinterVariant = 0;
577 int CurVariant = -1; // The number of the {.|.|.} region we are in.
578 const char *LastEmitted = AsmStr; // One past the last character emitted.
580 while (*LastEmitted) {
581 switch (*LastEmitted) {
583 // Not a special case, emit the string section literally.
584 const char *LiteralEnd = LastEmitted+1;
585 while (*LiteralEnd && *LiteralEnd != '{' && *LiteralEnd != '|' &&
586 *LiteralEnd != '}' && *LiteralEnd != '$')
588 if (CurVariant == -1 || CurVariant == AsmPrinterVariant)
589 O.write(LastEmitted, LiteralEnd-LastEmitted);
590 LastEmitted = LiteralEnd;
594 ++LastEmitted; // Consume '$' character.
595 if (*LastEmitted == '$') { // $$ -> $
596 if (CurVariant == -1 || CurVariant == AsmPrinterVariant)
598 ++LastEmitted; // Consume second '$' character.
602 bool HasCurlyBraces = false;
603 if (*LastEmitted == '{') { // ${variable}
604 ++LastEmitted; // Consume '{' character.
605 HasCurlyBraces = true;
608 const char *IDStart = LastEmitted;
610 long Val = strtol(IDStart, &IDEnd, 10); // We only accept numbers for IDs.
611 if (!isdigit(*IDStart) || (Val == 0 && errno == EINVAL)) {
612 std::cerr << "Bad $ operand number in inline asm string: '"
618 char Modifier[2] = { 0, 0 };
620 if (HasCurlyBraces) {
621 // If we have curly braces, check for a modifier character. This
622 // supports syntax like ${0:u}, which correspond to "%u0" in GCC asm.
623 if (*LastEmitted == ':') {
624 ++LastEmitted; // Consume ':' character.
625 if (*LastEmitted == 0) {
626 std::cerr << "Bad ${:} expression in inline asm string: '"
631 Modifier[0] = *LastEmitted;
632 ++LastEmitted; // Consume modifier character.
635 if (*LastEmitted != '}') {
636 std::cerr << "Bad ${} expression in inline asm string: '"
640 ++LastEmitted; // Consume '}' character.
643 if ((unsigned)Val >= NumOperands-1) {
644 std::cerr << "Invalid $ operand number in inline asm string: '"
649 // Okay, we finally have a value number. Ask the target to print this
651 if (CurVariant == -1 || CurVariant == AsmPrinterVariant) {
654 // Scan to find the machine operand number for the operand.
656 unsigned OpFlags = MI->getOperand(OpNo).getImmedValue();
657 OpNo += (OpFlags >> 3) + 1;
660 unsigned OpFlags = MI->getOperand(OpNo).getImmedValue();
661 ++OpNo; // Skip over the ID number.
664 AsmPrinter *AP = const_cast<AsmPrinter*>(this);
665 if ((OpFlags & 7) == 4 /*ADDR MODE*/) {
666 Error = AP->PrintAsmMemoryOperand(MI, OpNo, AsmPrinterVariant,
667 Modifier[0] ? Modifier : 0);
669 Error = AP->PrintAsmOperand(MI, OpNo, AsmPrinterVariant,
670 Modifier[0] ? Modifier : 0);
673 std::cerr << "Invalid operand found in inline asm: '"
682 ++LastEmitted; // Consume '{' character.
683 if (CurVariant != -1) {
684 std::cerr << "Nested variants found in inline asm string: '"
688 CurVariant = 0; // We're in the first variant now.
691 ++LastEmitted; // consume '|' character.
692 if (CurVariant == -1) {
693 std::cerr << "Found '|' character outside of variant in inline asm "
694 << "string: '" << AsmStr << "'\n";
697 ++CurVariant; // We're in the next variant.
700 ++LastEmitted; // consume '}' character.
701 if (CurVariant == -1) {
702 std::cerr << "Found '}' character outside of variant in inline asm "
703 << "string: '" << AsmStr << "'\n";
710 O << "\n" << InlineAsmEnd;
713 /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM
714 /// instruction, using the specified assembler variant. Targets should
715 /// overried this to format as appropriate.
716 bool AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
717 unsigned AsmVariant, const char *ExtraCode) {
718 // Target doesn't support this yet!
722 bool AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
724 const char *ExtraCode) {
725 // Target doesn't support this yet!
729 /// printBasicBlockLabel - This method prints the label for the specified
730 /// MachineBasicBlock
731 void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
733 bool printComment) const {
734 O << PrivateGlobalPrefix << "BB" << FunctionNumber << "_"
739 O << '\t' << CommentString << MBB->getBasicBlock()->getName();