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();
78 if (CurSection != NS) {
80 if (!CurSection.empty())
81 O << "\t" << CurSection << "\n";
85 unsigned enumRegToMachineReg(unsigned enumReg) {
87 default: assert(0 && "Unhandled register!"); break;
88 case PPC::CR0: return 0;
89 case PPC::CR1: return 1;
90 case PPC::CR2: return 2;
91 case PPC::CR3: return 3;
92 case PPC::CR4: return 4;
93 case PPC::CR5: return 5;
94 case PPC::CR6: return 6;
95 case PPC::CR7: return 7;
100 /// printInstruction - This method is automatically generated by tablegen
101 /// from the instruction set description. This method returns true if the
102 /// machine instruction was sufficiently described to print it, otherwise it
104 bool printInstruction(const MachineInstr *MI);
106 void printMachineInstruction(const MachineInstr *MI);
107 void printOp(const MachineOperand &MO, bool IsCallOp = false);
109 void printOperand(const MachineInstr *MI, unsigned OpNo, MVT::ValueType VT){
110 const MachineOperand &MO = MI->getOperand(OpNo);
111 if (MO.getType() == MachineOperand::MO_MachineRegister) {
112 assert(MRegisterInfo::isPhysicalRegister(MO.getReg())&&"Not physreg??");
113 O << TM.getRegisterInfo()->get(MO.getReg()).Name;
114 } else if (MO.isImmediate()) {
115 O << MO.getImmedValue();
121 void printU5ImmOperand(const MachineInstr *MI, unsigned OpNo,
123 unsigned char value = MI->getOperand(OpNo).getImmedValue();
124 assert(value <= 31 && "Invalid u5imm argument!");
125 O << (unsigned int)value;
127 void printU6ImmOperand(const MachineInstr *MI, unsigned OpNo,
129 unsigned char value = MI->getOperand(OpNo).getImmedValue();
130 assert(value <= 63 && "Invalid u6imm argument!");
131 O << (unsigned int)value;
133 void printS16ImmOperand(const MachineInstr *MI, unsigned OpNo,
135 O << (short)MI->getOperand(OpNo).getImmedValue();
137 void printU16ImmOperand(const MachineInstr *MI, unsigned OpNo,
139 O << (unsigned short)MI->getOperand(OpNo).getImmedValue();
141 void printS16X4ImmOperand(const MachineInstr *MI, unsigned OpNo,
143 O << (short)MI->getOperand(OpNo).getImmedValue()*4;
145 void printBranchOperand(const MachineInstr *MI, unsigned OpNo,
147 // Branches can take an immediate operand. This is used by the branch
148 // selection pass to print $+8, an eight byte displacement from the PC.
149 if (MI->getOperand(OpNo).isImmediate()) {
150 O << "$+" << MI->getOperand(OpNo).getImmedValue();
152 printOp(MI->getOperand(OpNo),
153 TM.getInstrInfo()->isCall(MI->getOpcode()));
156 void printPICLabel(const MachineInstr *MI, unsigned OpNo,
158 // FIXME: should probably be converted to cout.width and cout.fill
159 O << "\"L0000" << FunctionNumber << "$pb\"\n";
160 O << "\"L0000" << FunctionNumber << "$pb\":";
162 void printSymbolHi(const MachineInstr *MI, unsigned OpNo,
164 if (MI->getOperand(OpNo).isImmediate()) {
165 printS16ImmOperand(MI, OpNo, VT);
168 printOp(MI->getOperand(OpNo));
170 O << "-\"L0000" << FunctionNumber << "$pb\")";
175 void printSymbolLo(const MachineInstr *MI, unsigned OpNo,
177 if (MI->getOperand(OpNo).isImmediate()) {
178 printS16ImmOperand(MI, OpNo, VT);
181 printOp(MI->getOperand(OpNo));
183 O << "-\"L0000" << FunctionNumber << "$pb\")";
188 void printcrbitm(const MachineInstr *MI, unsigned OpNo,
190 unsigned CCReg = MI->getOperand(OpNo).getReg();
191 unsigned RegNo = enumRegToMachineReg(CCReg);
192 O << (0x80 >> RegNo);
195 virtual void printConstantPool(MachineConstantPool *MCP) = 0;
196 virtual bool runOnMachineFunction(MachineFunction &F) = 0;
197 virtual bool doFinalization(Module &M) = 0;
200 /// DarwinAsmPrinter - PowerPC assembly printer, customized for Darwin/Mac OS
203 struct DarwinAsmPrinter : public PPCAsmPrinter {
205 DarwinAsmPrinter(std::ostream &O, TargetMachine &TM)
206 : PPCAsmPrinter(O, TM) {
209 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
210 Data64bitsDirective = 0; // we can't emit a 64-bit unit
211 AlignmentIsInBytes = false; // Alignment is by power of 2.
214 virtual const char *getPassName() const {
215 return "Darwin PPC Assembly Printer";
218 void printConstantPool(MachineConstantPool *MCP);
219 bool runOnMachineFunction(MachineFunction &F);
220 bool doInitialization(Module &M);
221 bool doFinalization(Module &M);
224 /// AIXAsmPrinter - PowerPC assembly printer, customized for AIX
226 struct AIXAsmPrinter : public PPCAsmPrinter {
227 /// Map for labels corresponding to global variables
229 std::map<const GlobalVariable*,std::string> GVToLabelMap;
231 AIXAsmPrinter(std::ostream &O, TargetMachine &TM)
232 : PPCAsmPrinter(O, TM) {
235 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
236 Data64bitsDirective = 0; // we can't emit a 64-bit unit
237 AlignmentIsInBytes = false; // Alignment is by power of 2.
240 virtual const char *getPassName() const {
241 return "AIX PPC Assembly Printer";
244 void printConstantPool(MachineConstantPool *MCP);
245 bool runOnMachineFunction(MachineFunction &F);
246 bool doInitialization(Module &M);
247 bool doFinalization(Module &M);
249 } // end of anonymous namespace
251 /// createDarwinAsmPrinterPass - Returns a pass that prints the PPC assembly
252 /// code for a MachineFunction to the given output stream, in a format that the
253 /// Darwin assembler can deal with.
255 FunctionPass *llvm::createDarwinAsmPrinter(std::ostream &o, TargetMachine &tm) {
256 return new DarwinAsmPrinter(o, tm);
259 /// createAIXAsmPrinterPass - Returns a pass that prints the PPC assembly code
260 /// for a MachineFunction to the given output stream, in a format that the
261 /// AIX 5L assembler can deal with.
263 FunctionPass *llvm::createAIXAsmPrinter(std::ostream &o, TargetMachine &tm) {
264 return new AIXAsmPrinter(o, tm);
267 // Include the auto-generated portion of the assembly writer
268 #include "PPCGenAsmWriter.inc"
270 void PPCAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) {
271 const MRegisterInfo &RI = *TM.getRegisterInfo();
274 switch (MO.getType()) {
275 case MachineOperand::MO_VirtualRegister:
276 if (Value *V = MO.getVRegValueOrNull()) {
277 O << "<" << V->getName() << ">";
281 case MachineOperand::MO_MachineRegister:
282 case MachineOperand::MO_CCRegister:
283 O << RI.get(MO.getReg()).Name;
286 case MachineOperand::MO_SignExtendedImmed:
287 case MachineOperand::MO_UnextendedImmed:
288 std::cerr << "printOp() does not handle immediate values\n";
292 case MachineOperand::MO_PCRelativeDisp:
293 std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
297 case MachineOperand::MO_MachineBasicBlock: {
298 MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
299 O << "LBB" << FunctionNumber << "_" << MBBOp->getNumber() << "\t; "
300 << MBBOp->getBasicBlock()->getName();
304 case MachineOperand::MO_ConstantPoolIndex:
305 O << "LCPI" << FunctionNumber << '_' << MO.getConstantPoolIndex();
308 case MachineOperand::MO_ExternalSymbol:
310 std::string Name(GlobalPrefix); Name += MO.getSymbolName();
311 FnStubs.insert(Name);
312 O << "L" << Name << "$stub";
315 O << GlobalPrefix << MO.getSymbolName();
318 case MachineOperand::MO_GlobalAddress: {
319 GlobalValue *GV = MO.getGlobal();
320 std::string Name = Mang->getValueName(GV);
322 // Dynamically-resolved functions need a stub for the function. Be
323 // wary however not to output $stub for external functions whose addresses
324 // are taken. Those should be emitted as $non_lazy_ptr below.
325 Function *F = dyn_cast<Function>(GV);
326 if (F && IsCallOp && F->isExternal()) {
327 FnStubs.insert(Name);
328 O << "L" << Name << "$stub";
332 // External or weakly linked global variables need non-lazily-resolved stubs
333 if ((GV->isExternal() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage())){
334 if (GV->hasLinkOnceLinkage())
335 LinkOnceStubs.insert(Name);
337 GVStubs.insert(Name);
338 O << "L" << Name << "$non_lazy_ptr";
342 O << Mang->getValueName(GV);
347 O << "<unknown operand type: " << MO.getType() << ">";
352 /// printMachineInstruction -- Print out a single PowerPC MI in Darwin syntax to
353 /// the current output stream.
355 void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
358 // Check for slwi/srwi mnemonics.
359 if (MI->getOpcode() == PPC::RLWINM) {
360 bool FoundMnemonic = false;
361 unsigned char SH = MI->getOperand(2).getImmedValue();
362 unsigned char MB = MI->getOperand(3).getImmedValue();
363 unsigned char ME = MI->getOperand(4).getImmedValue();
364 if (SH <= 31 && MB == 0 && ME == (31-SH)) {
365 O << "slwi "; FoundMnemonic = true;
367 if (SH <= 31 && MB == (32-SH) && ME == 31) {
368 O << "srwi "; FoundMnemonic = true;
372 printOperand(MI, 0, MVT::i64);
374 printOperand(MI, 1, MVT::i64);
375 O << ", " << (unsigned int)SH << "\n";
380 if (printInstruction(MI))
381 return; // Printer was automatically generated
383 assert(0 && "Unhandled instruction in asm writer!");
388 /// runOnMachineFunction - This uses the printMachineInstruction()
389 /// method to print assembly for each instruction.
391 bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
392 setupMachineFunction(MF);
395 // Print out constants referenced by the function
396 printConstantPool(MF.getConstantPool());
398 // Print out labels for the function.
399 const Function *F = MF.getFunction();
400 SwitchSection(".text", F);
402 if (!F->hasInternalLinkage())
403 O << "\t.globl\t" << CurrentFnName << "\n";
404 O << CurrentFnName << ":\n";
406 // Print out code for the function.
407 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
409 // Print a label for the basic block.
410 if (I != MF.begin()) {
411 O << "LBB" << FunctionNumber << '_' << I->getNumber() << ":\t";
412 if (!I->getBasicBlock()->getName().empty())
413 O << CommentString << " " << I->getBasicBlock()->getName();
416 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
418 // Print the assembly for the instruction.
420 printMachineInstruction(II);
425 // We didn't modify anything.
429 /// printConstantPool - Print to the current output stream assembly
430 /// representations of the constants in the constant pool MCP. This is
431 /// used to print out constants which have been "spilled to memory" by
432 /// the code generator.
434 void DarwinAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
435 const std::vector<Constant*> &CP = MCP->getConstants();
436 const TargetData &TD = TM.getTargetData();
438 if (CP.empty()) return;
440 for (unsigned i = 0, e = CP.size(); i != e; ++i) {
442 // FIXME: force doubles to be naturally aligned. We should handle this
443 // more correctly in the future.
444 if (Type::DoubleTy == CP[i]->getType())
447 emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
448 O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t" << CommentString
450 emitGlobalConstant(CP[i]);
454 bool DarwinAsmPrinter::doInitialization(Module &M) {
455 if (TM.getSubtarget<PPCSubtarget>().isGigaProcessor())
456 O << "\t.machine ppc970\n";
457 SwitchSection("", 0);
458 AsmPrinter::doInitialization(M);
460 // Darwin wants symbols to be quoted if they have complex names.
461 Mang->setUseQuotes(true);
465 bool DarwinAsmPrinter::doFinalization(Module &M) {
466 const TargetData &TD = TM.getTargetData();
468 // Print out module-level global variables here.
469 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
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 O << ".section __TEXT,__textcoal_nt,coalesced,no_toc\n"
491 << ".weak_definition " << name << '\n'
492 << ".private_extern " << name << '\n'
493 << ".section __DATA,__datacoal_nt,coalesced,no_toc\n";
494 LinkOnceStubs.insert(name);
496 case GlobalValue::WeakLinkage:
497 O << ".weak_definition " << name << '\n'
498 << ".private_extern " << name << '\n';
500 case GlobalValue::AppendingLinkage:
501 // FIXME: appending linkage variables should go into a section of
502 // their name or something. For now, just emit them as external.
503 case GlobalValue::ExternalLinkage:
504 // If external or appending, declare as a global symbol
505 O << "\t.globl " << name << "\n";
507 case GlobalValue::InternalLinkage:
508 SwitchSection(".data", I);
511 std::cerr << "Unknown linkage type!";
515 emitAlignment(Align);
516 O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
517 emitGlobalConstant(C);
521 // Output stubs for dynamically-linked functions
522 for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
527 O << ".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n";
529 O << "L" << *i << "$stub:\n";
530 O << "\t.indirect_symbol " << *i << "\n";
532 O << "\tbcl 20,31,L0$" << *i << "\n";
533 O << "L0$" << *i << ":\n";
535 O << "\taddis r11,r11,ha16(L" << *i << "$lazy_ptr-L0$" << *i << ")\n";
537 O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n";
538 O << "\tmtctr r12\n";
541 O << ".lazy_symbol_pointer\n";
542 O << "L" << *i << "$lazy_ptr:\n";
543 O << "\t.indirect_symbol " << *i << "\n";
544 O << "\t.long dyld_stub_binding_helper\n";
546 O << "\t.section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16\n";
548 O << "L" << *i << "$stub:\n";
549 O << "\t.indirect_symbol " << *i << "\n";
550 O << "\tlis r11,ha16(L" << *i << "$lazy_ptr)\n";
551 O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n";
552 O << "\tmtctr r12\n";
554 O << "\t.lazy_symbol_pointer\n";
555 O << "L" << *i << "$lazy_ptr:\n";
556 O << "\t.indirect_symbol " << *i << "\n";
557 O << "\t.long dyld_stub_binding_helper\n";
563 // Output stubs for external global variables
564 if (GVStubs.begin() != GVStubs.end())
565 O << ".data\n.non_lazy_symbol_pointer\n";
566 for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
568 O << "L" << *i << "$non_lazy_ptr:\n";
569 O << "\t.indirect_symbol " << *i << "\n";
573 // Output stubs for link-once variables
574 if (LinkOnceStubs.begin() != LinkOnceStubs.end())
575 O << ".data\n.align 2\n";
576 for (std::set<std::string>::iterator i = LinkOnceStubs.begin(),
577 e = LinkOnceStubs.end(); i != e; ++i) {
578 O << "L" << *i << "$non_lazy_ptr:\n"
579 << "\t.long\t" << *i << '\n';
582 // Funny Darwin hack: This flag tells the linker that no global symbols
583 // contain code that falls through to other global symbols (e.g. the obvious
584 // implementation of multiple entry points). If this doesn't occur, the
585 // linker can safely perform dead code stripping. Since LLVM never generates
586 // code that does this, it is always safe to set.
587 O << "\t.subsections_via_symbols\n";
589 AsmPrinter::doFinalization(M);
590 return false; // success
593 /// runOnMachineFunction - This uses the printMachineInstruction()
594 /// method to print assembly for each instruction.
596 bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
597 CurrentFnName = MF.getFunction()->getName();
599 // Print out constants referenced by the function
600 printConstantPool(MF.getConstantPool());
602 // Print out header for the function.
603 O << "\t.csect .text[PR]\n"
605 << "\t.globl " << CurrentFnName << '\n'
606 << "\t.globl ." << CurrentFnName << '\n'
607 << "\t.csect " << CurrentFnName << "[DS],3\n"
608 << CurrentFnName << ":\n"
609 << "\t.llong ." << CurrentFnName << ", TOC[tc0], 0\n"
610 << "\t.csect .text[PR]\n"
611 << '.' << CurrentFnName << ":\n";
613 // Print out code for the function.
614 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
616 // Print a label for the basic block.
617 O << "LBB" << CurrentFnName << '_' << I->getNumber() << ":\t# "
618 << I->getBasicBlock()->getName() << '\n';
619 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
621 // Print the assembly for the instruction.
623 printMachineInstruction(II);
628 O << "LT.." << CurrentFnName << ":\n"
630 << "\t.byte 0,0,32,65,128,0,0,0\n"
631 << "\t.long LT.." << CurrentFnName << "-." << CurrentFnName << '\n'
633 << "\t.byte \"" << CurrentFnName << "\"\n"
636 // We didn't modify anything.
640 /// printConstantPool - Print to the current output stream assembly
641 /// representations of the constants in the constant pool MCP. This is
642 /// used to print out constants which have been "spilled to memory" by
643 /// the code generator.
645 void AIXAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
646 const std::vector<Constant*> &CP = MCP->getConstants();
647 const TargetData &TD = TM.getTargetData();
649 if (CP.empty()) return;
651 for (unsigned i = 0, e = CP.size(); i != e; ++i) {
653 O << "\t.align " << (unsigned)TD.getTypeAlignment(CP[i]->getType())
655 O << "LCPI" << FunctionNumber << '_' << i << ":\t\t\t\t\t;"
657 emitGlobalConstant(CP[i]);
661 bool AIXAsmPrinter::doInitialization(Module &M) {
662 SwitchSection("", 0);
663 const TargetData &TD = TM.getTargetData();
665 O << "\t.machine \"ppc64\"\n"
667 << "\t.csect .text[PR]\n";
669 // Print out module-level global variables
670 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
672 if (!I->hasInitializer())
675 std::string Name = I->getName();
676 Constant *C = I->getInitializer();
677 // N.B.: We are defaulting to writable strings
678 if (I->hasExternalLinkage()) {
679 O << "\t.globl " << Name << '\n'
680 << "\t.csect .data[RW],3\n";
682 O << "\t.csect _global.rw_c[RW],3\n";
685 emitGlobalConstant(C);
688 // Output labels for globals
689 if (M.global_begin() != M.global_end()) O << "\t.toc\n";
690 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
692 const GlobalVariable *GV = I;
693 // Do not output labels for unused variables
694 if (GV->isExternal() && GV->use_begin() == GV->use_end())
697 std::string Name = GV->getName();
698 std::string Label = "LC.." + utostr(FunctionNumber++);
699 GVToLabelMap[GV] = Label;
701 << "\t.tc " << Name << "[TC]," << Name;
702 if (GV->isExternal()) O << "[RW]";
706 AsmPrinter::doInitialization(M);
707 return false; // success
710 bool AIXAsmPrinter::doFinalization(Module &M) {
711 const TargetData &TD = TM.getTargetData();
712 // Print out module-level global variables
713 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
715 if (I->hasInitializer() || I->hasExternalLinkage())
718 std::string Name = I->getName();
719 if (I->hasInternalLinkage()) {
720 O << "\t.lcomm " << Name << ",16,_global.bss_c";
722 O << "\t.comm " << Name << "," << TD.getTypeSize(I->getType())
723 << "," << Log2_32((unsigned)TD.getTypeAlignment(I->getType()));
726 WriteAsOperand(O, I, false, true, &M);
730 O << "_section_.text:\n"
731 << "\t.csect .data[RW],3\n"
732 << "\t.llong _section_.text\n";
733 AsmPrinter::doFinalization(M);
734 return false; // success