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

Side by Side Diff: lib/Target/X86/X86AsmPrinter.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: 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 //===-- X86AsmPrinter.cpp - Convert X86 LLVM code to AT&T assembly --------===// 1 //===-- X86AsmPrinter.cpp - Convert X86 LLVM code to AT&T assembly --------===//
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 contains a printer that converts from our internal representation 10 // This file contains a printer that converts from our internal representation
(...skipping 13 matching lines...) Expand all
24 #include "llvm/CodeGen/MachineModuleInfoImpls.h" 24 #include "llvm/CodeGen/MachineModuleInfoImpls.h"
25 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" 25 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
26 #include "llvm/DebugInfo.h" 26 #include "llvm/DebugInfo.h"
27 #include "llvm/IR/CallingConv.h" 27 #include "llvm/IR/CallingConv.h"
28 #include "llvm/IR/DerivedTypes.h" 28 #include "llvm/IR/DerivedTypes.h"
29 #include "llvm/IR/Module.h" 29 #include "llvm/IR/Module.h"
30 #include "llvm/IR/Type.h" 30 #include "llvm/IR/Type.h"
31 #include "llvm/MC/MCAsmInfo.h" 31 #include "llvm/MC/MCAsmInfo.h"
32 #include "llvm/MC/MCContext.h" 32 #include "llvm/MC/MCContext.h"
33 #include "llvm/MC/MCExpr.h" 33 #include "llvm/MC/MCExpr.h"
34 #include "llvm/MC/MCNaCl.h"
34 #include "llvm/MC/MCSectionMachO.h" 35 #include "llvm/MC/MCSectionMachO.h"
35 #include "llvm/MC/MCStreamer.h" 36 #include "llvm/MC/MCStreamer.h"
36 #include "llvm/MC/MCSymbol.h" 37 #include "llvm/MC/MCSymbol.h"
37 #include "llvm/Support/COFF.h" 38 #include "llvm/Support/COFF.h"
38 #include "llvm/Support/Debug.h" 39 #include "llvm/Support/Debug.h"
39 #include "llvm/Support/ErrorHandling.h" 40 #include "llvm/Support/ErrorHandling.h"
40 #include "llvm/Support/TargetRegistry.h" 41 #include "llvm/Support/TargetRegistry.h"
41 #include "llvm/Target/Mangler.h" 42 #include "llvm/Target/Mangler.h"
42 #include "llvm/Target/TargetOptions.h" 43 #include "llvm/Target/TargetOptions.h"
43 using namespace llvm; 44 using namespace llvm;
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 return false; 541 return false;
541 } 542 }
542 } 543 }
543 printMemReference(MI, OpNo, O); 544 printMemReference(MI, OpNo, O);
544 return false; 545 return false;
545 } 546 }
546 547
547 void X86AsmPrinter::EmitStartOfAsmFile(Module &M) { 548 void X86AsmPrinter::EmitStartOfAsmFile(Module &M) {
548 if (Subtarget->isTargetEnvMacho()) 549 if (Subtarget->isTargetEnvMacho())
549 OutStreamer.SwitchSection(getObjFileLowering().getTextSection()); 550 OutStreamer.SwitchSection(getObjFileLowering().getTextSection());
551 // @LOCALMOD-BEGIN
552 if (Subtarget->isTargetNaCl())
553 initializeNaClMCStreamer(OutStreamer, OutContext,
554 Subtarget->getTargetTriple());
555 // @LOCALMOD-END
550 } 556 }
551 557
552 558
553 void X86AsmPrinter::EmitEndOfAsmFile(Module &M) { 559 void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
554 if (Subtarget->isTargetEnvMacho()) { 560 if (Subtarget->isTargetEnvMacho()) {
555 // All darwin targets use mach-o. 561 // All darwin targets use mach-o.
556 MachineModuleInfoMachO &MMIMacho = 562 MachineModuleInfoMachO &MMIMacho =
557 MMI->getObjFileInfo<MachineModuleInfoMachO>(); 563 MMI->getObjFileInfo<MachineModuleInfoMachO>();
558 564
559 // Output stubs for dynamically-linked functions. 565 // Output stubs for dynamically-linked functions.
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 781
776 //===----------------------------------------------------------------------===// 782 //===----------------------------------------------------------------------===//
777 // Target Registry Stuff 783 // Target Registry Stuff
778 //===----------------------------------------------------------------------===// 784 //===----------------------------------------------------------------------===//
779 785
780 // Force static initialization. 786 // Force static initialization.
781 extern "C" void LLVMInitializeX86AsmPrinter() { 787 extern "C" void LLVMInitializeX86AsmPrinter() {
782 RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target); 788 RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
783 RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target); 789 RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
784 } 790 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698