OLD | NEW |
1 //===-- X86MCTargetDesc.cpp - X86 Target Descriptions ---------------------===// | 1 //===-- X86MCTargetDesc.cpp - X86 Target Descriptions ---------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file provides X86 specific target descriptions. | 10 // This file provides X86 specific target descriptions. |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 bool RelaxAll, | 359 bool RelaxAll, |
360 bool NoExecStack) { | 360 bool NoExecStack) { |
361 Triple TheTriple(TT); | 361 Triple TheTriple(TT); |
362 | 362 |
363 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) | 363 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) |
364 return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); | 364 return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); |
365 | 365 |
366 if (TheTriple.isOSWindows() && TheTriple.getEnvironment() != Triple::ELF) | 366 if (TheTriple.isOSWindows() && TheTriple.getEnvironment() != Triple::ELF) |
367 return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); | 367 return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); |
368 | 368 |
369 // @LOCALMOD-BEGIN | 369 return createELFStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll, NoExecStack); |
370 MCStreamer *Streamer = createELFStreamer(Ctx, MAB, _OS, _Emitter, | |
371 RelaxAll, NoExecStack); | |
372 if (TheTriple.isOSNaCl()) | |
373 Streamer->EmitBundleAlignMode(5); | |
374 | |
375 return Streamer; | |
376 // @LOCALMOD-END | |
377 } | 370 } |
378 | 371 |
379 static MCInstPrinter *createX86MCInstPrinter(const Target &T, | 372 static MCInstPrinter *createX86MCInstPrinter(const Target &T, |
380 unsigned SyntaxVariant, | 373 unsigned SyntaxVariant, |
381 const MCAsmInfo &MAI, | 374 const MCAsmInfo &MAI, |
382 const MCInstrInfo &MII, | 375 const MCInstrInfo &MII, |
383 const MCRegisterInfo &MRI, | 376 const MCRegisterInfo &MRI, |
384 const MCSubtargetInfo &STI) { | 377 const MCSubtargetInfo &STI) { |
385 if (SyntaxVariant == 0) | 378 if (SyntaxVariant == 0) |
386 return new X86ATTInstPrinter(MAI, MII, MRI); | 379 return new X86ATTInstPrinter(MAI, MII, MRI); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 createMCStreamer); | 433 createMCStreamer); |
441 TargetRegistry::RegisterMCObjectStreamer(TheX86_64Target, | 434 TargetRegistry::RegisterMCObjectStreamer(TheX86_64Target, |
442 createMCStreamer); | 435 createMCStreamer); |
443 | 436 |
444 // Register the MCInstPrinter. | 437 // Register the MCInstPrinter. |
445 TargetRegistry::RegisterMCInstPrinter(TheX86_32Target, | 438 TargetRegistry::RegisterMCInstPrinter(TheX86_32Target, |
446 createX86MCInstPrinter); | 439 createX86MCInstPrinter); |
447 TargetRegistry::RegisterMCInstPrinter(TheX86_64Target, | 440 TargetRegistry::RegisterMCInstPrinter(TheX86_64Target, |
448 createX86MCInstPrinter); | 441 createX86MCInstPrinter); |
449 } | 442 } |
OLD | NEW |