blob: 9a78fea8121f2a16b02681aa9eeae2493864087e [file] [log] [blame]
Chris Lattnerb36cbd02005-07-01 22:44:09 +00001//===-- X86ATTAsmPrinter.cpp - Convert X86 LLVM code to Intel assembly ----===//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains a printer that converts from our internal representation
11// of machine-dependent LLVM code to AT&T format assembly
12// language. This printer is the output mechanism used by `llc'.
13//
14//===----------------------------------------------------------------------===//
15
16#include "X86ATTAsmPrinter.h"
17#include "X86.h"
18#include "X86TargetMachine.h"
19#include "llvm/Module.h"
20#include "llvm/Support/Mangler.h"
Evan Cheng7ccced62006-02-18 00:15:05 +000021#include "llvm/Target/TargetOptions.h"
Chris Lattner2c2c6c62006-01-22 23:41:00 +000022#include <iostream>
Chris Lattnerb36cbd02005-07-01 22:44:09 +000023using namespace llvm;
Chris Lattnerb36cbd02005-07-01 22:44:09 +000024
25/// runOnMachineFunction - This uses the printMachineInstruction()
26/// method to print assembly for each instruction.
27///
28bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
Jim Laskeyea348582006-07-27 02:05:13 +000029 if (Subtarget->isTargetDarwin()) {
Jim Laskeye29c2f52006-07-19 11:54:50 +000030 // Let PassManager know we need debug information and relay
31 // the MachineDebugInfo address on to DwarfWriter.
32 DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
33 }
Evan Cheng3c992d22006-03-07 02:02:57 +000034
Chris Lattner8b8b9512005-11-21 07:51:23 +000035 SetupMachineFunction(MF);
Chris Lattnerb36cbd02005-07-01 22:44:09 +000036 O << "\n\n";
37
38 // Print out constants referenced by the function
Chris Lattnerd939f6c2005-11-21 08:32:23 +000039 EmitConstantPool(MF.getConstantPool());
Chris Lattnerb36cbd02005-07-01 22:44:09 +000040
41 // Print out labels for the function.
Evan Cheng2338c5c2006-02-07 08:38:37 +000042 const Function *F = MF.getFunction();
43 switch (F->getLinkage()) {
44 default: assert(0 && "Unknown linkage type!");
45 case Function::InternalLinkage: // Symbols default to internal.
Chris Lattnerdad9c5a2006-05-09 05:12:53 +000046 SwitchToTextSection(DefaultTextSection, F);
Evan Cheng2338c5c2006-02-07 08:38:37 +000047 EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
48 break;
49 case Function::ExternalLinkage:
Chris Lattnerdad9c5a2006-05-09 05:12:53 +000050 SwitchToTextSection(DefaultTextSection, F);
Evan Cheng2338c5c2006-02-07 08:38:37 +000051 EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
Chris Lattner272f9982005-12-16 00:07:30 +000052 O << "\t.globl\t" << CurrentFnName << "\n";
Evan Cheng2338c5c2006-02-07 08:38:37 +000053 break;
54 case Function::WeakLinkage:
55 case Function::LinkOnceLinkage:
Jim Laskeyea348582006-07-27 02:05:13 +000056 if (Subtarget->isTargetDarwin()) {
Chris Lattner4632d7a2006-05-09 04:59:56 +000057 SwitchToTextSection(
58 ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", F);
Evan Chengf1616da2006-02-22 23:59:57 +000059 O << "\t.globl\t" << CurrentFnName << "\n";
Evan Cheng2338c5c2006-02-07 08:38:37 +000060 O << "\t.weak_definition\t" << CurrentFnName << "\n";
Evan Cheng932ad512006-05-25 21:59:08 +000061 } else if (Subtarget->TargetType == X86Subtarget::isCygwin) {
62 EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
63 O << "\t.section\t.llvm.linkonce.t." << CurrentFnName
64 << ",\"ax\"\n";
65 SwitchToTextSection("", F);
66 O << "\t.weak " << CurrentFnName << "\n";
Evan Cheng2338c5c2006-02-07 08:38:37 +000067 } else {
68 EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
69 O << "\t.section\t.llvm.linkonce.t." << CurrentFnName
70 << ",\"ax\",@progbits\n";
Chris Lattner4632d7a2006-05-09 04:59:56 +000071 SwitchToTextSection("", F);
Evan Cheng2338c5c2006-02-07 08:38:37 +000072 O << "\t.weak " << CurrentFnName << "\n";
73 }
74 break;
75 }
Chris Lattnerb36cbd02005-07-01 22:44:09 +000076 O << CurrentFnName << ":\n";
77
Jim Laskeyea348582006-07-27 02:05:13 +000078 if (Subtarget->isTargetDarwin()) {
Jim Laskey6b92b8e2006-04-07 20:44:42 +000079 // Emit pre-function debug information.
Jim Laskey89d67fa2006-06-23 12:51:53 +000080 DW.BeginFunction(&MF);
Jim Laskey6b92b8e2006-04-07 20:44:42 +000081 }
82
Chris Lattnerb36cbd02005-07-01 22:44:09 +000083 // Print out code for the function.
84 for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
85 I != E; ++I) {
86 // Print a label for the basic block.
Nate Begemancdf38c42006-05-02 05:37:32 +000087 if (I->pred_begin() != I->pred_end()) {
88 printBasicBlockLabel(I, true);
89 O << '\n';
90 }
Chris Lattnerb36cbd02005-07-01 22:44:09 +000091 for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
92 II != E; ++II) {
93 // Print the assembly for the instruction.
94 O << "\t";
95 printMachineInstruction(II);
96 }
97 }
Evan Cheng67afece2006-08-28 22:14:16 +000098
99 // Print out jump tables referenced by the function
100 // Mac OS X requires at least one non-local (e.g. L1) labels before local
101 // lables that are used in jump table expressions (e.g. LBB1_1-LJT1_0).
102 EmitJumpTableInfo(MF.getJumpTableInfo());
103
Chris Lattnerac2902b2005-11-21 23:06:54 +0000104 if (HasDotTypeDotSizeDirective)
Nate Begeman73213f62005-07-12 01:37:28 +0000105 O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000106
Jim Laskeyea348582006-07-27 02:05:13 +0000107 if (Subtarget->isTargetDarwin()) {
Evan Chengd5948812006-03-07 02:23:26 +0000108 // Emit post-function debug information.
Jim Laskey99db0442006-03-23 18:09:44 +0000109 DW.EndFunction();
Evan Chengd5948812006-03-07 02:23:26 +0000110 }
Evan Cheng3c992d22006-03-07 02:02:57 +0000111
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000112 // We didn't modify anything.
113 return false;
114}
115
Chris Lattnera3b8c572006-02-06 23:41:19 +0000116void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
117 const char *Modifier) {
118 const MachineOperand &MO = MI->getOperand(OpNo);
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000119 const MRegisterInfo &RI = *TM.getRegisterInfo();
120 switch (MO.getType()) {
Evan Cheng8f7f7122006-05-05 05:40:20 +0000121 case MachineOperand::MO_Register: {
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000122 assert(MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
123 "Virtual registers should not make it this far!");
124 O << '%';
Evan Cheng8f7f7122006-05-05 05:40:20 +0000125 unsigned Reg = MO.getReg();
Evan Chengcbe70e12006-05-31 22:34:26 +0000126 if (Modifier && strncmp(Modifier, "subreg", strlen("subreg")) == 0) {
127 MVT::ValueType VT = (strcmp(Modifier,"subreg16") == 0)
Evan Cheng403be7e2006-05-08 08:01:26 +0000128 ? MVT::i16 : MVT::i8;
Evan Cheng8f7f7122006-05-05 05:40:20 +0000129 Reg = getX86SubSuperRegister(Reg, VT);
130 }
131 for (const char *Name = RI.get(Reg).Name; *Name; ++Name)
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000132 O << (char)tolower(*Name);
133 return;
Evan Cheng8f7f7122006-05-05 05:40:20 +0000134 }
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000135
Chris Lattner63b3d712006-05-04 17:21:20 +0000136 case MachineOperand::MO_Immediate:
Evan Cheng3c992d22006-03-07 02:02:57 +0000137 if (!Modifier || strcmp(Modifier, "debug") != 0)
138 O << '$';
Evan Cheng138a24e2006-05-26 08:04:31 +0000139 O << MO.getImmedValue();
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000140 return;
Nate Begeman37efe672006-04-22 18:53:45 +0000141 case MachineOperand::MO_MachineBasicBlock:
142 printBasicBlockLabel(MO.getMachineBasicBlock());
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000143 return;
Nate Begeman37efe672006-04-22 18:53:45 +0000144 case MachineOperand::MO_JumpTableIndex: {
145 bool isMemOp = Modifier && !strcmp(Modifier, "mem");
146 if (!isMemOp) O << '$';
147 O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << "_"
148 << MO.getJumpTableIndex();
Jim Laskeyea348582006-07-27 02:05:13 +0000149 if (Subtarget->isTargetDarwin() &&
Nate Begeman2f1ae882006-07-27 01:13:04 +0000150 TM.getRelocationModel() == Reloc::PIC_)
151 O << "-\"L" << getFunctionNumber() << "$pb\"";
Nate Begeman37efe672006-04-22 18:53:45 +0000152 return;
153 }
Evan Chenga09bd812006-02-26 08:28:12 +0000154 case MachineOperand::MO_ConstantPoolIndex: {
155 bool isMemOp = Modifier && !strcmp(Modifier, "mem");
156 if (!isMemOp) O << '$';
157 O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
158 << MO.getConstantPoolIndex();
Jim Laskeyea348582006-07-27 02:05:13 +0000159 if (Subtarget->isTargetDarwin() &&
Chris Lattner35d86fe2006-07-26 21:12:04 +0000160 TM.getRelocationModel() == Reloc::PIC_)
Evan Chenga09bd812006-02-26 08:28:12 +0000161 O << "-\"L" << getFunctionNumber() << "$pb\"";
162 int Offset = MO.getOffset();
163 if (Offset > 0)
164 O << "+" << Offset;
165 else if (Offset < 0)
166 O << Offset;
167 return;
168 }
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000169 case MachineOperand::MO_GlobalAddress: {
Chris Lattnera3b8c572006-02-06 23:41:19 +0000170 bool isCallOp = Modifier && !strcmp(Modifier, "call");
Evan Cheng2338c5c2006-02-07 08:38:37 +0000171 bool isMemOp = Modifier && !strcmp(Modifier, "mem");
Evan Cheng7ccced62006-02-18 00:15:05 +0000172 if (!isMemOp && !isCallOp) O << '$';
Evan Cheng2338c5c2006-02-07 08:38:37 +0000173 // Darwin block shameless ripped from PPCAsmPrinter.cpp
Jim Laskeyea348582006-07-27 02:05:13 +0000174 if (Subtarget->isTargetDarwin() &&
Evan Cheng932ad512006-05-25 21:59:08 +0000175 TM.getRelocationModel() != Reloc::Static) {
Nate Begeman72b286b2005-07-08 00:23:26 +0000176 GlobalValue *GV = MO.getGlobal();
177 std::string Name = Mang->getValueName(GV);
Evan Cheng2338c5c2006-02-07 08:38:37 +0000178 // Link-once, External, or Weakly-linked global variables need
179 // non-lazily-resolved stubs
180 if (GV->isExternal() || GV->hasWeakLinkage() ||
181 GV->hasLinkOnceLinkage()) {
182 // Dynamically-resolved functions need a stub for the function.
183 if (isCallOp && isa<Function>(GV) && cast<Function>(GV)->isExternal()) {
184 FnStubs.insert(Name);
185 O << "L" << Name << "$stub";
186 } else {
187 GVStubs.insert(Name);
188 O << "L" << Name << "$non_lazy_ptr";
189 }
Nate Begemand3a490a2005-07-12 18:34:58 +0000190 } else {
191 O << Mang->getValueName(GV);
Evan Chenga0ea0532006-02-23 02:43:52 +0000192 }
Chris Lattner35d86fe2006-07-26 21:12:04 +0000193 if (!isCallOp && TM.getRelocationModel() == Reloc::PIC_)
Evan Chenga0ea0532006-02-23 02:43:52 +0000194 O << "-\"L" << getFunctionNumber() << "$pb\"";
195 } else
Evan Cheng7ccced62006-02-18 00:15:05 +0000196 O << Mang->getValueName(MO.getGlobal());
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000197 int Offset = MO.getOffset();
198 if (Offset > 0)
199 O << "+" << Offset;
200 else if (Offset < 0)
201 O << Offset;
202 return;
203 }
Chris Lattnera3b8c572006-02-06 23:41:19 +0000204 case MachineOperand::MO_ExternalSymbol: {
205 bool isCallOp = Modifier && !strcmp(Modifier, "call");
Evan Cheng932ad512006-05-25 21:59:08 +0000206 if (isCallOp &&
Jim Laskeyea348582006-07-27 02:05:13 +0000207 Subtarget->isTargetDarwin() &&
Evan Cheng932ad512006-05-25 21:59:08 +0000208 TM.getRelocationModel() != Reloc::Static) {
Evan Cheng4c1aa862006-02-22 20:19:42 +0000209 std::string Name(GlobalPrefix);
210 Name += MO.getSymbolName();
Nate Begeman72b286b2005-07-08 00:23:26 +0000211 FnStubs.insert(Name);
212 O << "L" << Name << "$stub";
213 return;
214 }
Evan Cheng4c1aa862006-02-22 20:19:42 +0000215 if (!isCallOp) O << '$';
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000216 O << GlobalPrefix << MO.getSymbolName();
217 return;
Chris Lattnera3b8c572006-02-06 23:41:19 +0000218 }
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000219 default:
220 O << "<unknown operand type>"; return;
221 }
222}
223
Nate Begeman391c5d22005-11-30 18:54:35 +0000224void X86ATTAsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op) {
Nate Begeman6c7cb292005-07-14 22:52:25 +0000225 unsigned char value = MI->getOperand(Op).getImmedValue();
226 assert(value <= 7 && "Invalid ssecc argument!");
227 switch (value) {
228 case 0: O << "eq"; break;
229 case 1: O << "lt"; break;
230 case 2: O << "le"; break;
231 case 3: O << "unord"; break;
232 case 4: O << "neq"; break;
233 case 5: O << "nlt"; break;
234 case 6: O << "nle"; break;
235 case 7: O << "ord"; break;
236 }
237}
238
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000239void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op){
240 assert(isMem(MI, Op) && "Invalid memory reference!");
241
242 const MachineOperand &BaseReg = MI->getOperand(Op);
243 int ScaleVal = MI->getOperand(Op+1).getImmedValue();
244 const MachineOperand &IndexReg = MI->getOperand(Op+2);
245 const MachineOperand &DispSpec = MI->getOperand(Op+3);
246
247 if (BaseReg.isFrameIndex()) {
248 O << "[frame slot #" << BaseReg.getFrameIndex();
249 if (DispSpec.getImmedValue())
250 O << " + " << DispSpec.getImmedValue();
251 O << "]";
252 return;
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000253 }
254
Evan Chengc9676de2006-08-29 22:14:48 +0000255 if (DispSpec.isGlobalAddress() ||
256 DispSpec.isConstantPoolIndex() ||
257 DispSpec.isJumpTableIndex()) {
Evan Cheng2338c5c2006-02-07 08:38:37 +0000258 printOperand(MI, Op+3, "mem");
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000259 } else {
260 int DispVal = DispSpec.getImmedValue();
261 if (DispVal || (!IndexReg.getReg() && !BaseReg.getReg()))
262 O << DispVal;
263 }
264
265 if (IndexReg.getReg() || BaseReg.getReg()) {
266 O << "(";
267 if (BaseReg.getReg())
Chris Lattnera3b8c572006-02-06 23:41:19 +0000268 printOperand(MI, Op);
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000269
270 if (IndexReg.getReg()) {
271 O << ",";
Chris Lattnera3b8c572006-02-06 23:41:19 +0000272 printOperand(MI, Op+2);
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000273 if (ScaleVal != 1)
274 O << "," << ScaleVal;
275 }
276
277 O << ")";
278 }
279}
280
Evan Cheng7ccced62006-02-18 00:15:05 +0000281void X86ATTAsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op) {
282 O << "\"L" << getFunctionNumber() << "$pb\"\n";
283 O << "\"L" << getFunctionNumber() << "$pb\":";
284}
285
Evan Cheng62f27002006-04-28 23:11:40 +0000286
Evan Cheng55c25f22006-04-28 23:19:39 +0000287bool X86ATTAsmPrinter::printAsmMRegister(const MachineOperand &MO,
Evan Cheng62f27002006-04-28 23:11:40 +0000288 const char Mode) {
289 const MRegisterInfo &RI = *TM.getRegisterInfo();
290 unsigned Reg = MO.getReg();
Evan Cheng62f27002006-04-28 23:11:40 +0000291 switch (Mode) {
292 default: return true; // Unknown mode.
293 case 'b': // Print QImode register
Evan Cheng8f7f7122006-05-05 05:40:20 +0000294 Reg = getX86SubSuperRegister(Reg, MVT::i8);
Evan Cheng62f27002006-04-28 23:11:40 +0000295 break;
296 case 'h': // Print QImode high register
Evan Cheng8f7f7122006-05-05 05:40:20 +0000297 Reg = getX86SubSuperRegister(Reg, MVT::i8, true);
Evan Cheng62f27002006-04-28 23:11:40 +0000298 break;
299 case 'w': // Print HImode register
Evan Cheng8f7f7122006-05-05 05:40:20 +0000300 Reg = getX86SubSuperRegister(Reg, MVT::i16);
Evan Cheng62f27002006-04-28 23:11:40 +0000301 break;
302 case 'k': // Print SImode register
Evan Cheng8f7f7122006-05-05 05:40:20 +0000303 Reg = getX86SubSuperRegister(Reg, MVT::i32);
Evan Cheng62f27002006-04-28 23:11:40 +0000304 break;
305 }
306
Evan Cheng8f7f7122006-05-05 05:40:20 +0000307 O << '%';
308 for (const char *Name = RI.get(Reg).Name; *Name; ++Name)
309 O << (char)tolower(*Name);
Evan Cheng62f27002006-04-28 23:11:40 +0000310 return false;
311}
312
Evan Cheng3d48a902006-04-28 21:19:05 +0000313/// PrintAsmOperand - Print out an operand for an inline asm expression.
314///
315bool X86ATTAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
316 unsigned AsmVariant,
317 const char *ExtraCode) {
318 // Does this asm operand have a single letter operand modifier?
319 if (ExtraCode && ExtraCode[0]) {
320 if (ExtraCode[1] != 0) return true; // Unknown modifier.
321
322 switch (ExtraCode[0]) {
323 default: return true; // Unknown modifier.
Evan Cheng62f27002006-04-28 23:11:40 +0000324 case 'b': // Print QImode register
325 case 'h': // Print QImode high register
326 case 'w': // Print HImode register
327 case 'k': // Print SImode register
Evan Cheng55c25f22006-04-28 23:19:39 +0000328 return printAsmMRegister(MI->getOperand(OpNo), ExtraCode[0]);
Evan Cheng3d48a902006-04-28 21:19:05 +0000329 }
330 }
331
332 printOperand(MI, OpNo);
333 return false;
334}
335
336bool X86ATTAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
337 unsigned OpNo,
338 unsigned AsmVariant,
339 const char *ExtraCode) {
340 if (ExtraCode && ExtraCode[0])
341 return true; // Unknown modifier.
342 printMemReference(MI, OpNo);
343 return false;
344}
345
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000346/// printMachineInstruction -- Print out a single X86 LLVM instruction
347/// MI in Intel syntax to the current output stream.
348///
349void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
350 ++EmittedInsts;
Evan Cheng67caa392006-01-26 02:27:43 +0000351 // This works around some Darwin assembler bugs.
Jim Laskeyea348582006-07-27 02:05:13 +0000352 if (Subtarget->isTargetDarwin()) {
Evan Cheng67caa392006-01-26 02:27:43 +0000353 switch (MI->getOpcode()) {
354 case X86::REP_MOVSB:
355 O << "rep/movsb (%esi),(%edi)\n";
356 return;
357 case X86::REP_MOVSD:
358 O << "rep/movsl (%esi),(%edi)\n";
359 return;
360 case X86::REP_MOVSW:
361 O << "rep/movsw (%esi),(%edi)\n";
362 return;
363 case X86::REP_STOSB:
364 O << "rep/stosb\n";
365 return;
366 case X86::REP_STOSD:
367 O << "rep/stosl\n";
368 return;
369 case X86::REP_STOSW:
370 O << "rep/stosw\n";
371 return;
372 default:
373 break;
374 }
375 }
376
Evan Cheng8f7f7122006-05-05 05:40:20 +0000377 // See if a truncate instruction can be turned into a nop.
378 switch (MI->getOpcode()) {
379 default: break;
Evan Cheng069287d2006-05-16 07:21:53 +0000380 case X86::TRUNC_GR32_GR16:
381 case X86::TRUNC_GR32_GR8:
382 case X86::TRUNC_GR16_GR8: {
Evan Cheng8f7f7122006-05-05 05:40:20 +0000383 const MachineOperand &MO0 = MI->getOperand(0);
384 const MachineOperand &MO1 = MI->getOperand(1);
385 unsigned Reg0 = MO0.getReg();
386 unsigned Reg1 = MO1.getReg();
Evan Cheng069287d2006-05-16 07:21:53 +0000387 if (MI->getOpcode() == X86::TRUNC_GR32_GR16)
Evan Cheng403be7e2006-05-08 08:01:26 +0000388 Reg1 = getX86SubSuperRegister(Reg1, MVT::i16);
Evan Cheng8f7f7122006-05-05 05:40:20 +0000389 else
Evan Cheng403be7e2006-05-08 08:01:26 +0000390 Reg1 = getX86SubSuperRegister(Reg1, MVT::i8);
391 O << CommentString << " TRUNCATE ";
392 if (Reg0 != Reg1)
393 O << "\n\t";
Evan Cheng8f7f7122006-05-05 05:40:20 +0000394 break;
395 }
396 }
397
Chris Lattnerb36cbd02005-07-01 22:44:09 +0000398 // Call the autogenerated instruction printer routines.
399 printInstruction(MI);
400}
401
402// Include the auto-generated portion of the assembly writer.
403#include "X86GenAsmWriter.inc"
404