llvm.org GIT mirror llvm / 1abf2cb
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 8 years ago
118 changed file(s) with 1264 addition(s) and 1161 deletion(s). Raw diff Collapse all Expand all
657657 [LLVM architecture name for the native architecture, if available])
658658 LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
659659 LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
660 LLVM_NATIVE_MCASMINFO="LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo"
660661 LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
661662 if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
662663 LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
665666 [LLVM name for the native Target init function, if available])
666667 AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO,
667668 [LLVM name for the native TargetInfo init function, if available])
669 AC_DEFINE_UNQUOTED(LLVM_NATIVE_MCASMINFO, $LLVM_NATIVE_MCASMINFO,
670 [LLVM name for the native MCAsmInfo init function, if available])
668671 AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER,
669672 [LLVM name for the native AsmPrinter init function, if available])
670673 if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
335335 message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}")
336336 set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
337337 set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
338 set(LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo)
338339 set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
339340 endif ()
340341
51195119
51205120 LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
51215121 LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
5122 LLVM_NATIVE_MCASMINFO="LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo"
51225123 LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
51235124 if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
51245125 LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
51315132
51325133 cat >>confdefs.h <<_ACEOF
51335134 #define LLVM_NATIVE_TARGETINFO $LLVM_NATIVE_TARGETINFO
5135 _ACEOF
5136
5137
5138 cat >>confdefs.h <<_ACEOF
5139 #define LLVM_NATIVE_MCASMINFO $LLVM_NATIVE_MCASMINFO
51345140 _ACEOF
51355141
51365142
555555
556556 /* LLVM name for the native TargetInfo init function, if available */
557557 #cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
558
559 /* LLVM name for the native MCAsmInfo init function, if available */
560 #cmakedefine LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo
558561
559562 /* Define if this is Unixish platform */
560563 #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
572572 /* LLVM name for the native AsmPrinter init function, if available */
573573 #undef LLVM_NATIVE_ASMPRINTER
574574
575 /* LLVM name for the native MCAsmInfo init function, if available */
576 #undef LLVM_NATIVE_MCASMINFO
577
575578 /* LLVM name for the native Target init function, if available */
576579 #undef LLVM_NATIVE_TARGET
577580
5757 /* LLVM name for the native TargetInfo init function, if available */
5858 #cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
5959
60 /* LLVM name for the native MCAsmInfo init function, if available */
61 #cmakedefine LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo
62
6063 /* LLVM name for the native AsmPrinter init function, if available */
6164 #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter
6265
5757 /* LLVM name for the native TargetInfo init function, if available */
5858 #undef LLVM_NATIVE_TARGETINFO
5959
60 /* LLVM name for the native MCAsmInfo init function, if available */
61 #undef LLVM_NATIVE_MCASMINFO
62
6063 /* LLVM name for the native AsmPrinter init function, if available */
6164 #undef LLVM_NATIVE_ASMPRINTER
6265
6565
6666 typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT);
6767
68 typedef MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T,
69 StringRef TT);
68 typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const Target &T,
69 StringRef TT);
7070 typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void);
7171 typedef MCRegisterInfo *(*MCRegInfoCtorFnTy)(void);
7272 typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT,
127127 /// HasJIT - Whether this target supports the JIT.
128128 bool HasJIT;
129129
130 /// AsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
130 /// MCAsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
131131 /// registered.
132 AsmInfoCtorFnTy AsmInfoCtorFn;
132 MCAsmInfoCtorFnTy MCAsmInfoCtorFn;
133133
134134 /// MCInstrInfoCtorFn - Constructor function for this target's MCInstrInfo,
135135 /// if registered.
239239 /// @name Feature Constructors
240240 /// @{
241241
242 /// createAsmInfo - Create a MCAsmInfo implementation for the specified
242 /// createMCAsmInfo - Create a MCAsmInfo implementation for the specified
243243 /// target triple.
244244 ///
245245 /// \arg Triple - This argument is used to determine the target machine
246246 /// feature set; it should always be provided. Generally this should be
247247 /// either the target triple from the module, or the target triple of the
248248 /// host if that does not exist.
249 MCAsmInfo *createAsmInfo(StringRef Triple) const {
250 if (!AsmInfoCtorFn)
251 return 0;
252 return AsmInfoCtorFn(*this, Triple);
249 MCAsmInfo *createMCAsmInfo(StringRef Triple) const {
250 if (!MCAsmInfoCtorFn)
251 return 0;
252 return MCAsmInfoCtorFn(*this, Triple);
253253 }
254254
255255 /// createMCInstrInfo - Create a MCInstrInfo implementation.
484484 Target::TripleMatchQualityFnTy TQualityFn,
485485 bool HasJIT = false);
486486
487 /// RegisterAsmInfo - Register a MCAsmInfo implementation for the
487 /// RegisterMCAsmInfo - Register a MCAsmInfo implementation for the
488488 /// given target.
489489 ///
490490 /// Clients are responsible for ensuring that registration doesn't occur
493493 ///
494494 /// @param T - The target being registered.
495495 /// @param Fn - A function to construct a MCAsmInfo for the target.
496 static void RegisterAsmInfo(Target &T, Target::AsmInfoCtorFnTy Fn) {
496 static void RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
497497 // Ignore duplicate registration.
498 if (!T.AsmInfoCtorFn)
499 T.AsmInfoCtorFn = Fn;
498 if (!T.MCAsmInfoCtorFn)
499 T.MCAsmInfoCtorFn = Fn;
500500 }
501501
502502 /// RegisterMCInstrInfo - Register a MCInstrInfo implementation for the
721721 }
722722 };
723723
724 /// RegisterAsmInfo - Helper template for registering a target assembly info
724 /// RegisterMCAsmInfo - Helper template for registering a target assembly info
725725 /// implementation. This invokes the static "Create" method on the class to
726726 /// actually do the construction. Usage:
727727 ///
728728 /// extern "C" void LLVMInitializeFooTarget() {
729729 /// extern Target TheFooTarget;
730 /// RegisterAsmInfo X(TheFooTarget);
730 /// RegisterMCAsmInfo X(TheFooTarget);
731731 /// }
732732 template
733 struct RegisterAsmInfo {
734 RegisterAsmInfo(Target &T) {
735 TargetRegistry::RegisterAsmInfo(T, &Allocator);
733 struct RegisterMCAsmInfo {
734 RegisterMCAsmInfo(Target &T) {
735 TargetRegistry::RegisterMCAsmInfo(T, &Allocator);
736736 }
737737 private:
738738 static MCAsmInfo *Allocator(const Target &T, StringRef TT) {
741741
742742 };
743743
744 /// RegisterAsmInfoFn - Helper template for registering a target assembly info
744 /// RegisterMCAsmInfoFn - Helper template for registering a target assembly info
745745 /// implementation. This invokes the specified function to do the
746746 /// construction. Usage:
747747 ///
748748 /// extern "C" void LLVMInitializeFooTarget() {
749749 /// extern Target TheFooTarget;
750 /// RegisterAsmInfoFn X(TheFooTarget, TheFunction);
751 /// }
752 struct RegisterAsmInfoFn {
753 RegisterAsmInfoFn(Target &T, Target::AsmInfoCtorFnTy Fn) {
754 TargetRegistry::RegisterAsmInfo(T, Fn);
750 /// RegisterMCAsmInfoFn X(TheFooTarget, TheFunction);
751 /// }
752 struct RegisterMCAsmInfoFn {
753 RegisterMCAsmInfoFn(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
754 TargetRegistry::RegisterMCAsmInfo(T, Fn);
755755 }
756756 };
757757
2525 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
2626 #include "llvm/Config/Targets.def"
2727
28 #define LLVM_TARGET(TargetName) \
29 void LLVMInitialize##TargetName##MCAsmInfo();
30 #include "llvm/Config/Targets.def"
31
2832 #define LLVM_TARGET(TargetName) \
2933 void LLVMInitialize##TargetName##MCInstrInfo();
3034 #include "llvm/Config/Targets.def"
6872 InitializeAllTargetInfos();
6973
7074 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
75 #include "llvm/Config/Targets.def"
76 }
77
78 /// InitializeAllMCAsmInfos - The main program should call this function
79 /// if it wants access to all available assembly infos for targets that
80 /// LLVM is configured to support, to make them available via the
81 /// TargetRegistry.
82 ///
83 /// It is legal for a client to make multiple calls to this function.
84 inline void InitializeAllMCAsmInfos() {
85 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##MCAsmInfo();
7186 #include "llvm/Config/Targets.def"
7287 }
7388
132147 #ifdef LLVM_NATIVE_TARGET
133148 LLVM_NATIVE_TARGETINFO();
134149 LLVM_NATIVE_TARGET();
150 LLVM_NATIVE_MCASMINFO();
135151 return false;
136152 #else
137153 return true;
4040 #include "llvm/Config/Targets.def"
4141 #undef LLVM_TARGET /* Explicit undef to make SWIG happier */
4242
43 #define LLVM_TARGET(TargetName) \
44 void LLVMInitialize##TargetName##MCAsmInfo(void);
45 #include "llvm/Config/Targets.def"
46 #undef LLVM_TARGET /* Explicit undef to make SWIG happier */
47
4348 /** LLVMInitializeAllTargetInfos - The main program should call this function if
4449 it wants access to all available targets that LLVM is configured to
4550 support. */
6671 #ifdef LLVM_NATIVE_TARGET
6772 LLVM_NATIVE_TARGETINFO();
6873 LLVM_NATIVE_TARGET();
74 LLVM_NATIVE_MCASMINFO();
6975 return 0;
7076 #else
7177 return 1;
104104 LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
105105 StringRef CPU, StringRef FS)
106106 : TargetMachine(T, Triple, CPU, FS) {
107 AsmInfo = T.createAsmInfo(Triple);
107 AsmInfo = T.createMCAsmInfo(Triple);
108108 }
109109
110110 // Set the default code model for the JIT for a generic target.
3939 llvm::InitializeAllTargetInfos();
4040 // FIXME: We shouldn't need to initialize the Target(Machine)s.
4141 llvm::InitializeAllTargets();
42 llvm::InitializeAllMCAsmInfos();
4243 llvm::InitializeAllAsmPrinters();
4344 llvm::InitializeAllAsmParsers();
4445 llvm::InitializeAllDisassemblers();
4950 assert(TheTarget && "Unable to create target!");
5051
5152 // Get the assembler info needed to setup the MCContext.
52 const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
53 const MCAsmInfo *MAI = TheTarget->createMCAsmInfo(TripleName);
5354 assert(MAI && "Unable to create target asm info!");
5455
5556 // Package up features to be passed to target/subtarget
106106
107107 InitializeAllTargetInfos();
108108 InitializeAllTargets();
109 InitializeAllMCAsmInfos();
109110 InitializeAllAsmPrinters();
110111 InitializeAllAsmParsers();
111112 InitializeAllDisassemblers();
179180
180181 initMaps(*registerInfo);
181182
182 AsmInfo.reset(Tgt->createAsmInfo(tripleString));
183 AsmInfo.reset(Tgt->createMCAsmInfo(tripleString));
183184
184185 if (!AsmInfo)
185186 return;
+0
-78
lib/Target/ARM/ARMMCAsmInfo.cpp less more
None //===-- ARMMCAsmInfo.cpp - ARM asm properties -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the ARMMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "ARMMCAsmInfo.h"
14 #include "llvm/Support/CommandLine.h"
15
16 using namespace llvm;
17
18 cl::opt
19 EnableARMEHABI("arm-enable-ehabi", cl::Hidden,
20 cl::desc("Generate ARM EHABI tables"),
21 cl::init(false));
22
23
24 static const char *const arm_asm_table[] = {
25 "{r0}", "r0",
26 "{r1}", "r1",
27 "{r2}", "r2",
28 "{r3}", "r3",
29 "{r4}", "r4",
30 "{r5}", "r5",
31 "{r6}", "r6",
32 "{r7}", "r7",
33 "{r8}", "r8",
34 "{r9}", "r9",
35 "{r10}", "r10",
36 "{r11}", "r11",
37 "{r12}", "r12",
38 "{r13}", "r13",
39 "{r14}", "r14",
40 "{lr}", "lr",
41 "{sp}", "sp",
42 "{ip}", "ip",
43 "{fp}", "fp",
44 "{sl}", "sl",
45 "{memory}", "memory",
46 "{cc}", "cc",
47 0,0
48 };
49
50 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
51 AsmTransCBE = arm_asm_table;
52 Data64bitsDirective = 0;
53 CommentString = "@";
54 SupportsDebugInformation = true;
55
56 // Exceptions handling
57 ExceptionsType = ExceptionHandling::SjLj;
58 }
59
60 ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
61 // ".comm align is in bytes but .align is pow-2."
62 AlignmentIsInBytes = false;
63
64 Data64bitsDirective = 0;
65 CommentString = "@";
66
67 HasLEB128 = true;
68 PrivateGlobalPrefix = ".L";
69 WeakRefDirective = "\t.weak\t";
70 HasLCOMMDirective = true;
71
72 SupportsDebugInformation = true;
73
74 // Exceptions handling
75 if (EnableARMEHABI)
76 ExceptionsType = ExceptionHandling::ARM;
77 }
+0
-31
lib/Target/ARM/ARMMCAsmInfo.h less more
None //=====-- ARMMCAsmInfo.h - ARM asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the ARMMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_ARMTARGETASMINFO_H
14 #define LLVM_ARMTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfoDarwin.h"
17
18 namespace llvm {
19
20 struct ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
21 explicit ARMMCAsmInfoDarwin();
22 };
23
24 struct ARMELFMCAsmInfo : public MCAsmInfo {
25 explicit ARMELFMCAsmInfo();
26 };
27
28 } // namespace llvm
29
30 #endif
1010 //===----------------------------------------------------------------------===//
1111
1212 #include "ARMTargetMachine.h"
13 #include "ARMMCAsmInfo.h"
1413 #include "ARMFrameLowering.h"
1514 #include "ARM.h"
1615 #include "llvm/PassManager.h"
2019 #include "llvm/Target/TargetOptions.h"
2120 #include "llvm/Target/TargetRegistry.h"
2221 using namespace llvm;
23
24 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
25 Triple TheTriple(TT);
26
27 if (TheTriple.isOSDarwin())
28 return new ARMMCAsmInfoDarwin();
29
30 return new ARMELFMCAsmInfo();
31 }
3222
3323 // This is duplicated code. Refactor this.
3424 static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
5444 // Register the target.
5545 RegisterTargetMachine X(TheARMTarget);
5646 RegisterTargetMachine Y(TheThumbTarget);
57
58 // Register the target asm info.
59 RegisterAsmInfoFn A(TheARMTarget, createMCAsmInfo);
60 RegisterAsmInfoFn B(TheThumbTarget, createMCAsmInfo);
6147
6248 // Register the MC Code Emitter
6349 TargetRegistry::RegisterCodeEmitter(TheARMTarget, createARMMCCodeEmitter);
0 //===-- ARMMCAsmInfo.cpp - ARM asm properties -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the ARMMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "ARMMCAsmInfo.h"
14 #include "llvm/Support/CommandLine.h"
15
16 using namespace llvm;
17
18 cl::opt
19 EnableARMEHABI("arm-enable-ehabi", cl::Hidden,
20 cl::desc("Generate ARM EHABI tables"),
21 cl::init(false));
22
23
24 static const char *const arm_asm_table[] = {
25 "{r0}", "r0",
26 "{r1}", "r1",
27 "{r2}", "r2",
28 "{r3}", "r3",
29 "{r4}", "r4",
30 "{r5}", "r5",
31 "{r6}", "r6",
32 "{r7}", "r7",
33 "{r8}", "r8",
34 "{r9}", "r9",
35 "{r10}", "r10",
36 "{r11}", "r11",
37 "{r12}", "r12",
38 "{r13}", "r13",
39 "{r14}", "r14",
40 "{lr}", "lr",
41 "{sp}", "sp",
42 "{ip}", "ip",
43 "{fp}", "fp",
44 "{sl}", "sl",
45 "{memory}", "memory",
46 "{cc}", "cc",
47 0,0
48 };
49
50 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
51 AsmTransCBE = arm_asm_table;
52 Data64bitsDirective = 0;
53 CommentString = "@";
54 SupportsDebugInformation = true;
55
56 // Exceptions handling
57 ExceptionsType = ExceptionHandling::SjLj;
58 }
59
60 ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
61 // ".comm align is in bytes but .align is pow-2."
62 AlignmentIsInBytes = false;
63
64 Data64bitsDirective = 0;
65 CommentString = "@";
66
67 HasLEB128 = true;
68 PrivateGlobalPrefix = ".L";
69 WeakRefDirective = "\t.weak\t";
70 HasLCOMMDirective = true;
71
72 SupportsDebugInformation = true;
73
74 // Exceptions handling
75 if (EnableARMEHABI)
76 ExceptionsType = ExceptionHandling::ARM;
77 }
0 //=====-- ARMMCAsmInfo.h - ARM asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the ARMMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_ARMTARGETASMINFO_H
14 #define LLVM_ARMTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfoDarwin.h"
17
18 namespace llvm {
19
20 struct ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
21 explicit ARMMCAsmInfoDarwin();
22 };
23
24 struct ARMELFMCAsmInfo : public MCAsmInfo {
25 explicit ARMELFMCAsmInfo();
26 };
27
28 } // namespace llvm
29
30 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "ARMMCTargetDesc.h"
14 #include "ARMMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
9697 return X;
9798 }
9899
99 MCInstrInfo *createARMMCInstrInfo() {
100 // Force static initialization.
101 extern "C" void LLVMInitializeARMMCSubtargetInfo() {
102 TargetRegistry::RegisterMCSubtargetInfo(TheARMTarget,
103 ARM_MC::createARMMCSubtargetInfo);
104 TargetRegistry::RegisterMCSubtargetInfo(TheThumbTarget,
105 ARM_MC::createARMMCSubtargetInfo);
106 }
107
108 static MCInstrInfo *createARMMCInstrInfo() {
100109 MCInstrInfo *X = new MCInstrInfo();
101110 InitARMMCInstrInfo(X);
102111 return X;
103112 }
104113
105 MCRegisterInfo *createARMMCRegisterInfo() {
114 extern "C" void LLVMInitializeARMMCInstrInfo() {
115 TargetRegistry::RegisterMCInstrInfo(TheARMTarget, createARMMCInstrInfo);
116 TargetRegistry::RegisterMCInstrInfo(TheThumbTarget, createARMMCInstrInfo);
117 }
118
119 static MCRegisterInfo *createARMMCRegisterInfo() {
106120 MCRegisterInfo *X = new MCRegisterInfo();
107121 InitARMMCRegisterInfo(X);
108122 return X;
109 }
110
111 // Force static initialization.
112 extern "C" void LLVMInitializeARMMCInstrInfo() {
113 TargetRegistry::RegisterMCInstrInfo(TheARMTarget, createARMMCInstrInfo);
114 TargetRegistry::RegisterMCInstrInfo(TheThumbTarget, createARMMCInstrInfo);
115123 }
116124
117125 extern "C" void LLVMInitializeARMMCRegInfo() {
119127 TargetRegistry::RegisterMCRegInfo(TheThumbTarget, createARMMCRegisterInfo);
120128 }
121129
122 extern "C" void LLVMInitializeARMMCSubtargetInfo() {
123 TargetRegistry::RegisterMCSubtargetInfo(TheARMTarget,
124 ARM_MC::createARMMCSubtargetInfo);
125 TargetRegistry::RegisterMCSubtargetInfo(TheThumbTarget,
126 ARM_MC::createARMMCSubtargetInfo);
130 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
131 Triple TheTriple(TT);
132
133 if (TheTriple.isOSDarwin())
134 return new ARMMCAsmInfoDarwin();
135
136 return new ARMELFMCAsmInfo();
127137 }
138
139 extern "C" void LLVMInitializeARMMCAsmInfo() {
140 // Register the target asm info.
141 RegisterMCAsmInfoFn A(TheARMTarget, createMCAsmInfo);
142 RegisterMCAsmInfoFn B(TheThumbTarget, createMCAsmInfo);
143 }
+0
-23
lib/Target/Alpha/AlphaMCAsmInfo.cpp less more
None //===-- AlphaMCAsmInfo.cpp - Alpha asm properties ---------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the AlphaMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "AlphaMCAsmInfo.h"
14 using namespace llvm;
15
16 AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, StringRef TT) {
17 AlignmentIsInBytes = false;
18 PrivateGlobalPrefix = "$";
19 GPRel32Directive = ".gprel32";
20 WeakRefDirective = "\t.weak\t";
21 HasSetDirective = false;
22 }
+0
-29
lib/Target/Alpha/AlphaMCAsmInfo.h less more
None //=====-- AlphaMCAsmInfo.h - Alpha asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the AlphaMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef ALPHATARGETASMINFO_H
14 #define ALPHATARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct AlphaMCAsmInfo : public MCAsmInfo {
23 explicit AlphaMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1010 //===----------------------------------------------------------------------===//
1111
1212 #include "Alpha.h"
13 #include "AlphaMCAsmInfo.h"
1413 #include "AlphaTargetMachine.h"
1514 #include "llvm/PassManager.h"
1615 #include "llvm/Support/FormattedStream.h"
2019 extern "C" void LLVMInitializeAlphaTarget() {
2120 // Register the target.
2221 RegisterTargetMachine X(TheAlphaTarget);
23 RegisterAsmInfo Y(TheAlphaTarget);
2422 }
2523
2624 AlphaTargetMachine::AlphaTargetMachine(const Target &T, const std::string &TT,
0 //===-- AlphaMCAsmInfo.cpp - Alpha asm properties ---------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the AlphaMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "AlphaMCAsmInfo.h"
14 using namespace llvm;
15
16 AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, StringRef TT) {
17 AlignmentIsInBytes = false;
18 PrivateGlobalPrefix = "$";
19 GPRel32Directive = ".gprel32";
20 WeakRefDirective = "\t.weak\t";
21 HasSetDirective = false;
22 }
0 //=====-- AlphaMCAsmInfo.h - Alpha asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the AlphaMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef ALPHATARGETASMINFO_H
14 #define ALPHATARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct AlphaMCAsmInfo : public MCAsmInfo {
23 explicit AlphaMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "AlphaMCTargetDesc.h"
14 #include "AlphaMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2829 using namespace llvm;
2930
3031
31 MCInstrInfo *createAlphaMCInstrInfo() {
32 static MCInstrInfo *createAlphaMCInstrInfo() {
3233 MCInstrInfo *X = new MCInstrInfo();
3334 InitAlphaMCInstrInfo(X);
3435 return X;
3839 TargetRegistry::RegisterMCInstrInfo(TheAlphaTarget, createAlphaMCInstrInfo);
3940 }
4041
41
42 MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
42 static MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
4444 MCSubtargetInfo *X = new MCSubtargetInfo();
4545 InitAlphaMCSubtargetInfo(X, TT, CPU, FS);
4646 return X;
5050 TargetRegistry::RegisterMCSubtargetInfo(TheAlphaTarget,
5151 createAlphaMCSubtargetInfo);
5252 }
53
54 extern "C" void LLVMInitializeAlphaMCAsmInfo() {
55 RegisterMCAsmInfo X(TheAlphaTarget);
56 }
None add_llvm_library(LLVMAlphaDesc AlphaMCTargetDesc.cpp)
0 add_llvm_library(LLVMAlphaDesc
1 AlphaMCTargetDesc.cpp
2 AlphaMCAsmInfo.cpp
3 )
+0
-22
lib/Target/Blackfin/BlackfinMCAsmInfo.cpp less more
None //===-- BlackfinMCAsmInfo.cpp - Blackfin asm properties -------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the BlackfinMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "BlackfinMCAsmInfo.h"
14
15 using namespace llvm;
16
17 BlackfinMCAsmInfo::BlackfinMCAsmInfo(const Target &T, StringRef TT) {
18 GlobalPrefix = "_";
19 CommentString = "//";
20 HasSetDirective = false;
21 }
+0
-29
lib/Target/Blackfin/BlackfinMCAsmInfo.h less more
None //===-- BlackfinMCAsmInfo.h - Blackfin asm properties ---------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the BlackfinMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef BLACKFINTARGETASMINFO_H
14 #define BLACKFINTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct BlackfinMCAsmInfo : public MCAsmInfo {
23 explicit BlackfinMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111
1212 #include "BlackfinTargetMachine.h"
1313 #include "Blackfin.h"
14 #include "BlackfinMCAsmInfo.h"
1514 #include "llvm/PassManager.h"
1615 #include "llvm/Target/TargetRegistry.h"
1716
1918
2019 extern "C" void LLVMInitializeBlackfinTarget() {
2120 RegisterTargetMachine X(TheBlackfinTarget);
22 RegisterAsmInfo Y(TheBlackfinTarget);
23
2421 }
2522
2623 BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
0 //===-- BlackfinMCAsmInfo.cpp - Blackfin asm properties -------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the BlackfinMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "BlackfinMCAsmInfo.h"
14
15 using namespace llvm;
16
17 BlackfinMCAsmInfo::BlackfinMCAsmInfo(const Target &T, StringRef TT) {
18 GlobalPrefix = "_";
19 CommentString = "//";
20 HasSetDirective = false;
21 }
0 //===-- BlackfinMCAsmInfo.h - Blackfin asm properties ---------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the BlackfinMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef BLACKFINTARGETASMINFO_H
14 #define BLACKFINTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct BlackfinMCAsmInfo : public MCAsmInfo {
23 explicit BlackfinMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "BlackfinMCTargetDesc.h"
14 #include "BlackfinMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2829 using namespace llvm;
2930
3031
31 MCInstrInfo *createBlackfinMCInstrInfo() {
32 static MCInstrInfo *createBlackfinMCInstrInfo() {
3233 MCInstrInfo *X = new MCInstrInfo();
3334 InitBlackfinMCInstrInfo(X);
3435 return X;
4041 }
4142
4243
43 MCSubtargetInfo *createBlackfinMCSubtargetInfo(StringRef TT, StringRef CPU,
44 StringRef FS) {
44 static MCSubtargetInfo *createBlackfinMCSubtargetInfo(StringRef TT,
45 StringRef CPU,
46 StringRef FS) {
4547 MCSubtargetInfo *X = new MCSubtargetInfo();
4648 InitBlackfinMCSubtargetInfo(X, TT, CPU, FS);
4749 return X;
5153 TargetRegistry::RegisterMCSubtargetInfo(TheBlackfinTarget,
5254 createBlackfinMCSubtargetInfo);
5355 }
56
57 extern "C" void LLVMInitializeBlackfinMCAsmInfo() {
58 RegisterMCAsmInfo X(TheBlackfinTarget);
59 }
None add_llvm_library(LLVMBlackfinDesc BlackfinMCTargetDesc.cpp)
0 add_llvm_library(LLVMBlackfinDesc
1 BlackfinMCTargetDesc.cpp
2 BlackfinMCAsmInfo.cpp
3 )
6161 RegisterTargetMachine X(TheCBackendTarget);
6262 }
6363
64 extern "C" void LLVMInitializeCBackendMCInstrInfo() {
65 RegisterMCInstrInfo X(TheCBackendTarget);
66 }
67
68 extern "C" void LLVMInitializeCBackendMCSubtargetInfo() {
69 RegisterMCSubtargetInfo X(TheCBackendTarget);
70 }
64 extern "C" void LLVMInitializeCBackendMCAsmInfo() {}
65
66 extern "C" void LLVMInitializeCBackendMCInstrInfo() {}
67
68 extern "C" void LLVMInitializeCBackendMCSubtargetInfo() {}
7169
7270 namespace {
7371 class CBEMCAsmInfo : public MCAsmInfo {
16631661
16641662 std::string E;
16651663 if (const Target *Match = TargetRegistry::lookupTarget(Triple, E))
1666 TAsm = Match->createAsmInfo(Triple);
1664 TAsm = Match->createMCAsmInfo(Triple);
16671665 #endif
16681666 TAsm = new CBEMCAsmInfo();
16691667 TCtx = new MCContext(*TAsm, NULL);
31663164
31673165 std::string E;
31683166 if (const Target *Match = TargetRegistry::lookupTarget(Triple, E))
3169 TargetAsm = Match->createAsmInfo(Triple);
3167 TargetAsm = Match->createMCAsmInfo(Triple);
31703168 else
31713169 return c.Codes[0];
31723170
1414 SPUISelDAGToDAG.cpp
1515 SPUISelLowering.cpp
1616 SPUFrameLowering.cpp
17 SPUMCAsmInfo.cpp
1817 SPURegisterInfo.cpp
1918 SPUSubtarget.cpp
2019 SPUTargetMachine.cpp
None add_llvm_library(LLVMCellSPUDesc SPUMCTargetDesc.cpp)
0 add_llvm_library(LLVMCellSPUDesc
1 SPUMCTargetDesc.cpp
2 SPUMCAsmInfo.cpp
3 )
0 //===-- SPUMCAsmInfo.cpp - Cell SPU asm properties ------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SPUMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SPUMCAsmInfo.h"
14 using namespace llvm;
15
16 SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, StringRef TT) {
17 ZeroDirective = "\t.space\t";
18 Data64bitsDirective = "\t.quad\t";
19 AlignmentIsInBytes = false;
20
21 PCSymbol = ".";
22 CommentString = "#";
23 GlobalPrefix = "";
24 PrivateGlobalPrefix = ".L";
25
26 // Has leb128
27 HasLEB128 = true;
28
29 SupportsDebugInformation = true;
30
31 // Exception handling is not supported on CellSPU (think about it: you only
32 // have 256K for code+data. Would you support exception handling?)
33 ExceptionsType = ExceptionHandling::None;
34
35 // SPU assembly requires ".section" before ".bss"
36 UsesELFSectionDirectiveForBSS = true;
37 }
38
0 //===-- SPUMCAsmInfo.h - Cell SPU asm properties ---------------*- C++ -*--===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SPUMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SPUTARGETASMINFO_H
14 #define SPUTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct SPULinuxMCAsmInfo : public MCAsmInfo {
23 explicit SPULinuxMCAsmInfo(const Target &T, StringRef TT);
24 };
25 } // namespace llvm
26
27 #endif /* SPUTARGETASMINFO_H */
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "SPUMCTargetDesc.h"
14 #include "SPUMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createSPUMCInstrInfo() {
31 static MCInstrInfo *createSPUMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitSPUMCInstrInfo(X);
3334 return X;
3738 TargetRegistry::RegisterMCInstrInfo(TheCellSPUTarget, createSPUMCInstrInfo);
3839 }
3940
40 MCSubtargetInfo *createSPUMCSubtargetInfo(StringRef TT, StringRef CPU,
41 StringRef FS) {
41 static MCSubtargetInfo *createSPUMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
4243 MCSubtargetInfo *X = new MCSubtargetInfo();
4344 InitSPUMCSubtargetInfo(X, TT, CPU, FS);
4445 return X;
4849 TargetRegistry::RegisterMCSubtargetInfo(TheCellSPUTarget,
4950 createSPUMCSubtargetInfo);
5051 }
52
53 extern "C" void LLVMInitializeCellSPUMCAsmInfo() {
54 RegisterMCAsmInfo X(TheCellSPUTarget);
55 }
+0
-39
lib/Target/CellSPU/SPUMCAsmInfo.cpp less more
None //===-- SPUMCAsmInfo.cpp - Cell SPU asm properties ------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SPUMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SPUMCAsmInfo.h"
14 using namespace llvm;
15
16 SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, StringRef TT) {
17 ZeroDirective = "\t.space\t";
18 Data64bitsDirective = "\t.quad\t";
19 AlignmentIsInBytes = false;
20
21 PCSymbol = ".";
22 CommentString = "#";
23 GlobalPrefix = "";
24 PrivateGlobalPrefix = ".L";
25
26 // Has leb128
27 HasLEB128 = true;
28
29 SupportsDebugInformation = true;
30
31 // Exception handling is not supported on CellSPU (think about it: you only
32 // have 256K for code+data. Would you support exception handling?)
33 ExceptionsType = ExceptionHandling::None;
34
35 // SPU assembly requires ".section" before ".bss"
36 UsesELFSectionDirectiveForBSS = true;
37 }
38
+0
-28
lib/Target/CellSPU/SPUMCAsmInfo.h less more
None //===-- SPUMCAsmInfo.h - Cell SPU asm properties ---------------*- C++ -*--===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SPUMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SPUTARGETASMINFO_H
14 #define SPUTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct SPULinuxMCAsmInfo : public MCAsmInfo {
23 explicit SPULinuxMCAsmInfo(const Target &T, StringRef TT);
24 };
25 } // namespace llvm
26
27 #endif /* SPUTARGETASMINFO_H */
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "SPU.h"
14 #include "SPUMCAsmInfo.h"
1514 #include "SPUTargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/CodeGen/RegAllocRegistry.h"
2322 extern "C" void LLVMInitializeCellSPUTarget() {
2423 // Register the target.
2524 RegisterTargetMachine X(TheCellSPUTarget);
26 RegisterAsmInfo Y(TheCellSPUTarget);
2725 }
2826
2927 const std::pair *
2121 #include "llvm/Module.h"
2222 #include "llvm/Pass.h"
2323 #include "llvm/PassManager.h"
24 #include "llvm/MC/MCAsmInfo.h"
2425 #include "llvm/MC/MCInstrInfo.h"
2526 #include "llvm/MC/MCSubtargetInfo.h"
2627 #include "llvm/ADT/SmallPtrSet.h"
7475 // Register the target.
7576 RegisterTargetMachine X(TheCppBackendTarget);
7677 }
78
79 extern "C" void LLVMInitializeCppBackendMCAsmInfo() {}
7780
7881 extern "C" void LLVMInitializeCppBackendMCInstrInfo() {
7982 RegisterMCInstrInfo X(TheCppBackendTarget);
1616 MBlazeISelDAGToDAG.cpp
1717 MBlazeISelLowering.cpp
1818 MBlazeFrameLowering.cpp
19 MBlazeMCAsmInfo.cpp
2019 MBlazeRegisterInfo.cpp
2120 MBlazeSubtarget.cpp
2221 MBlazeTargetMachine.cpp
+0
-22
lib/Target/MBlaze/MBlazeMCAsmInfo.cpp less more
None //===-- MBlazeMCAsmInfo.cpp - MBlaze asm properties -----------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MBlazeMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MBlazeMCAsmInfo.h"
14 using namespace llvm;
15
16 MBlazeMCAsmInfo::MBlazeMCAsmInfo() {
17 SupportsDebugInformation = true;
18 AlignmentIsInBytes = false;
19 PrivateGlobalPrefix = "$";
20 GPRel32Directive = "\t.gpword\t";
21 }
+0
-30
lib/Target/MBlaze/MBlazeMCAsmInfo.h less more
None //=====-- MBlazeMCAsmInfo.h - MBlaze asm properties -----------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MBlazeMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MBLAZETARGETASMINFO_H
14 #define MBLAZETARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class MBlazeMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit MBlazeMCAsmInfo();
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "MBlaze.h"
14 #include "MBlazeMCAsmInfo.h"
1514 #include "MBlazeTargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/CodeGen/Passes.h"
1918 #include "llvm/Target/TargetOptions.h"
2019 #include "llvm/Target/TargetRegistry.h"
2120 using namespace llvm;
22
23 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
24 Triple TheTriple(TT);
25 switch (TheTriple.getOS()) {
26 default:
27 return new MBlazeMCAsmInfo();
28 }
29 }
3021
3122 static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
3223 MCContext &Ctx, TargetAsmBackend &TAB,
5344 extern "C" void LLVMInitializeMBlazeTarget() {
5445 // Register the target.
5546 RegisterTargetMachine X(TheMBlazeTarget);
56
57 // Register the target asm info.
58 RegisterAsmInfoFn A(TheMBlazeTarget, createMCAsmInfo);
5947
6048 // Register the MC code emitter
6149 TargetRegistry::RegisterCodeEmitter(TheMBlazeTarget,
None add_llvm_library(LLVMMBlazeDesc MBlazeMCTargetDesc.cpp)
0 add_llvm_library(LLVMMBlazeDesc
1 MBlazeMCTargetDesc.cpp
2 MBlazeMCAsmInfo.cpp
3 )
0 //===-- MBlazeMCAsmInfo.cpp - MBlaze asm properties -----------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MBlazeMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MBlazeMCAsmInfo.h"
14 using namespace llvm;
15
16 MBlazeMCAsmInfo::MBlazeMCAsmInfo() {
17 SupportsDebugInformation = true;
18 AlignmentIsInBytes = false;
19 PrivateGlobalPrefix = "$";
20 GPRel32Directive = "\t.gpword\t";
21 }
0 //=====-- MBlazeMCAsmInfo.h - MBlaze asm properties -----------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MBlazeMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MBLAZETARGETASMINFO_H
14 #define MBLAZETARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class MBlazeMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit MBlazeMCAsmInfo();
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "MBlazeMCTargetDesc.h"
14 #include "MBlazeMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2829 using namespace llvm;
2930
3031
31 MCInstrInfo *createMBlazeMCInstrInfo() {
32 static MCInstrInfo *createMBlazeMCInstrInfo() {
3233 MCInstrInfo *X = new MCInstrInfo();
3334 InitMBlazeMCInstrInfo(X);
3435 return X;
3839 TargetRegistry::RegisterMCInstrInfo(TheMBlazeTarget, createMBlazeMCInstrInfo);
3940 }
4041
41 MCSubtargetInfo *createMBlazeMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
42 static MCSubtargetInfo *createMBlazeMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
4344 MCSubtargetInfo *X = new MCSubtargetInfo();
4445 InitMBlazeMCSubtargetInfo(X, TT, CPU, FS);
4546 return X;
4950 TargetRegistry::RegisterMCSubtargetInfo(TheMBlazeTarget,
5051 createMBlazeMCSubtargetInfo);
5152 }
53
54 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
55 Triple TheTriple(TT);
56 switch (TheTriple.getOS()) {
57 default:
58 return new MBlazeMCAsmInfo();
59 }
60 }
61
62 extern "C" void LLVMInitializeMBlazeMCAsmInfo() {
63 RegisterMCAsmInfoFn X(TheMBlazeTarget, createMCAsmInfo);
64 }
1212 MSP430ISelLowering.cpp
1313 MSP430InstrInfo.cpp
1414 MSP430FrameLowering.cpp
15 MSP430MCAsmInfo.cpp
1615 MSP430RegisterInfo.cpp
1716 MSP430Subtarget.cpp
1817 MSP430TargetMachine.cpp
None add_llvm_library(LLVMMSP430Desc MSP430MCTargetDesc.cpp)
0 add_llvm_library(LLVMMSP430Desc
1 MSP430MCTargetDesc.cpp
2 MSP430MCAsmInfo.cpp
3 )
0 //===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MSP430MCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MSP430MCAsmInfo.h"
14 using namespace llvm;
15
16 MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
17 PrivateGlobalPrefix = ".L";
18 WeakRefDirective ="\t.weak\t";
19 PCSymbol=".";
20 CommentString = ";";
21
22 AlignmentIsInBytes = false;
23 AllowNameToStartWithDigit = true;
24 UsesELFSectionDirectiveForBSS = true;
25 }
0 //=====-- MSP430MCAsmInfo.h - MSP430 asm properties -----------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MSP430MCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MSP430TARGETASMINFO_H
14 #define MSP430TARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct MSP430MCAsmInfo : public MCAsmInfo {
23 explicit MSP430MCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "MSP430MCTargetDesc.h"
14 #include "MSP430MCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2829 using namespace llvm;
2930
3031
31 MCInstrInfo *createMSP430MCInstrInfo() {
32 static MCInstrInfo *createMSP430MCInstrInfo() {
3233 MCInstrInfo *X = new MCInstrInfo();
3334 InitMSP430MCInstrInfo(X);
3435 return X;
3940 }
4041
4142
42 MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
43 static MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU,
44 StringRef FS) {
4445 MCSubtargetInfo *X = new MCSubtargetInfo();
4546 InitMSP430MCSubtargetInfo(X, TT, CPU, FS);
4647 return X;
5051 TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target,
5152 createMSP430MCSubtargetInfo);
5253 }
54
55 extern "C" void LLVMInitializeMSP430MCAsmInfo() {
56 RegisterMCAsmInfo X(TheMSP430Target);
57 }
1414 #define DEBUG_TYPE "asm-printer"
1515 #include "MSP430.h"
1616 #include "MSP430InstrInfo.h"
17 #include "MSP430MCAsmInfo.h"
1817 #include "MSP430MCInstLower.h"
1918 #include "MSP430TargetMachine.h"
2019 #include "InstPrinter/MSP430InstPrinter.h"
2726 #include "llvm/CodeGen/MachineFunctionPass.h"
2827 #include "llvm/CodeGen/MachineConstantPool.h"
2928 #include "llvm/CodeGen/MachineInstr.h"
29 #include "llvm/MC/MCAsmInfo.h"
3030 #include "llvm/MC/MCInst.h"
3131 #include "llvm/MC/MCStreamer.h"
3232 #include "llvm/MC/MCSymbol.h"
+0
-26
lib/Target/MSP430/MSP430MCAsmInfo.cpp less more
None //===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MSP430MCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MSP430MCAsmInfo.h"
14 using namespace llvm;
15
16 MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
17 PrivateGlobalPrefix = ".L";
18 WeakRefDirective ="\t.weak\t";
19 PCSymbol=".";
20 CommentString = ";";
21
22 AlignmentIsInBytes = false;
23 AllowNameToStartWithDigit = true;
24 UsesELFSectionDirectiveForBSS = true;
25 }
+0
-29
lib/Target/MSP430/MSP430MCAsmInfo.h less more
None //=====-- MSP430MCAsmInfo.h - MSP430 asm properties -----------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MSP430MCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MSP430TARGETASMINFO_H
14 #define MSP430TARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct MSP430MCAsmInfo : public MCAsmInfo {
23 explicit MSP430MCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "MSP430.h"
14 #include "MSP430MCAsmInfo.h"
1514 #include "MSP430TargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/CodeGen/Passes.h"
2221 extern "C" void LLVMInitializeMSP430Target() {
2322 // Register the target.
2423 RegisterTargetMachine X(TheMSP430Target);
25 RegisterAsmInfo Z(TheMSP430Target);
2624 }
2725
2826 MSP430TargetMachine::MSP430TargetMachine(const Target &T,
1515 MipsISelDAGToDAG.cpp
1616 MipsISelLowering.cpp
1717 MipsFrameLowering.cpp
18 MipsMCAsmInfo.cpp
1918 MipsMCInstLower.cpp
2019 MipsMCSymbolRefExpr.cpp
2120 MipsRegisterInfo.cpp
None add_llvm_library(LLVMMipsDesc MipsMCTargetDesc.cpp)
0 add_llvm_library(LLVMMipsDesc
1 MipsMCTargetDesc.cpp
2 MipsMCAsmInfo.cpp
3 )
0 //===-- MipsMCAsmInfo.cpp - Mips asm properties ---------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MipsMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MipsMCAsmInfo.h"
14 using namespace llvm;
15
16 MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
17 AlignmentIsInBytes = false;
18 Data16bitsDirective = "\t.2byte\t";
19 Data32bitsDirective = "\t.4byte\t";
20 Data64bitsDirective = 0;
21 PrivateGlobalPrefix = "$";
22 CommentString = "#";
23 ZeroDirective = "\t.space\t";
24 GPRel32Directive = "\t.gpword\t";
25 WeakRefDirective = "\t.weak\t";
26
27 SupportsDebugInformation = true;
28 ExceptionsType = ExceptionHandling::DwarfCFI;
29 HasLEB128 = true;
30 DwarfRegNumForCFI = true;
31 }
0 //=====-- MipsMCAsmInfo.h - Mips asm properties ---------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MipsMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MIPSTARGETASMINFO_H
14 #define MIPSTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class MipsMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit MipsMCAsmInfo(const Target &T, StringRef TT);
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "MipsMCTargetDesc.h"
14 #include "MipsMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createMipsMCInstrInfo() {
31 static MCInstrInfo *createMipsMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitMipsMCInstrInfo(X);
3334 return X;
3839 }
3940
4041
41 MCSubtargetInfo *createMipsMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
42 static MCSubtargetInfo *createMipsMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
4344 MCSubtargetInfo *X = new MCSubtargetInfo();
4445 InitMipsMCSubtargetInfo(X, TT, CPU, FS);
4546 return X;
4950 TargetRegistry::RegisterMCSubtargetInfo(TheMipsTarget,
5051 createMipsMCSubtargetInfo);
5152 }
53
54 extern "C" void LLVMInitializeMipsMCAsmInfo() {
55 RegisterMCAsmInfo X(TheMipsTarget);
56 RegisterMCAsmInfo Y(TheMipselTarget);
57 }
+0
-32
lib/Target/Mips/MipsMCAsmInfo.cpp less more
None //===-- MipsMCAsmInfo.cpp - Mips asm properties ---------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MipsMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "MipsMCAsmInfo.h"
14 using namespace llvm;
15
16 MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
17 AlignmentIsInBytes = false;
18 Data16bitsDirective = "\t.2byte\t";
19 Data32bitsDirective = "\t.4byte\t";
20 Data64bitsDirective = 0;
21 PrivateGlobalPrefix = "$";
22 CommentString = "#";
23 ZeroDirective = "\t.space\t";
24 GPRel32Directive = "\t.gpword\t";
25 WeakRefDirective = "\t.weak\t";
26
27 SupportsDebugInformation = true;
28 ExceptionsType = ExceptionHandling::DwarfCFI;
29 HasLEB128 = true;
30 DwarfRegNumForCFI = true;
31 }
+0
-30
lib/Target/Mips/MipsMCAsmInfo.h less more
None //=====-- MipsMCAsmInfo.h - Mips asm properties ---------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MipsMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef MIPSTARGETASMINFO_H
14 #define MIPSTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class MipsMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit MipsMCAsmInfo(const Target &T, StringRef TT);
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "Mips.h"
14 #include "MipsMCAsmInfo.h"
1514 #include "MipsTargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/Target/TargetRegistry.h"
2120 // Register the target.
2221 RegisterTargetMachine X(TheMipsTarget);
2322 RegisterTargetMachine Y(TheMipselTarget);
24 RegisterAsmInfo A(TheMipsTarget);
25 RegisterAsmInfo B(TheMipselTarget);
2623 }
2724
2825 // DataLayout --> Big-endian, 32-bit pointer/ABI/alignment
1212 PTXISelLowering.cpp
1313 PTXInstrInfo.cpp
1414 PTXFrameLowering.cpp
15 PTXMCAsmInfo.cpp
1615 PTXMCAsmStreamer.cpp
1716 PTXMFInfoExtract.cpp
1817 PTXRegisterInfo.cpp
None add_llvm_library(LLVMPTXDesc PTXMCTargetDesc.cpp)
0 add_llvm_library(LLVMPTXDesc
1 PTXMCTargetDesc.cpp
2 PTXMCAsmInfo.cpp
3 )
0 //===-- PTXMCAsmInfo.cpp - PTX asm properties -----------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the PTXMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PTXMCAsmInfo.h"
14
15 using namespace llvm;
16
17 PTXMCAsmInfo::PTXMCAsmInfo(const Target &T, const StringRef &TT) {
18 CommentString = "//";
19
20 PrivateGlobalPrefix = "$L__";
21
22 AllowPeriodsInName = false;
23
24 HasSetDirective = false;
25
26 HasDotTypeDotSizeDirective = false;
27
28 HasSingleParameterDotFile = false;
29 }
0 //=====-- PTXMCAsmInfo.h - PTX asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the PTXMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef PTX_MCASM_INFO_H
14 #define PTX_MCASM_INFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17
18 namespace llvm {
19 class Target;
20 class StringRef;
21
22 struct PTXMCAsmInfo : public MCAsmInfo {
23 explicit PTXMCAsmInfo(const Target &T, const StringRef &TT);
24 };
25 } // namespace llvm
26
27 #endif // PTX_MCASM_INFO_H
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "PTXMCTargetDesc.h"
14 #include "PTXMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createPTXMCInstrInfo() {
31 static MCInstrInfo *createPTXMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitPTXMCInstrInfo(X);
3334 return X;
3839 TargetRegistry::RegisterMCInstrInfo(ThePTX64Target, createPTXMCInstrInfo);
3940 }
4041
41 MCSubtargetInfo *createPTXMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
42 static MCSubtargetInfo *createPTXMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
4344 MCSubtargetInfo *X = new MCSubtargetInfo();
4445 InitPTXMCSubtargetInfo(X, TT, CPU, FS);
4546 return X;
5152 TargetRegistry::RegisterMCSubtargetInfo(ThePTX64Target,
5253 createPTXMCSubtargetInfo);
5354 }
55
56 extern "C" void LLVMInitializePTXMCAsmInfo() {
57 RegisterMCAsmInfo X(ThePTX32Target);
58 RegisterMCAsmInfo Y(ThePTX64Target);
59 }
+0
-30
lib/Target/PTX/PTXMCAsmInfo.cpp less more
None //===-- PTXMCAsmInfo.cpp - PTX asm properties -----------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the PTXMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PTXMCAsmInfo.h"
14
15 using namespace llvm;
16
17 PTXMCAsmInfo::PTXMCAsmInfo(const Target &T, const StringRef &TT) {
18 CommentString = "//";
19
20 PrivateGlobalPrefix = "$L__";
21
22 AllowPeriodsInName = false;
23
24 HasSetDirective = false;
25
26 HasDotTypeDotSizeDirective = false;
27
28 HasSingleParameterDotFile = false;
29 }
+0
-28
lib/Target/PTX/PTXMCAsmInfo.h less more
None //=====-- PTXMCAsmInfo.h - PTX asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the PTXMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef PTX_MCASM_INFO_H
14 #define PTX_MCASM_INFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17
18 namespace llvm {
19 class Target;
20 class StringRef;
21
22 struct PTXMCAsmInfo : public MCAsmInfo {
23 explicit PTXMCAsmInfo(const Target &T, const StringRef &TT);
24 };
25 } // namespace llvm
26
27 #endif // PTX_MCASM_INFO_H
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "PTX.h"
14 #include "PTXMCAsmInfo.h"
1514 #include "PTXTargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/Target/TargetRegistry.h"
3332
3433 RegisterTargetMachine X(ThePTX32Target);
3534 RegisterTargetMachine Y(ThePTX64Target);
36
37 RegisterAsmInfo Z(ThePTX32Target);
38 RegisterAsmInfo W(ThePTX64Target);
3935
4036 TargetRegistry::RegisterAsmStreamer(ThePTX32Target, createPTXAsmStreamer);
4137 TargetRegistry::RegisterAsmStreamer(ThePTX64Target, createPTXAsmStreamer);
1919 PPCISelLowering.cpp
2020 PPCFrameLowering.cpp
2121 PPCJITInfo.cpp
22 PPCMCAsmInfo.cpp
2322 PPCMCCodeEmitter.cpp
2423 PPCMCInstLower.cpp
2524 PPCPredicates.cpp
None add_llvm_library(LLVMPowerPCDesc PPCMCTargetDesc.cpp)
0 add_llvm_library(LLVMPowerPCDesc
1 PPCMCTargetDesc.cpp
2 PPCMCAsmInfo.cpp
3 )
0 //===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MCAsmInfoDarwin properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PPCMCAsmInfo.h"
14 using namespace llvm;
15
16 PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
17 PCSymbol = ".";
18 CommentString = ";";
19 ExceptionsType = ExceptionHandling::DwarfCFI;
20
21 if (!is64Bit)
22 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
23
24 AssemblerDialect = 1; // New-Style mnemonics.
25 SupportsDebugInformation= true; // Debug information.
26 }
27
28 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
29 // ".comm align is in bytes but .align is pow-2."
30 AlignmentIsInBytes = false;
31
32 CommentString = "#";
33 GlobalPrefix = "";
34 PrivateGlobalPrefix = ".L";
35 WeakRefDirective = "\t.weak\t";
36
37 // Uses '.section' before '.bss' directive
38 UsesELFSectionDirectiveForBSS = true;
39
40 // Debug Information
41 SupportsDebugInformation = true;
42
43 PCSymbol = ".";
44
45 // Set up DWARF directives
46 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
47
48 // Exceptions handling
49 if (!is64Bit)
50 ExceptionsType = ExceptionHandling::DwarfCFI;
51
52 ZeroDirective = "\t.space\t";
53 Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
54 HasLCOMMDirective = true;
55 AssemblerDialect = 0; // Old-Style mnemonics.
56 }
57
0 //=====-- PPCMCAsmInfo.h - PPC asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCAsmInfoDarwin class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef PPCTARGETASMINFO_H
14 #define PPCTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfoDarwin.h"
17
18 namespace llvm {
19
20 struct PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
21 explicit PPCMCAsmInfoDarwin(bool is64Bit);
22 };
23
24 struct PPCLinuxMCAsmInfo : public MCAsmInfo {
25 explicit PPCLinuxMCAsmInfo(bool is64Bit);
26 };
27
28 } // namespace llvm
29
30 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "PPCMCTargetDesc.h"
14 #include "PPCMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createPPCMCInstrInfo() {
31 static MCInstrInfo *createPPCMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitPPCMCInstrInfo(X);
3334 return X;
3940 }
4041
4142
42 MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU,
43 StringRef FS) {
43 static MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU,
44 StringRef FS) {
4445 MCSubtargetInfo *X = new MCSubtargetInfo();
4546 InitPPCMCSubtargetInfo(X, TT, CPU, FS);
4647 return X;
5253 TargetRegistry::RegisterMCSubtargetInfo(ThePPC64Target,
5354 createPPCMCSubtargetInfo);
5455 }
56
57 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
58 Triple TheTriple(TT);
59 bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
60 if (TheTriple.isOSDarwin())
61 return new PPCMCAsmInfoDarwin(isPPC64);
62 return new PPCLinuxMCAsmInfo(isPPC64);
63
64 }
65
66 extern "C" void LLVMInitializePowerPCMCAsmInfo() {
67 RegisterMCAsmInfoFn C(ThePPC32Target, createMCAsmInfo);
68 RegisterMCAsmInfoFn D(ThePPC64Target, createMCAsmInfo);
69 }
+0
-58
lib/Target/PowerPC/PPCMCAsmInfo.cpp less more
None //===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the MCAsmInfoDarwin properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PPCMCAsmInfo.h"
14 using namespace llvm;
15
16 PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
17 PCSymbol = ".";
18 CommentString = ";";
19 ExceptionsType = ExceptionHandling::DwarfCFI;
20
21 if (!is64Bit)
22 Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
23
24 AssemblerDialect = 1; // New-Style mnemonics.
25 SupportsDebugInformation= true; // Debug information.
26 }
27
28 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
29 // ".comm align is in bytes but .align is pow-2."
30 AlignmentIsInBytes = false;
31
32 CommentString = "#";
33 GlobalPrefix = "";
34 PrivateGlobalPrefix = ".L";
35 WeakRefDirective = "\t.weak\t";
36
37 // Uses '.section' before '.bss' directive
38 UsesELFSectionDirectiveForBSS = true;
39
40 // Debug Information
41 SupportsDebugInformation = true;
42
43 PCSymbol = ".";
44
45 // Set up DWARF directives
46 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
47
48 // Exceptions handling
49 if (!is64Bit)
50 ExceptionsType = ExceptionHandling::DwarfCFI;
51
52 ZeroDirective = "\t.space\t";
53 Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
54 HasLCOMMDirective = true;
55 AssemblerDialect = 0; // Old-Style mnemonics.
56 }
57
+0
-31
lib/Target/PowerPC/PPCMCAsmInfo.h less more
None //=====-- PPCMCAsmInfo.h - PPC asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the MCAsmInfoDarwin class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef PPCTARGETASMINFO_H
14 #define PPCTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfoDarwin.h"
17
18 namespace llvm {
19
20 struct PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
21 explicit PPCMCAsmInfoDarwin(bool is64Bit);
22 };
23
24 struct PPCLinuxMCAsmInfo : public MCAsmInfo {
25 explicit PPCLinuxMCAsmInfo(bool is64Bit);
26 };
27
28 } // namespace llvm
29
30 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "PPC.h"
14 #include "PPCMCAsmInfo.h"
1514 #include "PPCTargetMachine.h"
1615 #include "llvm/PassManager.h"
1716 #include "llvm/MC/MCStreamer.h"
1918 #include "llvm/Target/TargetRegistry.h"
2019 #include "llvm/Support/FormattedStream.h"
2120 using namespace llvm;
22
23 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
24 Triple TheTriple(TT);
25 bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
26 if (TheTriple.isOSDarwin())
27 return new PPCMCAsmInfoDarwin(isPPC64);
28 return new PPCLinuxMCAsmInfo(isPPC64);
29
30 }
3121
3222 // This is duplicated code. Refactor this.
3323 static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
4636 // Register the targets
4737 RegisterTargetMachine A(ThePPC32Target);
4838 RegisterTargetMachine B(ThePPC64Target);
49
50 RegisterAsmInfoFn C(ThePPC32Target, createMCAsmInfo);
51 RegisterAsmInfoFn D(ThePPC64Target, createMCAsmInfo);
5239
5340 // Register the MC Code Emitter
5441 TargetRegistry::RegisterCodeEmitter(ThePPC32Target, createPPCMCCodeEmitter);
1414 SparcISelDAGToDAG.cpp
1515 SparcISelLowering.cpp
1616 SparcFrameLowering.cpp
17 SparcMCAsmInfo.cpp
1817 SparcRegisterInfo.cpp
1918 SparcSubtarget.cpp
2019 SparcTargetMachine.cpp
None add_llvm_library(LLVMSparcDesc SparcMCTargetDesc.cpp)
0 add_llvm_library(LLVMSparcDesc
1 SparcMCTargetDesc.cpp
2 SparcMCAsmInfo.cpp
3 )
0 //===-- SparcMCAsmInfo.cpp - Sparc asm properties -------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SparcMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SparcMCAsmInfo.h"
14 using namespace llvm;
15
16 SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
17 Data16bitsDirective = "\t.half\t";
18 Data32bitsDirective = "\t.word\t";
19 Data64bitsDirective = 0; // .xword is only supported by V9.
20 ZeroDirective = "\t.skip\t";
21 CommentString = "!";
22 HasLEB128 = true;
23 SupportsDebugInformation = true;
24
25 SunStyleELFSectionSwitchSyntax = true;
26 UsesELFSectionDirectiveForBSS = true;
27
28 WeakRefDirective = "\t.weak\t";
29
30 PrivateGlobalPrefix = ".L";
31 }
32
33
0 //=====-- SparcMCAsmInfo.h - Sparc asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SparcMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SPARCTARGETASMINFO_H
14 #define SPARCTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct SparcELFMCAsmInfo : public MCAsmInfo {
23 explicit SparcELFMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "SparcMCTargetDesc.h"
14 #include "SparcMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createSparcMCInstrInfo() {
31 static MCInstrInfo *createSparcMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitSparcMCInstrInfo(X);
3334 return X;
3738 TargetRegistry::RegisterMCInstrInfo(TheSparcTarget, createSparcMCInstrInfo);
3839 }
3940
40 MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU,
41 StringRef FS) {
41 static MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
4243 MCSubtargetInfo *X = new MCSubtargetInfo();
4344 InitSparcMCSubtargetInfo(X, TT, CPU, FS);
4445 return X;
4849 TargetRegistry::RegisterMCSubtargetInfo(TheSparcTarget,
4950 createSparcMCSubtargetInfo);
5051 }
52
53 extern "C" void LLVMInitializeSparcMCAsmInfo() {
54 RegisterMCAsmInfo X(TheSparcTarget);
55 RegisterMCAsmInfo Y(TheSparcV9Target);
56 }
+0
-34
lib/Target/Sparc/SparcMCAsmInfo.cpp less more
None //===-- SparcMCAsmInfo.cpp - Sparc asm properties -------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SparcMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SparcMCAsmInfo.h"
14 using namespace llvm;
15
16 SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
17 Data16bitsDirective = "\t.half\t";
18 Data32bitsDirective = "\t.word\t";
19 Data64bitsDirective = 0; // .xword is only supported by V9.
20 ZeroDirective = "\t.skip\t";
21 CommentString = "!";
22 HasLEB128 = true;
23 SupportsDebugInformation = true;
24
25 SunStyleELFSectionSwitchSyntax = true;
26 UsesELFSectionDirectiveForBSS = true;
27
28 WeakRefDirective = "\t.weak\t";
29
30 PrivateGlobalPrefix = ".L";
31 }
32
33
+0
-29
lib/Target/Sparc/SparcMCAsmInfo.h less more
None //=====-- SparcMCAsmInfo.h - Sparc asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SparcMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SPARCTARGETASMINFO_H
14 #define SPARCTARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 struct SparcELFMCAsmInfo : public MCAsmInfo {
23 explicit SparcELFMCAsmInfo(const Target &T, StringRef TT);
24 };
25
26 } // namespace llvm
27
28 #endif
1010 //===----------------------------------------------------------------------===//
1111
1212 #include "Sparc.h"
13 #include "SparcMCAsmInfo.h"
1413 #include "SparcTargetMachine.h"
1514 #include "llvm/PassManager.h"
1615 #include "llvm/Target/TargetRegistry.h"
2019 // Register the target.
2120 RegisterTargetMachine X(TheSparcTarget);
2221 RegisterTargetMachine Y(TheSparcV9Target);
23
24 RegisterAsmInfo A(TheSparcTarget);
25 RegisterAsmInfo B(TheSparcV9Target);
26
2722 }
2823
2924 /// SparcTargetMachine ctor - Create an ILP32 architecture model
0 //===-- SystemZMCAsmInfo.cpp - SystemZ asm properties ---------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SystemZMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SystemZMCAsmInfo.h"
14 #include "llvm/MC/MCContext.h"
15 #include "llvm/MC/MCSectionELF.h"
16 #include "llvm/Support/ELF.h"
17 using namespace llvm;
18
19 SystemZMCAsmInfo::SystemZMCAsmInfo(const Target &T, StringRef TT) {
20 PrivateGlobalPrefix = ".L";
21 WeakRefDirective = "\t.weak\t";
22 PCSymbol = ".";
23 }
24
25 const MCSection *SystemZMCAsmInfo::
26 getNonexecutableStackSection(MCContext &Ctx) const{
27 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
28 0, SectionKind::getMetadata());
29 }
0 //====-- SystemZMCAsmInfo.h - SystemZ asm properties -----------*- C++ -*--===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SystemZMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SystemZTARGETASMINFO_H
14 #define SystemZTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17
18 namespace llvm {
19 class Target;
20 class StringRef;
21
22 struct SystemZMCAsmInfo : public MCAsmInfo {
23 explicit SystemZMCAsmInfo(const Target &T, StringRef TT);
24 virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "SystemZMCTargetDesc.h"
14 #include "SystemZMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createSystemZMCInstrInfo() {
31 static MCInstrInfo *createSystemZMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitSystemZMCInstrInfo(X);
3334 return X;
3839 createSystemZMCInstrInfo);
3940 }
4041
41 MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
42 static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT,
43 StringRef CPU,
44 StringRef FS) {
4345 MCSubtargetInfo *X = new MCSubtargetInfo();
4446 InitSystemZMCSubtargetInfo(X, TT, CPU, FS);
4547 return X;
4951 TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget,
5052 createSystemZMCSubtargetInfo);
5153 }
54
55 extern "C" void LLVMInitializeSystemZMCAsmInfo() {
56 RegisterMCAsmInfo X(TheSystemZTarget);
57 }
+0
-30
lib/Target/SystemZ/SystemZMCAsmInfo.cpp less more
None //===-- SystemZMCAsmInfo.cpp - SystemZ asm properties ---------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the SystemZMCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "SystemZMCAsmInfo.h"
14 #include "llvm/MC/MCContext.h"
15 #include "llvm/MC/MCSectionELF.h"
16 #include "llvm/Support/ELF.h"
17 using namespace llvm;
18
19 SystemZMCAsmInfo::SystemZMCAsmInfo(const Target &T, StringRef TT) {
20 PrivateGlobalPrefix = ".L";
21 WeakRefDirective = "\t.weak\t";
22 PCSymbol = ".";
23 }
24
25 const MCSection *SystemZMCAsmInfo::
26 getNonexecutableStackSection(MCContext &Ctx) const{
27 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
28 0, SectionKind::getMetadata());
29 }
+0
-30
lib/Target/SystemZ/SystemZMCAsmInfo.h less more
None //====-- SystemZMCAsmInfo.h - SystemZ asm properties -----------*- C++ -*--===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the SystemZMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef SystemZTARGETASMINFO_H
14 #define SystemZTARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17
18 namespace llvm {
19 class Target;
20 class StringRef;
21
22 struct SystemZMCAsmInfo : public MCAsmInfo {
23 explicit SystemZMCAsmInfo(const Target &T, StringRef TT);
24 virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
25 };
26
27 } // namespace llvm
28
29 #endif
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "SystemZMCAsmInfo.h"
109 #include "SystemZTargetMachine.h"
1110 #include "SystemZ.h"
1211 #include "llvm/PassManager.h"
1615 extern "C" void LLVMInitializeSystemZTarget() {
1716 // Register the target.
1817 RegisterTargetMachine X(TheSystemZTarget);
19 RegisterAsmInfo Y(TheSystemZTarget);
2018 }
2119
2220 /// SystemZTargetMachine ctor - Create an ILP64 architecture model
0 //===-- X86MCAsmInfo.cpp - X86 asm properties -----------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the X86MCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "X86MCAsmInfo.h"
14 #include "X86TargetMachine.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCExpr.h"
18 #include "llvm/MC/MCSectionELF.h"
19 #include "llvm/MC/MCStreamer.h"
20 #include "llvm/Support/CommandLine.h"
21 #include "llvm/Support/ELF.h"
22 using namespace llvm;
23
24 enum AsmWriterFlavorTy {
25 // Note: This numbering has to match the GCC assembler dialects for inline
26 // asm alternatives to work right.
27 ATT = 0, Intel = 1
28 };
29
30 static cl::opt
31 AsmWriterFlavor("x86-asm-syntax", cl::init(ATT),
32 cl::desc("Choose style of code to emit from X86 backend:"),
33 cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"),
34 clEnumValN(Intel, "intel", "Emit Intel-style assembly"),
35 clEnumValEnd));
36
37
38 static const char *const x86_asm_table[] = {
39 "{si}", "S",
40 "{di}", "D",
41 "{ax}", "a",
42 "{cx}", "c",
43 "{memory}", "memory",
44 "{flags}", "",
45 "{dirflag}", "",
46 "{fpsr}", "",
47 "{fpcr}", "",
48 "{cc}", "cc",
49 0,0};
50
51 X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
52 AsmTransCBE = x86_asm_table;
53 AssemblerDialect = AsmWriterFlavor;
54
55 bool is64Bit = Triple.getArch() == Triple::x86_64;
56
57 TextAlignFillValue = 0x90;
58
59 if (!is64Bit)
60 Data64bitsDirective = 0; // we can't emit a 64-bit unit
61
62 // Use ## as a comment string so that .s files generated by llvm can go
63 // through the GCC preprocessor without causing an error. This is needed
64 // because "clang foo.s" runs the C preprocessor, which is usually reserved
65 // for .S files on other systems. Perhaps this is because the file system
66 // wasn't always case preserving or something.
67 CommentString = "##";
68 PCSymbol = ".";
69
70 SupportsDebugInformation = true;
71 DwarfUsesInlineInfoSection = true;
72
73 // Exceptions handling
74 ExceptionsType = ExceptionHandling::DwarfCFI;
75 }
76
77 const MCExpr *
78 X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(const MCSymbol *Sym,
79 unsigned Encoding,
80 MCStreamer &Streamer) const {
81 MCContext &Context = Streamer.getContext();
82 const MCExpr *Res =
83 MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Context);
84 const MCExpr *Four = MCConstantExpr::Create(4, Context);
85 return MCBinaryExpr::CreateAdd(Res, Four, Context);
86 }
87
88 X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)
89 : X86MCAsmInfoDarwin(Triple) {
90 }
91
92 X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
93 AsmTransCBE = x86_asm_table;
94 AssemblerDialect = AsmWriterFlavor;
95
96 TextAlignFillValue = 0x90;
97
98 PrivateGlobalPrefix = ".L";
99 WeakRefDirective = "\t.weak\t";
100 PCSymbol = ".";
101
102 // Set up DWARF directives
103 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
104
105 // Debug Information
106 SupportsDebugInformation = true;
107
108 // Exceptions handling
109 ExceptionsType = ExceptionHandling::DwarfCFI;
110
111 // OpenBSD has buggy support for .quad in 32-bit mode, just split into two
112 // .words.
113 if (T.getOS() == Triple::OpenBSD && T.getArch() == Triple::x86)
114 Data64bitsDirective = 0;
115 }
116
117 const MCSection *X86ELFMCAsmInfo::
118 getNonexecutableStackSection(MCContext &Ctx) const {
119 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
120 0, SectionKind::getMetadata());
121 }
122
123 X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) {
124 if (Triple.getArch() == Triple::x86_64) {
125 GlobalPrefix = "";
126 PrivateGlobalPrefix = ".L";
127 }
128
129 AsmTransCBE = x86_asm_table;
130 AssemblerDialect = AsmWriterFlavor;
131
132 TextAlignFillValue = 0x90;
133 }
0 //=====-- X86MCAsmInfo.h - X86 asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the X86MCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef X86TARGETASMINFO_H
14 #define X86TARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17 #include "llvm/MC/MCAsmInfoCOFF.h"
18 #include "llvm/MC/MCAsmInfoDarwin.h"
19
20 namespace llvm {
21 class Triple;
22
23 struct X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
24 explicit X86MCAsmInfoDarwin(const Triple &Triple);
25 };
26
27 struct X86_64MCAsmInfoDarwin : public X86MCAsmInfoDarwin {
28 explicit X86_64MCAsmInfoDarwin(const Triple &Triple);
29 virtual const MCExpr *
30 getExprForPersonalitySymbol(const MCSymbol *Sym,
31 unsigned Encoding,
32 MCStreamer &Streamer) const;
33 };
34
35 struct X86ELFMCAsmInfo : public MCAsmInfo {
36 explicit X86ELFMCAsmInfo(const Triple &Triple);
37 virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
38 };
39
40 struct X86MCAsmInfoCOFF : public MCAsmInfoCOFF {
41 explicit X86MCAsmInfoCOFF(const Triple &Triple);
42 };
43 } // namespace llvm
44
45 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "X86MCTargetDesc.h"
14 #include "X86MCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
129130 return X;
130131 }
131132
132 MCInstrInfo *createX86MCInstrInfo() {
133 // Force static initialization.
134 extern "C" void LLVMInitializeX86MCSubtargetInfo() {
135 TargetRegistry::RegisterMCSubtargetInfo(TheX86_32Target,
136 X86_MC::createX86MCSubtargetInfo);
137 TargetRegistry::RegisterMCSubtargetInfo(TheX86_64Target,
138 X86_MC::createX86MCSubtargetInfo);
139 }
140
141 static MCInstrInfo *createX86MCInstrInfo() {
133142 MCInstrInfo *X = new MCInstrInfo();
134143 InitX86MCInstrInfo(X);
135144 return X;
136145 }
137146
138 MCRegisterInfo *createX86MCRegisterInfo() {
147 extern "C" void LLVMInitializeX86MCInstrInfo() {
148 TargetRegistry::RegisterMCInstrInfo(TheX86_32Target, createX86MCInstrInfo);
149 TargetRegistry::RegisterMCInstrInfo(TheX86_64Target, createX86MCInstrInfo);
150 }
151
152 static MCRegisterInfo *createX86MCRegisterInfo() {
139153 MCRegisterInfo *X = new MCRegisterInfo();
140154 InitX86MCRegisterInfo(X);
141155 return X;
142 }
143
144 // Force static initialization.
145 extern "C" void LLVMInitializeX86MCInstrInfo() {
146 TargetRegistry::RegisterMCInstrInfo(TheX86_32Target, createX86MCInstrInfo);
147 TargetRegistry::RegisterMCInstrInfo(TheX86_64Target, createX86MCInstrInfo);
148156 }
149157
150158 extern "C" void LLVMInitializeX86MCRegInfo() {
153161 }
154162
155163
156 extern "C" void LLVMInitializeX86MCSubtargetInfo() {
157 TargetRegistry::RegisterMCSubtargetInfo(TheX86_32Target,
158 X86_MC::createX86MCSubtargetInfo);
159 TargetRegistry::RegisterMCSubtargetInfo(TheX86_64Target,
160 X86_MC::createX86MCSubtargetInfo);
164 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
165 Triple TheTriple(TT);
166
167 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) {
168 if (TheTriple.getArch() == Triple::x86_64)
169 return new X86_64MCAsmInfoDarwin(TheTriple);
170 else
171 return new X86MCAsmInfoDarwin(TheTriple);
172 }
173
174 if (TheTriple.isOSWindows())
175 return new X86MCAsmInfoCOFF(TheTriple);
176
177 return new X86ELFMCAsmInfo(TheTriple);
161178 }
179
180 extern "C" void LLVMInitializeX86MCAsmInfo() {
181 // Register the target asm info.
182 RegisterMCAsmInfoFn A(TheX86_32Target, createMCAsmInfo);
183 RegisterMCAsmInfoFn B(TheX86_64Target, createMCAsmInfo);
184 }
+0
-134
lib/Target/X86/X86MCAsmInfo.cpp less more
None //===-- X86MCAsmInfo.cpp - X86 asm properties -----------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declarations of the X86MCAsmInfo properties.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "X86MCAsmInfo.h"
14 #include "X86TargetMachine.h"
15 #include "llvm/ADT/Triple.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCExpr.h"
18 #include "llvm/MC/MCSectionELF.h"
19 #include "llvm/MC/MCStreamer.h"
20 #include "llvm/Support/CommandLine.h"
21 #include "llvm/Support/ELF.h"
22 using namespace llvm;
23
24 enum AsmWriterFlavorTy {
25 // Note: This numbering has to match the GCC assembler dialects for inline
26 // asm alternatives to work right.
27 ATT = 0, Intel = 1
28 };
29
30 static cl::opt
31 AsmWriterFlavor("x86-asm-syntax", cl::init(ATT),
32 cl::desc("Choose style of code to emit from X86 backend:"),
33 cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"),
34 clEnumValN(Intel, "intel", "Emit Intel-style assembly"),
35 clEnumValEnd));
36
37
38 static const char *const x86_asm_table[] = {
39 "{si}", "S",
40 "{di}", "D",
41 "{ax}", "a",
42 "{cx}", "c",
43 "{memory}", "memory",
44 "{flags}", "",
45 "{dirflag}", "",
46 "{fpsr}", "",
47 "{fpcr}", "",
48 "{cc}", "cc",
49 0,0};
50
51 X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
52 AsmTransCBE = x86_asm_table;
53 AssemblerDialect = AsmWriterFlavor;
54
55 bool is64Bit = Triple.getArch() == Triple::x86_64;
56
57 TextAlignFillValue = 0x90;
58
59 if (!is64Bit)
60 Data64bitsDirective = 0; // we can't emit a 64-bit unit
61
62 // Use ## as a comment string so that .s files generated by llvm can go
63 // through the GCC preprocessor without causing an error. This is needed
64 // because "clang foo.s" runs the C preprocessor, which is usually reserved
65 // for .S files on other systems. Perhaps this is because the file system
66 // wasn't always case preserving or something.
67 CommentString = "##";
68 PCSymbol = ".";
69
70 SupportsDebugInformation = true;
71 DwarfUsesInlineInfoSection = true;
72
73 // Exceptions handling
74 ExceptionsType = ExceptionHandling::DwarfCFI;
75 }
76
77 const MCExpr *
78 X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(const MCSymbol *Sym,
79 unsigned Encoding,
80 MCStreamer &Streamer) const {
81 MCContext &Context = Streamer.getContext();
82 const MCExpr *Res =
83 MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Context);
84 const MCExpr *Four = MCConstantExpr::Create(4, Context);
85 return MCBinaryExpr::CreateAdd(Res, Four, Context);
86 }
87
88 X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)
89 : X86MCAsmInfoDarwin(Triple) {
90 }
91
92 X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
93 AsmTransCBE = x86_asm_table;
94 AssemblerDialect = AsmWriterFlavor;
95
96 TextAlignFillValue = 0x90;
97
98 PrivateGlobalPrefix = ".L";
99 WeakRefDirective = "\t.weak\t";
100 PCSymbol = ".";
101
102 // Set up DWARF directives
103 HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
104
105 // Debug Information
106 SupportsDebugInformation = true;
107
108 // Exceptions handling
109 ExceptionsType = ExceptionHandling::DwarfCFI;
110
111 // OpenBSD has buggy support for .quad in 32-bit mode, just split into two
112 // .words.
113 if (T.getOS() == Triple::OpenBSD && T.getArch() == Triple::x86)
114 Data64bitsDirective = 0;
115 }
116
117 const MCSection *X86ELFMCAsmInfo::
118 getNonexecutableStackSection(MCContext &Ctx) const {
119 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
120 0, SectionKind::getMetadata());
121 }
122
123 X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) {
124 if (Triple.getArch() == Triple::x86_64) {
125 GlobalPrefix = "";
126 PrivateGlobalPrefix = ".L";
127 }
128
129 AsmTransCBE = x86_asm_table;
130 AssemblerDialect = AsmWriterFlavor;
131
132 TextAlignFillValue = 0x90;
133 }
+0
-46
lib/Target/X86/X86MCAsmInfo.h less more
None //=====-- X86MCAsmInfo.h - X86 asm properties -----------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the X86MCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef X86TARGETASMINFO_H
14 #define X86TARGETASMINFO_H
15
16 #include "llvm/MC/MCAsmInfo.h"
17 #include "llvm/MC/MCAsmInfoCOFF.h"
18 #include "llvm/MC/MCAsmInfoDarwin.h"
19
20 namespace llvm {
21 class Triple;
22
23 struct X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
24 explicit X86MCAsmInfoDarwin(const Triple &Triple);
25 };
26
27 struct X86_64MCAsmInfoDarwin : public X86MCAsmInfoDarwin {
28 explicit X86_64MCAsmInfoDarwin(const Triple &Triple);
29 virtual const MCExpr *
30 getExprForPersonalitySymbol(const MCSymbol *Sym,
31 unsigned Encoding,
32 MCStreamer &Streamer) const;
33 };
34
35 struct X86ELFMCAsmInfo : public MCAsmInfo {
36 explicit X86ELFMCAsmInfo(const Triple &Triple);
37 virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
38 };
39
40 struct X86MCAsmInfoCOFF : public MCAsmInfoCOFF {
41 explicit X86MCAsmInfoCOFF(const Triple &Triple);
42 };
43 } // namespace llvm
44
45 #endif
1515 #include "X86MCInstLower.h"
1616 #include "X86AsmPrinter.h"
1717 #include "X86COFFMachineModuleInfo.h"
18 #include "X86MCAsmInfo.h"
1918 #include "llvm/CodeGen/MachineModuleInfoImpls.h"
19 #include "llvm/MC/MCAsmInfo.h"
2020 #include "llvm/MC/MCContext.h"
2121 #include "llvm/MC/MCExpr.h"
2222 #include "llvm/MC/MCInst.h"
1010 //
1111 //===----------------------------------------------------------------------===//
1212
13 #include "X86MCAsmInfo.h"
1413 #include "X86TargetMachine.h"
1514 #include "X86.h"
1615 #include "llvm/PassManager.h"
2322 #include "llvm/Target/TargetRegistry.h"
2423 using namespace llvm;
2524
26 static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
27 Triple TheTriple(TT);
28
29 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) {
30 if (TheTriple.getArch() == Triple::x86_64)
31 return new X86_64MCAsmInfoDarwin(TheTriple);
32 else
33 return new X86MCAsmInfoDarwin(TheTriple);
34 }
35
36 if (TheTriple.isOSWindows())
37 return new X86MCAsmInfoCOFF(TheTriple);
38
39 return new X86ELFMCAsmInfo(TheTriple);
40 }
41
4225 static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
4326 MCContext &Ctx, TargetAsmBackend &TAB,
4427 raw_ostream &_OS,
6043 // Register the target.
6144 RegisterTargetMachine X(TheX86_32Target);
6245 RegisterTargetMachine Y(TheX86_64Target);
63
64 // Register the target asm info.
65 RegisterAsmInfoFn A(TheX86_32Target, createMCAsmInfo);
66 RegisterAsmInfoFn B(TheX86_64Target, createMCAsmInfo);
6746
6847 // Register the code emitter.
6948 TargetRegistry::RegisterCodeEmitter(TheX86_32Target,
0 //===-- XCoreMCAsmInfo.cpp - XCore asm properties -------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "XCoreMCAsmInfo.h"
10 using namespace llvm;
11
12 XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) {
13 SupportsDebugInformation = true;
14 Data16bitsDirective = "\t.short\t";
15 Data32bitsDirective = "\t.long\t";
16 Data64bitsDirective = 0;
17 ZeroDirective = "\t.space\t";
18 CommentString = "#";
19
20 PrivateGlobalPrefix = ".L";
21 AscizDirective = ".asciiz";
22 WeakDefDirective = "\t.weak\t";
23 WeakRefDirective = "\t.weak\t";
24
25 // Debug
26 HasLEB128 = true;
27 }
28
0 //=====-- XCoreMCAsmInfo.h - XCore asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the XCoreMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef XCORETARGETASMINFO_H
14 #define XCORETARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class XCoreMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit XCoreMCAsmInfo(const Target &T, StringRef TT);
25 };
26
27 } // namespace llvm
28
29 #endif
1111 //===----------------------------------------------------------------------===//
1212
1313 #include "XCoreMCTargetDesc.h"
14 #include "XCoreMCAsmInfo.h"
1415 #include "llvm/MC/MCInstrInfo.h"
1516 #include "llvm/MC/MCRegisterInfo.h"
1617 #include "llvm/MC/MCSubtargetInfo.h"
2728
2829 using namespace llvm;
2930
30 MCInstrInfo *createXCoreMCInstrInfo() {
31 static MCInstrInfo *createXCoreMCInstrInfo() {
3132 MCInstrInfo *X = new MCInstrInfo();
3233 InitXCoreMCInstrInfo(X);
3334 return X;
3738 TargetRegistry::RegisterMCInstrInfo(TheXCoreTarget, createXCoreMCInstrInfo);
3839 }
3940
40 MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU,
41 StringRef FS) {
41 static MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU,
42 StringRef FS) {
4243 MCSubtargetInfo *X = new MCSubtargetInfo();
4344 InitXCoreMCSubtargetInfo(X, TT, CPU, FS);
4445 return X;
4849 TargetRegistry::RegisterMCSubtargetInfo(TheXCoreTarget,
4950 createXCoreMCSubtargetInfo);
5051 }
52
53 extern "C" void LLVMInitializeXCoreMCAsmInfo() {
54 RegisterMCAsmInfo X(TheXCoreTarget);
55 }
1515 #include "XCore.h"
1616 #include "XCoreInstrInfo.h"
1717 #include "XCoreSubtarget.h"
18 #include "XCoreMCAsmInfo.h"
1918 #include "XCoreTargetMachine.h"
2019 #include "llvm/Constants.h"
2120 #include "llvm/DerivedTypes.h"
2625 #include "llvm/CodeGen/MachineConstantPool.h"
2726 #include "llvm/CodeGen/MachineInstr.h"
2827 #include "llvm/CodeGen/MachineJumpTableInfo.h"
28 #include "llvm/MC/MCAsmInfo.h"
2929 #include "llvm/MC/MCStreamer.h"
3030 #include "llvm/MC/MCSymbol.h"
3131 #include "llvm/Target/Mangler.h"
+0
-29
lib/Target/XCore/XCoreMCAsmInfo.cpp less more
None //===-- XCoreMCAsmInfo.cpp - XCore asm properties -------------------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "XCoreMCAsmInfo.h"
10 using namespace llvm;
11
12 XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) {
13 SupportsDebugInformation = true;
14 Data16bitsDirective = "\t.short\t";
15 Data32bitsDirective = "\t.long\t";
16 Data64bitsDirective = 0;
17 ZeroDirective = "\t.space\t";
18 CommentString = "#";
19
20 PrivateGlobalPrefix = ".L";
21 AscizDirective = ".asciiz";
22 WeakDefDirective = "\t.weak\t";
23 WeakRefDirective = "\t.weak\t";
24
25 // Debug
26 HasLEB128 = true;
27 }
28
+0
-30
lib/Target/XCore/XCoreMCAsmInfo.h less more
None //=====-- XCoreMCAsmInfo.h - XCore asm properties -------------*- C++ -*--====//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the declaration of the XCoreMCAsmInfo class.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef XCORETARGETASMINFO_H
14 #define XCORETARGETASMINFO_H
15
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/MC/MCAsmInfo.h"
18
19 namespace llvm {
20 class Target;
21
22 class XCoreMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit XCoreMCAsmInfo(const Target &T, StringRef TT);
25 };
26
27 } // namespace llvm
28
29 #endif
99 //
1010 //===----------------------------------------------------------------------===//
1111
12 #include "XCoreMCAsmInfo.h"
1312 #include "XCoreTargetMachine.h"
1413 #include "XCore.h"
1514 #include "llvm/Module.h"
4140 // Force static initialization.
4241 extern "C" void LLVMInitializeXCoreTarget() {
4342 RegisterTargetMachine X(TheXCoreTarget);
44 RegisterAsmInfo Y(TheXCoreTarget);
4543 }
200200
201201 // Initialize targets first, so that --version shows registered targets.
202202 InitializeAllTargets();
203 InitializeAllMCAsmInfos();
203204 InitializeAllMCInstrInfos();
204205 InitializeAllMCSubtargetInfos();
205206 InitializeAllAsmPrinters();
131131 MemoryBuffer &Buffer,
132132 raw_ostream &Out) {
133133 // Set up disassembler.
134 OwningPtr AsmInfo(T.createAsmInfo(Triple));
134 OwningPtr AsmInfo(T.createMCAsmInfo(Triple));
135135
136136 if (!AsmInfo) {
137137 errs() << "error: no assembly info for target " << Triple << "\n";
195195 if (!TheTarget)
196196 return 1;
197197
198 llvm::OwningPtr MAI(TheTarget->createAsmInfo(TripleName));
198 llvm::OwningPtr MAI(TheTarget->createMCAsmInfo(TripleName));
199199 assert(MAI && "Unable to create target asm info!");
200200
201201 AsmLexer Lexer(*MAI);
305305 SrcMgr.setIncludeDirs(IncludeDirs);
306306
307307
308 llvm::OwningPtr MAI(TheTarget->createAsmInfo(TripleName));
308 llvm::OwningPtr MAI(TheTarget->createMCAsmInfo(TripleName));
309309 assert(MAI && "Unable to create target asm info!");
310310
311311 // Package up features to be passed to target/subtarget
435435 llvm::InitializeAllTargetInfos();
436436 // FIXME: We shouldn't need to initialize the Target(Machine)s.
437437 llvm::InitializeAllTargets();
438 llvm::InitializeAllMCAsmInfos();
438439 llvm::InitializeAllMCInstrInfos();
439440 llvm::InitializeAllMCSubtargetInfos();
440441 llvm::InitializeAllAsmPrinters();
173173 outs() << "Disassembly of section " << name << ":\n\n";
174174
175175 // Set up disassembler.
176 OwningPtr AsmInfo(TheTarget->createAsmInfo(TripleName));