Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp

Issue 15067009: LLVM: Add ELF Note section to NaCl object files identifying them as such to gold (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: reviews, and add initialization to llvm-mc Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698