blob: fc3dd5feeb8e022347b1fdade31a32597496ae5e [file] [log] [blame]
Che-Liang Chioud77f2a42010-11-08 02:58:44 +00001//===- lib/Target/PTX/PTXMCAsmStreamer.cpp - PTX Text Assembly Output -----===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000010#include "llvm/ADT/OwningPtr.h"
11#include "llvm/ADT/SmallString.h"
12#include "llvm/ADT/Twine.h"
Che-Liang Chioud77f2a42010-11-08 02:58:44 +000013#include "llvm/MC/MCAsmInfo.h"
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000014#include "llvm/MC/MCCodeEmitter.h"
Che-Liang Chioufc7072c2010-12-22 10:38:51 +000015#include "llvm/MC/MCContext.h"
Che-Liang Chioud77f2a42010-11-08 02:58:44 +000016#include "llvm/MC/MCExpr.h"
17#include "llvm/MC/MCInst.h"
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000018#include "llvm/MC/MCInstPrinter.h"
19#include "llvm/MC/MCStreamer.h"
Che-Liang Chioud77f2a42010-11-08 02:58:44 +000020#include "llvm/MC/MCSymbol.h"
Che-Liang Chioud77f2a42010-11-08 02:58:44 +000021#include "llvm/Support/ErrorHandling.h"
22#include "llvm/Support/MathExtras.h"
23#include "llvm/Support/Format.h"
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000024#include "llvm/Support/FormattedStream.h"
25#include "llvm/Support/raw_ostream.h"
Rafael Espindola89b93722010-12-10 07:39:47 +000026#include "llvm/Target/TargetAsmInfo.h"
Che-Liang Chioud77f2a42010-11-08 02:58:44 +000027
28using namespace llvm;
29
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000030namespace {
31class PTXMCAsmStreamer : public MCStreamer {
32 formatted_raw_ostream &OS;
33 const MCAsmInfo &MAI;
34 OwningPtr<MCInstPrinter> InstPrinter;
35 OwningPtr<MCCodeEmitter> Emitter;
36
37 SmallString<128> CommentToEmit;
38 raw_svector_ostream CommentStream;
39
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000040 unsigned IsVerboseAsm : 1;
41 unsigned ShowInst : 1;
42
43public:
44 PTXMCAsmStreamer(MCContext &Context,
45 formatted_raw_ostream &os,
Rafael Espindola89b93722010-12-10 07:39:47 +000046 bool isVerboseAsm, bool useLoc,
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000047 MCInstPrinter *printer,
48 MCCodeEmitter *emitter,
49 bool showInst)
50 : MCStreamer(Context), OS(os), MAI(Context.getAsmInfo()),
51 InstPrinter(printer), Emitter(emitter), CommentStream(CommentToEmit),
Rafael Espindola89b93722010-12-10 07:39:47 +000052 IsVerboseAsm(isVerboseAsm),
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000053 ShowInst(showInst) {
54 if (InstPrinter && IsVerboseAsm)
55 InstPrinter->setCommentStream(CommentStream);
56 }
57
58 ~PTXMCAsmStreamer() {}
59
Rafael Espindolaa484f2c2010-11-28 14:48:34 +000060 inline void EmitEOL() {
61 // If we don't have any comments, just emit a \n.
62 if (!IsVerboseAsm) {
63 OS << '\n';
64 return;
65 }
66 EmitCommentsAndEOL();
67 }
68 void EmitCommentsAndEOL();
69
70 /// isVerboseAsm - Return true if this streamer supports verbose assembly at
71 /// all.
72 virtual bool isVerboseAsm() const { return IsVerboseAsm; }
73
74 /// hasRawTextSupport - We support EmitRawText.
75 virtual bool hasRawTextSupport() const { return true; }
76
77 /// AddComment - Add a comment that can be emitted to the generated .s
78 /// file if applicable as a QoI issue to make the output of the compiler
79 /// more readable. This only affects the MCAsmStreamer, and only when
80 /// verbose assembly output is enabled.
81 virtual void AddComment(const Twine &T);
82
83 /// AddEncodingComment - Add a comment showing the encoding of an instruction.
84 virtual void AddEncodingComment(const MCInst &Inst);
85
86 /// GetCommentOS - Return a raw_ostream that comments can be written to.
87 /// Unlike AddComment, you are required to terminate comments with \n if you
88 /// use this method.
89 virtual raw_ostream &GetCommentOS() {
90 if (!IsVerboseAsm)
91 return nulls(); // Discard comments unless in verbose asm mode.
92 return CommentStream;
93 }
94
95 /// AddBlankLine - Emit a blank line to a .s file to pretty it up.
96 virtual void AddBlankLine() {
97 EmitEOL();
98 }
99
100 /// @name MCStreamer Interface
101 /// @{
102
103 virtual void SwitchSection(const MCSection *Section);
104
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000105 virtual void InitSections() {}
Rafael Espindolaa484f2c2010-11-28 14:48:34 +0000106
107 virtual void EmitLabel(MCSymbol *Symbol);
108
109 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
110
111 virtual void EmitThumbFunc(MCSymbol *Func);
112
113 virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value);
114
115 virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
116
Rafael Espindola32a006e2010-12-03 00:55:40 +0000117 virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
118 const MCSymbol *LastLabel,
119 const MCSymbol *Label);
120
Rafael Espindolaa484f2c2010-11-28 14:48:34 +0000121 virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
122
123 virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
124 virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol);
125 virtual void EmitCOFFSymbolStorageClass(int StorageClass);
126 virtual void EmitCOFFSymbolType(int Type);
127 virtual void EndCOFFSymbolDef();
128 virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value);
129 virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
130 unsigned ByteAlignment);
131
132 /// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
133 ///
134 /// @param Symbol - The common symbol to emit.
135 /// @param Size - The size of the common symbol.
136 virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size);
137
138 virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
139 unsigned Size = 0, unsigned ByteAlignment = 0);
140
141 virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
142 uint64_t Size, unsigned ByteAlignment = 0);
143
144 virtual void EmitBytes(StringRef Data, unsigned AddrSpace);
145
Rafael Espindola89b93722010-12-10 07:39:47 +0000146 virtual void EmitValueImpl(const MCExpr *Value, unsigned Size,
147 bool isPCRel, unsigned AddrSpace);
Rafael Espindolaa484f2c2010-11-28 14:48:34 +0000148 virtual void EmitULEB128Value(const MCExpr *Value, unsigned AddrSpace = 0);
149 virtual void EmitSLEB128Value(const MCExpr *Value, unsigned AddrSpace = 0);
150 virtual void EmitGPRel32Value(const MCExpr *Value);
151
152
153 virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue,
154 unsigned AddrSpace);
155
156 virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
157 unsigned ValueSize = 1,
158 unsigned MaxBytesToEmit = 0);
159
160 virtual void EmitCodeAlignment(unsigned ByteAlignment,
161 unsigned MaxBytesToEmit = 0);
162
163 virtual void EmitValueToOffset(const MCExpr *Offset,
164 unsigned char Value = 0);
165
166 virtual void EmitFileDirective(StringRef Filename);
167 virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Filename);
168
169 virtual void EmitInstruction(const MCInst &Inst);
170
171 /// EmitRawText - If this file is backed by an assembly streamer, this dumps
172 /// the specified string in the output .s file. This capability is
173 /// indicated by the hasRawTextSupport() predicate.
174 virtual void EmitRawText(StringRef String);
175
176 virtual void Finish();
177
178 /// @}
179
180}; // class PTXMCAsmStreamer
181
182}
183
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000184/// TODO: Add appropriate implementation of Emit*() methods when needed
185
186void PTXMCAsmStreamer::AddComment(const Twine &T) {
187 if (!IsVerboseAsm) return;
188
189 // Make sure that CommentStream is flushed.
190 CommentStream.flush();
191
192 T.toVector(CommentToEmit);
193 // Each comment goes on its own line.
194 CommentToEmit.push_back('\n');
195
196 // Tell the comment stream that the vector changed underneath it.
197 CommentStream.resync();
198}
199
200void PTXMCAsmStreamer::EmitCommentsAndEOL() {
201 if (CommentToEmit.empty() && CommentStream.GetNumBytesInBuffer() == 0) {
202 OS << '\n';
203 return;
204 }
205
206 CommentStream.flush();
207 StringRef Comments = CommentToEmit.str();
208
209 assert(Comments.back() == '\n' &&
210 "Comment array not newline terminated");
211 do {
212 // Emit a line of comments.
213 OS.PadToColumn(MAI.getCommentColumn());
214 size_t Position = Comments.find('\n');
215 OS << MAI.getCommentString() << ' ' << Comments.substr(0, Position) << '\n';
216
217 Comments = Comments.substr(Position+1);
218 } while (!Comments.empty());
219
220 CommentToEmit.clear();
221 // Tell the comment stream that the vector changed underneath it.
222 CommentStream.resync();
223}
224
225static inline int64_t truncateToSize(int64_t Value, unsigned Bytes) {
226 assert(Bytes && "Invalid size!");
227 return Value & ((uint64_t) (int64_t) -1 >> (64 - Bytes * 8));
228}
229
230void PTXMCAsmStreamer::SwitchSection(const MCSection *Section) {
231 assert(Section && "Cannot switch to a null section!");
232 if (Section != CurSection) {
233 PrevSection = CurSection;
234 CurSection = Section;
235 }
236}
237
238void PTXMCAsmStreamer::EmitLabel(MCSymbol *Symbol) {
239 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
240 assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
241 assert(CurSection && "Cannot emit before setting section!");
242
243 OS << *Symbol << MAI.getLabelSuffix();
244 EmitEOL();
245 Symbol->setSection(*CurSection);
246}
247
248void PTXMCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {}
249
250void PTXMCAsmStreamer::EmitThumbFunc(MCSymbol *Func) {}
251
252void PTXMCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
253 OS << *Symbol << " = " << *Value;
254 EmitEOL();
255
256 // FIXME: Lift context changes into super class.
257 Symbol->setVariableValue(Value);
258}
259
260void PTXMCAsmStreamer::EmitWeakReference(MCSymbol *Alias,
261 const MCSymbol *Symbol) {
262 OS << ".weakref " << *Alias << ", " << *Symbol;
263 EmitEOL();
264}
265
Rafael Espindola32a006e2010-12-03 00:55:40 +0000266void PTXMCAsmStreamer::EmitDwarfAdvanceLineAddr(int64_t LineDelta,
267 const MCSymbol *LastLabel,
268 const MCSymbol *Label) {
269 report_fatal_error("Unimplemented.");
270}
271
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000272void PTXMCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
273 MCSymbolAttr Attribute) {}
274
275void PTXMCAsmStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
276
277void PTXMCAsmStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) {}
278
279void PTXMCAsmStreamer::EmitCOFFSymbolStorageClass (int StorageClass) {}
280
281void PTXMCAsmStreamer::EmitCOFFSymbolType (int Type) {}
282
283void PTXMCAsmStreamer::EndCOFFSymbolDef() {}
284
285void PTXMCAsmStreamer::EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {}
286
287void PTXMCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
288 unsigned ByteAlignment) {}
289
290void PTXMCAsmStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) {}
291
292void PTXMCAsmStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
293 unsigned Size, unsigned ByteAlignment) {}
294
295void PTXMCAsmStreamer::EmitTBSSSymbol(const MCSection *Section,
296 MCSymbol *Symbol,
297 uint64_t Size, unsigned ByteAlignment) {}
298
299static inline char toOctal(int X) { return (X&7)+'0'; }
300
301static void PrintQuotedString(StringRef Data, raw_ostream &OS) {
302 OS << '"';
303
304 for (unsigned i = 0, e = Data.size(); i != e; ++i) {
305 unsigned char C = Data[i];
306 if (C == '"' || C == '\\') {
307 OS << '\\' << (char)C;
308 continue;
309 }
310
311 if (isprint((unsigned char)C)) {
312 OS << (char)C;
313 continue;
314 }
315
316 switch (C) {
317 case '\b': OS << "\\b"; break;
318 case '\f': OS << "\\f"; break;
319 case '\n': OS << "\\n"; break;
320 case '\r': OS << "\\r"; break;
321 case '\t': OS << "\\t"; break;
322 default:
323 OS << '\\';
324 OS << toOctal(C >> 6);
325 OS << toOctal(C >> 3);
326 OS << toOctal(C >> 0);
327 break;
328 }
329 }
330
331 OS << '"';
332}
333
334void PTXMCAsmStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
335 assert(CurSection && "Cannot emit contents before setting section!");
336 if (Data.empty()) return;
337
338 if (Data.size() == 1) {
339 OS << MAI.getData8bitsDirective(AddrSpace);
340 OS << (unsigned)(unsigned char)Data[0];
341 EmitEOL();
342 return;
343 }
344
345 // If the data ends with 0 and the target supports .asciz, use it, otherwise
346 // use .ascii
347 if (MAI.getAscizDirective() && Data.back() == 0) {
348 OS << MAI.getAscizDirective();
349 Data = Data.substr(0, Data.size()-1);
350 } else {
351 OS << MAI.getAsciiDirective();
352 }
353
354 OS << ' ';
355 PrintQuotedString(Data, OS);
356 EmitEOL();
357}
358
Rafael Espindola89b93722010-12-10 07:39:47 +0000359void PTXMCAsmStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
360 bool isPCRel, unsigned AddrSpace) {
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000361 assert(CurSection && "Cannot emit contents before setting section!");
Rafael Espindola89b93722010-12-10 07:39:47 +0000362 assert(!isPCRel && "Cannot emit pc relative relocations!");
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000363 const char *Directive = 0;
364 switch (Size) {
365 default: break;
366 case 1: Directive = MAI.getData8bitsDirective(AddrSpace); break;
367 case 2: Directive = MAI.getData16bitsDirective(AddrSpace); break;
368 case 4: Directive = MAI.getData32bitsDirective(AddrSpace); break;
369 case 8:
370 Directive = MAI.getData64bitsDirective(AddrSpace);
371 // If the target doesn't support 64-bit data, emit as two 32-bit halves.
372 if (Directive) break;
Rafael Espindolaec0b4282010-11-28 23:22:44 +0000373 int64_t IntValue;
374 if (!Value->EvaluateAsAbsolute(IntValue))
375 report_fatal_error("Don't know how to emit this value.");
Rafael Espindola89b93722010-12-10 07:39:47 +0000376 if (getContext().getTargetAsmInfo().isLittleEndian()) {
Rafael Espindolaec0b4282010-11-28 23:22:44 +0000377 EmitIntValue((uint32_t)(IntValue >> 0 ), 4, AddrSpace);
378 EmitIntValue((uint32_t)(IntValue >> 32), 4, AddrSpace);
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000379 } else {
Rafael Espindolaec0b4282010-11-28 23:22:44 +0000380 EmitIntValue((uint32_t)(IntValue >> 32), 4, AddrSpace);
381 EmitIntValue((uint32_t)(IntValue >> 0 ), 4, AddrSpace);
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000382 }
383 return;
384 }
385
386 assert(Directive && "Invalid size for machine code value!");
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000387 OS << Directive << *Value;
388 EmitEOL();
389}
390
391void PTXMCAsmStreamer::EmitULEB128Value(const MCExpr *Value,
392 unsigned AddrSpace) {
393 assert(MAI.hasLEB128() && "Cannot print a .uleb");
394 OS << ".uleb128 " << *Value;
395 EmitEOL();
396}
397
398void PTXMCAsmStreamer::EmitSLEB128Value(const MCExpr *Value,
399 unsigned AddrSpace) {
400 assert(MAI.hasLEB128() && "Cannot print a .sleb");
401 OS << ".sleb128 " << *Value;
402 EmitEOL();
403}
404
405void PTXMCAsmStreamer::EmitGPRel32Value(const MCExpr *Value) {
406 assert(MAI.getGPRel32Directive() != 0);
407 OS << MAI.getGPRel32Directive() << *Value;
408 EmitEOL();
409}
410
411
412/// EmitFill - Emit NumBytes bytes worth of the value specified by
413/// FillValue. This implements directives such as '.space'.
414void PTXMCAsmStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue,
415 unsigned AddrSpace) {
416 if (NumBytes == 0) return;
417
418 if (AddrSpace == 0)
419 if (const char *ZeroDirective = MAI.getZeroDirective()) {
420 OS << ZeroDirective << NumBytes;
421 if (FillValue != 0)
422 OS << ',' << (int)FillValue;
423 EmitEOL();
424 return;
425 }
426
427 // Emit a byte at a time.
428 MCStreamer::EmitFill(NumBytes, FillValue, AddrSpace);
429}
430
431void PTXMCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value,
432 unsigned ValueSize,
433 unsigned MaxBytesToEmit) {
434 // Some assemblers don't support non-power of two alignments, so we always
435 // emit alignments as a power of two if possible.
436 if (isPowerOf2_32(ByteAlignment)) {
437 switch (ValueSize) {
438 default: llvm_unreachable("Invalid size for machine code value!");
439 case 1: OS << MAI.getAlignDirective(); break;
440 // FIXME: use MAI for this!
441 case 2: OS << ".p2alignw "; break;
442 case 4: OS << ".p2alignl "; break;
443 case 8: llvm_unreachable("Unsupported alignment size!");
444 }
445
446 if (MAI.getAlignmentIsInBytes())
447 OS << ByteAlignment;
448 else
449 OS << Log2_32(ByteAlignment);
450
451 if (Value || MaxBytesToEmit) {
452 OS << ", 0x";
453 OS.write_hex(truncateToSize(Value, ValueSize));
454
455 if (MaxBytesToEmit)
456 OS << ", " << MaxBytesToEmit;
457 }
458 EmitEOL();
459 return;
460 }
461
462 // Non-power of two alignment. This is not widely supported by assemblers.
463 // FIXME: Parameterize this based on MAI.
464 switch (ValueSize) {
465 default: llvm_unreachable("Invalid size for machine code value!");
466 case 1: OS << ".balign"; break;
467 case 2: OS << ".balignw"; break;
468 case 4: OS << ".balignl"; break;
469 case 8: llvm_unreachable("Unsupported alignment size!");
470 }
471
472 OS << ' ' << ByteAlignment;
473 OS << ", " << truncateToSize(Value, ValueSize);
474 if (MaxBytesToEmit)
475 OS << ", " << MaxBytesToEmit;
476 EmitEOL();
477}
478
479void PTXMCAsmStreamer::EmitCodeAlignment(unsigned ByteAlignment,
480 unsigned MaxBytesToEmit) {}
481
482void PTXMCAsmStreamer::EmitValueToOffset(const MCExpr *Offset,
483 unsigned char Value) {}
484
485
486void PTXMCAsmStreamer::EmitFileDirective(StringRef Filename) {
487 assert(MAI.hasSingleParameterDotFile());
488 OS << "\t.file\t";
489 PrintQuotedString(Filename, OS);
490 EmitEOL();
491}
492
Rafael Espindolaaf6b58082010-11-16 21:20:32 +0000493// FIXME: should we inherit from MCAsmStreamer?
494bool PTXMCAsmStreamer::EmitDwarfFileDirective(unsigned FileNo,
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000495 StringRef Filename){
496 OS << "\t.file\t" << FileNo << ' ';
497 PrintQuotedString(Filename, OS);
498 EmitEOL();
Rafael Espindolaaf6b58082010-11-16 21:20:32 +0000499 return this->MCStreamer::EmitDwarfFileDirective(FileNo, Filename);
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000500}
501
502void PTXMCAsmStreamer::AddEncodingComment(const MCInst &Inst) {}
503
504void PTXMCAsmStreamer::EmitInstruction(const MCInst &Inst) {
505 assert(CurSection && "Cannot emit contents before setting section!");
506
507 // Show the encoding in a comment if we have a code emitter.
508 if (Emitter)
509 AddEncodingComment(Inst);
510
511 // Show the MCInst if enabled.
512 if (ShowInst) {
513 Inst.dump_pretty(GetCommentOS(), &MAI, InstPrinter.get(), "\n ");
514 GetCommentOS() << "\n";
515 }
516
517 // If we have an AsmPrinter, use that to print, otherwise print the MCInst.
518 if (InstPrinter)
519 InstPrinter->printInst(&Inst, OS);
520 else
521 Inst.print(OS, &MAI);
522 EmitEOL();
523}
524
525/// EmitRawText - If this file is backed by an assembly streamer, this dumps
526/// the specified string in the output .s file. This capability is
527/// indicated by the hasRawTextSupport() predicate.
528void PTXMCAsmStreamer::EmitRawText(StringRef String) {
529 if (!String.empty() && String.back() == '\n')
530 String = String.substr(0, String.size()-1);
531 OS << String;
532 EmitEOL();
533}
534
535void PTXMCAsmStreamer::Finish() {}
536
Rafael Espindolaa484f2c2010-11-28 14:48:34 +0000537namespace llvm {
538 MCStreamer *createPTXAsmStreamer(MCContext &Context,
539 formatted_raw_ostream &OS,
Rafael Espindola89b93722010-12-10 07:39:47 +0000540 bool isVerboseAsm, bool useLoc,
541 MCInstPrinter *IP,
Daniel Dunbar745dacc2010-12-16 03:05:59 +0000542 MCCodeEmitter *CE, TargetAsmBackend *TAB,
543 bool ShowInst) {
Rafael Espindola89b93722010-12-10 07:39:47 +0000544 return new PTXMCAsmStreamer(Context, OS, isVerboseAsm, useLoc,
Rafael Espindolaa484f2c2010-11-28 14:48:34 +0000545 IP, CE, ShowInst);
546 }
Che-Liang Chioud77f2a42010-11-08 02:58:44 +0000547}