1 //===-- PPCAsmPrinter.cpp - Print machine instrs to PowerPC assembly --------=//
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 contains a printer that converts from our internal representation
11 // of machine-dependent LLVM code to PowerPC assembly language. This printer is
12 // the output mechanism used by `llc'.
14 // Documentation at http://developer.apple.com/documentation/DeveloperTools/
15 // Reference/Assembler/ASMIntroduction/chapter_1_section_1.html
17 //===----------------------------------------------------------------------===//
19 #define DEBUG_TYPE "asmprinter"
21 #include "PPCTargetMachine.h"
22 #include "PPCSubtarget.h"
23 #include "llvm/Constants.h"
24 #include "llvm/DerivedTypes.h"
25 #include "llvm/Module.h"
26 #include "llvm/Assembly/Writer.h"
27 #include "llvm/CodeGen/AsmPrinter.h"
28 #include "llvm/CodeGen/MachineConstantPool.h"
29 #include "llvm/CodeGen/MachineFunctionPass.h"
30 #include "llvm/CodeGen/MachineInstr.h"
31 #include "llvm/CodeGen/ValueTypes.h"
32 #include "llvm/Support/Mangler.h"
33 #include "llvm/Support/MathExtras.h"
34 #include "llvm/Support/CommandLine.h"
35 #include "llvm/Support/Debug.h"
36 #include "llvm/Target/MRegisterInfo.h"
37 #include "llvm/Target/TargetInstrInfo.h"
38 #include "llvm/ADT/Statistic.h"
39 #include "llvm/ADT/StringExtras.h"
44 Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
46 class PPCAsmPrinter : public AsmPrinter {
47 std::string CurSection;
49 std::set<std::string> FnStubs, GVStubs, LinkOnceStubs;
51 PPCAsmPrinter(std::ostream &O, TargetMachine &TM)
52 : AsmPrinter(O, TM), FunctionNumber(0) {}
54 /// Unique incrementer for label values for referencing Global values.
56 unsigned FunctionNumber;
58 virtual const char *getPassName() const {
59 return "PowerPC Assembly Printer";
62 PPCTargetMachine &getTM() {
63 return static_cast<PPCTargetMachine&>(TM);
66 /// SwitchSection - Switch to the specified section of the executable if we
67 /// are not already in it!
69 void SwitchSection(const char *NewSection, const GlobalValue *GV) {
72 if (GV && GV->hasSection())
73 NS = ".section " + GV->getSection();
77 if (CurSection != NS) {
79 if (!CurSection.empty())
80 O << "\t" << CurSection << "\n";
84 unsigned enumRegToMachineReg(unsigned enumReg) {
86 default: assert(0 && "Unhandled register!"); break;
87 case PPC::CR0: return 0;
88 case PPC::CR1: return 1;
89 case PPC::CR2: return 2;
90 case PPC::CR3: return 3;
91 case PPC::CR4: return 4;
92 case PPC::CR5: return 5;
93 case PPC::CR6: return 6;
94 case PPC::CR7: return 7;
99 /// printInstruction - This method is automatically generated by tablegen
100 /// from the instruction set description. This method returns true if the
101 /// machine instruction was sufficiently described to print it, otherwise it
103 bool printInstruction(const MachineInstr *MI);
105 void printMachineInstruction(const MachineInstr *MI);
106 void printOp(const MachineOperand &MO, bool IsCallOp = false);
108 void printOperand(const MachineInstr *MI, unsigned OpNo, MVT::ValueType VT){
109 const MachineOperand &MO = MI->getOperand(OpNo);
110 if (MO.getType() == MachineOperand::MO_MachineRegister) {
111 assert(MRegisterInfo::isPhysicalRegister(MO.getReg())&&"Not physreg??");
112 O << TM.getRegisterInfo()->get(MO.getReg()).Name;
113 } else if (MO.isImmediate()) {
114 O << MO.getImmedValue();
120 void printU5ImmOperand(const MachineInstr *MI, unsigned OpNo,
122 unsigned char value = MI->getOperand(OpNo).getImmedValue();
123 assert(value <= 31 && "Invalid u5imm argument!");
124 O << (unsigned int)value;
126 void printU6ImmOperand(const MachineInstr *MI, unsigned OpNo,
128 unsigned char value = MI->getOperand(OpNo).getImmedValue();
129 assert(value <= 63 && "Invalid u6imm argument!");
130 O << (unsigned int)value;
132 void printS16ImmOperand(const MachineInstr *MI, unsigned OpNo,
134 O << (short)MI->getOperand(OpNo).getImmedValue();
136 void printU16ImmOperand(const MachineInstr *MI, unsigned OpNo,
138 O << (unsigned short)MI->getOperand(OpNo).getImmedValue();
140 void printS16X4ImmOperand(const MachineInstr *MI, unsigned OpNo,
142 O << (short)MI->getOperand(OpNo).getImmedValue()*4;
144 void printBranchOperand(const MachineInstr *MI, unsigned OpNo,
146 // Branches can take an immediate operand. This is used by the branch
147 // selection pass to print $+8, an eight byte displacement from the PC.
148 if (MI->getOperand(OpNo).isImmediate()) {
149 O << "$+" << MI->getOperand(OpNo).getImmedValue();
151 printOp(MI->getOperand(OpNo),
152 TM.getInstrInfo()->isCall(MI->getOpcode()));
155 void printPICLabel(const MachineInstr *MI, unsigned OpNo,
157 // FIXME: should probably be converted to cout.width and cout.fill
158 O << "\"L0000" << FunctionNumber << "$pb\"\n";
159 O << "\"L0000" << FunctionNumber << "$pb\":";
161 void printSymbolHi(const MachineInstr *MI, unsigned OpNo,
163 if (MI->getOperand(OpNo).isImmediate()) {
164 printS16ImmOperand(MI, OpNo, VT);
167 printOp(MI->getOperand(OpNo));
169 O << "-\"L0000" << FunctionNumber << "$pb\")";
174 void printSymbolLo(const MachineInstr *MI, unsigned OpNo,
176 if (MI->getOperand(OpNo).isImmediate()) {
177 printS16ImmOperand(MI, OpNo, VT);
180 printOp(MI->getOperand(OpNo));
182 O << "-\"L0000" << FunctionNumber << "$pb\")";
187 void printcrbitm(const MachineInstr *MI, unsigned OpNo,
189 unsigned CCReg = MI->getOperand(OpNo).getReg();
190 unsigned RegNo = enumRegToMachineReg(CCReg);
191 O << (0x80 >> RegNo);
194 virtual void printConstantPool(MachineConstantPool *MCP) = 0;
195 virtual bool runOnMachineFunction(MachineFunction &F) = 0;
196 virtual bool doFinalization(Module &M) = 0;
199 /// DarwinAsmPrinter - PowerPC assembly printer, customized for Darwin/Mac OS
202 struct DarwinAsmPrinter : public PPCAsmPrinter {
204 DarwinAsmPrinter(std::ostream &O, TargetMachine &TM)
205 : PPCAsmPrinter(O, TM) {
208 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
209 Data64bitsDirective = 0; // we can't emit a 64-bit unit
210 AlignmentIsInBytes = false; // Alignment is by power of 2.
213 virtual const char *getPassName() const {
214 return "Darwin PPC Assembly Printer";
217 void printConstantPool(MachineConstantPool *MCP);
218 bool runOnMachineFunction(MachineFunction &F);
219 bool doInitialization(Module &M);
220 bool doFinalization(Module &M);
223 /// AIXAsmPrinter - PowerPC assembly printer, customized for AIX
225 struct AIXAsmPrinter : public PPCAsmPrinter {
226 /// Map for labels corresponding to global variables
228 std::map<const GlobalVariable*,std::string> GVToLabelMap;
230 AIXAsmPrinter(std::ostream &O, TargetMachine &TM)
231 : PPCAsmPrinter(O, TM) {
234 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
235 Data64bitsDirective = 0; // we can't emit a 64-bit unit
236 AlignmentIsInBytes = false; // Alignment is by power of 2.
239 virtual const char *getPassName() const {
240 return "AIX PPC Assembly Printer";
243 void printConstantPool(MachineConstantPool *MCP);
244 bool runOnMachineFunction(MachineFunction &F);
245 bool doInitialization(Module &M);
246 bool doFinalization(Module &M);
248 } // end of anonymous namespace
250 /// createDarwinAsmPrinterPass - Returns a pass that prints the PPC assembly
251 /// code for a MachineFunction to the given output stream, in a format that the
252 /// Darwin assembler can deal with.
254 FunctionPass *llvm::createDarwinAsmPrinter(std::ostream &o, TargetMachine &tm) {
255 return new DarwinAsmPrinter(o, tm);
258 /// createAIXAsmPrinterPass - Returns a pass that prints the PPC assembly code
259 /// for a MachineFunction to the given output stream, in a format that the
260 /// AIX 5L assembler can deal with.
262 FunctionPass *llvm::createAIXAsmPrinter(std::ostream &o, TargetMachine &tm) {
263 return new AIXAsmPrinter(o, tm);
266 // Include the auto-generated portion of the assembly writer
267 #include "PPCGenAsmWriter.inc"
269 void PPCAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) {
270 const MRegisterInfo &RI = *TM.getRegisterInfo();
273 switch (MO.getType()) {
274 case MachineOperand::MO_VirtualRegister:
275 if (Value *V = MO.getVRegValueOrNull()) {
276 O << "<" << V->getName() << ">";
280 case MachineOperand::MO_MachineRegister:
281 case MachineOperand::MO_CCRegister:
282 O << RI.get(MO.getReg()).Name;
285 case MachineOperand::MO_SignExtendedImmed:
286 case MachineOperand::MO_UnextendedImmed:
287 std::cerr << "printOp() does not handle immediate values\n";
291 case MachineOperand::MO_PCRelativeDisp:
292 std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
296 case MachineOperand::MO_MachineBasicBlock: {
297 MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
298 O << "LBB" << FunctionNumber << "_" << MBBOp->getNumber() << "\t; "
299 << MBBOp->getBasicBlock()->getName();
303 case MachineOperand::MO_ConstantPoolIndex:
304 O << "LCPI" << FunctionNumber << '_' << MO.getConstantPoolIndex();
307 case MachineOperand::MO_ExternalSymbol:
309 std::string Name(GlobalPrefix); Name += MO.getSymbolName();
310 FnStubs.insert(Name);
311 O << "L" << Name << "$stub";
314 O << GlobalPrefix << MO.getSymbolName();
317 case MachineOperand::MO_GlobalAddress: {
318 GlobalValue *GV = MO.getGlobal();
319 std::string Name = Mang->getValueName(GV);
321 // Dynamically-resolved functions need a stub for the function. Be
322 // wary however not to output $stub for external functions whose addresses
323 // are taken. Those should be emitted as $non_lazy_ptr below.
324 Function *F = dyn_cast<Function>(GV);
325 if (F && IsCallOp && F->isExternal()) {
326 FnStubs.insert(Name);
327 O << "L" << Name << "$stub";
331 // External or weakly linked global variables need non-lazily-resolved stubs
332 if ((GV->isExternal() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage())){
333 if (GV->hasLinkOnceLinkage())
334 LinkOnceStubs.insert(Name);
336 GVStubs.insert(Name);
337 O << "L" << Name << "$non_lazy_ptr";
341 O << Mang->getValueName(GV);
346 O << "<unknown operand type: " << MO.getType() << ">";
351 /// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to
352 /// the current output stream.
354 void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
357 // Check for slwi/srwi mnemonics.
358 if (MI->getOpcode() == PPC::RLWINM) {
359 bool FoundMnemonic = false;
360 unsigned char SH = MI->getOperand(2).getImmedValue();
361 unsigned char MB = MI->getOperand(3).getImmedValue();
362 unsigned char ME = MI->getOperand(4).getImmedValue();
363 if (SH <= 31 && MB == 0 && ME == (31-SH)) {
364 O << "slwi "; FoundMnemonic = true;
366 if (SH <= 31 && MB == (32-SH) && ME == 31) {
367 O << "srwi "; FoundMnemonic = true;
371 printOperand(MI, 0, MVT::i64);
373 printOperand(MI, 1, MVT::i64);
374 O << ", " << (unsigned int)SH << "\n";
379 if (printInstruction(MI))
380 return; // Printer was automatically generated
382 assert(0 && "Unhandled instruction in asm writer!");
387 /// runOnMachineFunction - This uses the printMachineInstruction()
388 /// method to print assembly for each instruction.
390 bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
391 setupMachineFunction(MF);
394 // Print out constants referenced by the function
395 printConstantPool(MF.getConstantPool());
397 // Print out labels for the function.
398 const Function *F = MF.getFunction();
399 SwitchSection(".text", F);
401 if (!F->hasInternalLinkage())
402 O << "\t.globl\t" << CurrentFnName << "\n";
403 O << CurrentFnName << ":\n";
405 // Print out code for the function.
406 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
408 // Print a label for the basic block.
409 if (I != MF.begin()) {
410 O << "LBB" << FunctionNumber << '_' << I->getNumber() << ":\t";
411 if (!I->getBasicBlock()->getName().empty())
412 O << CommentString << " " << I->getBasicBlock()->getName();
415 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
417 // Print the assembly for the instruction.
419 printMachineInstruction(II);
424 // We didn't modify anything.
428 /// printConstantPool - Print to the current output stream assembly
429 /// representations of the constants in the constant pool MCP. This is
430 /// used to print out constants which have been "spilled to memory" by
431 /// the code generator.
433 void DarwinAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
434 const std::vector<Constant*> &CP = MCP->getConstants();
435 const TargetData &TD = TM.getTargetData();
437 if (CP.empty()) return;
439 for (unsigned i = 0, e = CP.size(); i != e; ++i) {
440 SwitchSection(".const", 0);
441 // FIXME: force doubles to be naturally aligned. We should handle this
442 // more correctly in the future.
443 if (Type::DoubleTy == CP[i]->getType())
446 emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
447 O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t" << CommentString
449 emitGlobalConstant(CP[i]);
453 bool DarwinAsmPrinter::doInitialization(Module &M) {
454 if (TM.getSubtarget<PPCSubtarget>().isGigaProcessor())
455 O << "\t.machine ppc970\n";
456 SwitchSection("", 0);
457 AsmPrinter::doInitialization(M);
459 // Darwin wants symbols to be quoted if they have complex names.
460 Mang->setUseQuotes(true);
464 bool DarwinAsmPrinter::doFinalization(Module &M) {
465 const TargetData &TD = TM.getTargetData();
467 // Print out module-level global variables here.
468 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
470 if (I->hasInitializer()) { // External global require no code
472 std::string name = Mang->getValueName(I);
473 Constant *C = I->getInitializer();
474 unsigned Size = TD.getTypeSize(C->getType());
475 unsigned Align = TD.getTypeAlignmentShift(C->getType());
477 if (C->isNullValue() && /* FIXME: Verify correct */
478 (I->hasInternalLinkage() || I->hasWeakLinkage() ||
479 I->hasLinkOnceLinkage())) {
480 SwitchSection(".data", I);
481 if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
482 if (I->hasInternalLinkage())
483 O << ".lcomm " << name << "," << Size << "," << Align;
485 O << ".comm " << name << "," << Size;
486 O << "\t\t; '" << I->getName() << "'\n";
488 switch (I->getLinkage()) {
489 case GlobalValue::LinkOnceLinkage:
490 SwitchSection("", 0);
491 O << ".section __TEXT,__textcoal_nt,coalesced,no_toc\n"
492 << ".weak_definition " << name << '\n'
493 << ".private_extern " << name << '\n'
494 << ".section __DATA,__datacoal_nt,coalesced,no_toc\n";
495 LinkOnceStubs.insert(name);
497 case GlobalValue::WeakLinkage:
498 O << ".weak_definition " << name << '\n'
499 << ".private_extern " << name << '\n';
501 case GlobalValue::AppendingLinkage:
502 // FIXME: appending linkage variables should go into a section of
503 // their name or something. For now, just emit them as external.
504 case GlobalValue::ExternalLinkage:
505 // If external or appending, declare as a global symbol
506 O << "\t.globl " << name << "\n";
508 case GlobalValue::InternalLinkage:
509 SwitchSection(".data", I);
512 std::cerr << "Unknown linkage type!";
516 emitAlignment(Align, I);
517 O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
518 emitGlobalConstant(C);
522 // Output stubs for dynamically-linked functions
523 for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
528 O << ".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n";
530 O << "L" << *i << "$stub:\n";
531 O << "\t.indirect_symbol " << *i << "\n";
533 O << "\tbcl 20,31,L0$" << *i << "\n";
534 O << "L0$" << *i << ":\n";
536 O << "\taddis r11,r11,ha16(L" << *i << "$lazy_ptr-L0$" << *i << ")\n";
538 O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n";
539 O << "\tmtctr r12\n";
542 O << ".lazy_symbol_pointer\n";
543 O << "L" << *i << "$lazy_ptr:\n";
544 O << "\t.indirect_symbol " << *i << "\n";
545 O << "\t.long dyld_stub_binding_helper\n";
547 O << "\t.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16\n";
549 O << "L" << *i << "$stub:\n";
550 O << "\t.indirect_symbol " << *i << "\n";
551 O << "\tlis r11,ha16(L" << *i << "$lazy_ptr)\n";
552 O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n";
553 O << "\tmtctr r12\n";
555 O << "\t.lazy_symbol_pointer\n";
556 O << "L" << *i << "$lazy_ptr:\n";
557 O << "\t.indirect_symbol " << *i << "\n";
558 O << "\t.long dyld_stub_binding_helper\n";
564 // Output stubs for external global variables
565 if (GVStubs.begin() != GVStubs.end())
566 O << ".data\n.non_lazy_symbol_pointer\n";
567 for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
569 O << "L" << *i << "$non_lazy_ptr:\n";
570 O << "\t.indirect_symbol " << *i << "\n";
574 // Output stubs for link-once variables
575 if (LinkOnceStubs.begin() != LinkOnceStubs.end())
576 O << ".data\n.align 2\n";
577 for (std::set<std::string>::iterator i = LinkOnceStubs.begin(),
578 e = LinkOnceStubs.end(); i != e; ++i) {
579 O << "L" << *i << "$non_lazy_ptr:\n"
580 << "\t.long\t" << *i << '\n';
583 // Funny Darwin hack: This flag tells the linker that no global symbols
584 // contain code that falls through to other global symbols (e.g. the obvious
585 // implementation of multiple entry points). If this doesn't occur, the
586 // linker can safely perform dead code stripping. Since LLVM never generates
587 // code that does this, it is always safe to set.
588 O << "\t.subsections_via_symbols\n";
590 AsmPrinter::doFinalization(M);
591 return false; // success
594 /// runOnMachineFunction - This uses the printMachineInstruction()
595 /// method to print assembly for each instruction.
597 bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
598 CurrentFnName = MF.getFunction()->getName();
600 // Print out constants referenced by the function
601 printConstantPool(MF.getConstantPool());
603 // Print out header for the function.
604 O << "\t.csect .text[PR]\n"
606 << "\t.globl " << CurrentFnName << '\n'
607 << "\t.globl ." << CurrentFnName << '\n'
608 << "\t.csect " << CurrentFnName << "[DS],3\n"
609 << CurrentFnName << ":\n"
610 << "\t.llong ." << CurrentFnName << ", TOC[tc0], 0\n"
611 << "\t.csect .text[PR]\n"
612 << '.' << CurrentFnName << ":\n";
614 // Print out code for the function.
615 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
617 // Print a label for the basic block.
618 O << "LBB" << CurrentFnName << '_' << I->getNumber() << ":\t# "
619 << I->getBasicBlock()->getName() << '\n';
620 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
622 // Print the assembly for the instruction.
624 printMachineInstruction(II);
629 O << "LT.." << CurrentFnName << ":\n"
631 << "\t.byte 0,0,32,65,128,0,0,0\n"
632 << "\t.long LT.." << CurrentFnName << "-." << CurrentFnName << '\n'
634 << "\t.byte \"" << CurrentFnName << "\"\n"
637 // We didn't modify anything.
641 /// printConstantPool - Print to the current output stream assembly
642 /// representations of the constants in the constant pool MCP. This is
643 /// used to print out constants which have been "spilled to memory" by
644 /// the code generator.
646 void AIXAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
647 const std::vector<Constant*> &CP = MCP->getConstants();
648 const TargetData &TD = TM.getTargetData();
650 if (CP.empty()) return;
652 for (unsigned i = 0, e = CP.size(); i != e; ++i) {
653 SwitchSection(".const", 0);
654 O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType())
656 O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t;"
658 emitGlobalConstant(CP[i]);
662 bool AIXAsmPrinter::doInitialization(Module &M) {
663 SwitchSection("", 0);
664 const TargetData &TD = TM.getTargetData();
666 O << "\t.machine \"ppc64\"\n"
668 << "\t.csect .text[PR]\n";
670 // Print out module-level global variables
671 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
673 if (!I->hasInitializer())
676 std::string Name = I->getName();
677 Constant *C = I->getInitializer();
678 // N.B.: We are defaulting to writable strings
679 if (I->hasExternalLinkage()) {
680 O << "\t.globl " << Name << '\n'
681 << "\t.csect .data[RW],3\n";
683 O << "\t.csect _global.rw_c[RW],3\n";
686 emitGlobalConstant(C);
689 // Output labels for globals
690 if (M.global_begin() != M.global_end()) O << "\t.toc\n";
691 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
693 const GlobalVariable *GV = I;
694 // Do not output labels for unused variables
695 if (GV->isExternal() && GV->use_begin() == GV->use_end())
698 std::string Name = GV->getName();
699 std::string Label = "LC.." + utostr(FunctionNumber++);
700 GVToLabelMap[GV] = Label;
702 << "\t.tc " << Name << "[TC]," << Name;
703 if (GV->isExternal()) O << "[RW]";
707 AsmPrinter::doInitialization(M);
708 return false; // success
711 bool AIXAsmPrinter::doFinalization(Module &M) {
712 const TargetData &TD = TM.getTargetData();
713 // Print out module-level global variables
714 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
716 if (I->hasInitializer() || I->hasExternalLinkage())
719 std::string Name = I->getName();
720 if (I->hasInternalLinkage()) {
721 O << "\t.lcomm " << Name << ",16,_global.bss_c";
723 O << "\t.comm " << Name << "," << TD.getTypeSize(I->getType())
724 << "," << Log2_32((unsigned)TD.getTypeAlignment(I->getType()));
727 WriteAsOperand(O, I, false, true, &M);
731 O << "_section_.text:\n"
732 << "\t.csect .data[RW],3\n"
733 << "\t.llong _section_.text\n";
734 AsmPrinter::doFinalization(M);
735 return false; // success