[llvm-commits] [llvm] r135219 - in /llvm/trunk: ./ autoconf/ cmake/ include/llvm-c/ include/llvm/Config/ include/llvm/Target/ lib/CodeGen/ lib/MC/MCDisassembler/ lib/Target/ARM/ lib/Target/ARM/MCTargetDesc/ lib/Target/Alpha/ lib/Target/Alpha/MCTa
Evan Cheng
evan.cheng at apple.com
Thu Jul 14 17:29:34 PDT 2011
Sorry and thanks!
Evan
On Jul 14, 2011, at 5:10 PM, Chandler Carruth wrote:
> FYI, this broke CMake, but I'm working on a patch to update it... will commit ASAP. If someone else was already on it and beats me to it, all the better. =D
>
> On Thu, Jul 14, 2011 at 4:50 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> Author: evancheng
> Date: Thu Jul 14 18:50:31 2011
> New Revision: 135219
>
> URL: http://llvm.org/viewvc/llvm-project?rev=135219&view=rev
> Log:
> Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
>
> Added:
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h
> llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp
> llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h
> llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
> llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h
> llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp
> llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h
> llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp
> llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h
> llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp
> llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h
> llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp
> llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h
> llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp
> llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h
> llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp
> llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h
> llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp
> llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h
> llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
> llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h
> llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp
> llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/X86/X86MCAsmInfo.h
> llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
> - copied unchanged from r135183, llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp
> llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h
> - copied unchanged from r135183, llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h
> Removed:
> llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp
> llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h
> llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp
> llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h
> llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
> llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h
> llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp
> llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h
> llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp
> llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h
> llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp
> llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h
> llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp
> llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h
> llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp
> llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h
> llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp
> llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h
> llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp
> llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h
> llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
> llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h
> llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp
> llvm/trunk/lib/Target/X86/X86MCAsmInfo.h
> llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp
> llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h
> Modified:
> llvm/trunk/autoconf/configure.ac
> llvm/trunk/cmake/config-ix.cmake
> llvm/trunk/configure
> llvm/trunk/include/llvm-c/Target.h
> llvm/trunk/include/llvm/Config/config.h.cmake
> llvm/trunk/include/llvm/Config/config.h.in
> llvm/trunk/include/llvm/Config/llvm-config.h.cmake
> llvm/trunk/include/llvm/Config/llvm-config.h.in
> llvm/trunk/include/llvm/Target/TargetRegistry.h
> llvm/trunk/include/llvm/Target/TargetSelect.h
> llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
> llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
> llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp
> llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp
> llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp
> llvm/trunk/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/Blackfin/BlackfinTargetMachine.cpp
> llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp
> llvm/trunk/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/CBackend/CBackend.cpp
> llvm/trunk/lib/Target/CellSPU/CMakeLists.txt
> llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp
> llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp
> llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
> llvm/trunk/lib/Target/MBlaze/CMakeLists.txt
> llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp
> llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp
> llvm/trunk/lib/Target/MSP430/CMakeLists.txt
> llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
> llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
> llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
> llvm/trunk/lib/Target/Mips/CMakeLists.txt
> llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
> llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
> llvm/trunk/lib/Target/PTX/CMakeLists.txt
> llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp
> llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
> llvm/trunk/lib/Target/PowerPC/CMakeLists.txt
> llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
> llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
> llvm/trunk/lib/Target/Sparc/CMakeLists.txt
> llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
> llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
> llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
> llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
> llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp
> llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
> llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
> llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
> llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
> llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
> llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp
> llvm/trunk/tools/llc/llc.cpp
> llvm/trunk/tools/llvm-mc/Disassembler.cpp
> llvm/trunk/tools/llvm-mc/llvm-mc.cpp
> llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
> llvm/trunk/tools/lto/LTOCodeGenerator.cpp
> llvm/trunk/tools/lto/LTOModule.cpp
>
> Modified: llvm/trunk/autoconf/configure.ac
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/autoconf/configure.ac (original)
> +++ llvm/trunk/autoconf/configure.ac Thu Jul 14 18:50:31 2011
> @@ -658,6 +658,7 @@
> [LLVM architecture name for the native architecture, if available])
> LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
> LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
> + LLVM_NATIVE_MCASMINFO="LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo"
> LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
> if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
> LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
> @@ -666,6 +667,8 @@
> [LLVM name for the native Target init function, if available])
> AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO,
> [LLVM name for the native TargetInfo init function, if available])
> + AC_DEFINE_UNQUOTED(LLVM_NATIVE_MCASMINFO, $LLVM_NATIVE_MCASMINFO,
> + [LLVM name for the native MCAsmInfo init function, if available])
> AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER,
> [LLVM name for the native AsmPrinter init function, if available])
> if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
>
> Modified: llvm/trunk/cmake/config-ix.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/cmake/config-ix.cmake (original)
> +++ llvm/trunk/cmake/config-ix.cmake Thu Jul 14 18:50:31 2011
> @@ -336,6 +336,7 @@
> message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}")
> set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
> set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
> + set(LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo)
> set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
> endif ()
>
>
> Modified: llvm/trunk/configure
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/configure (original)
> +++ llvm/trunk/configure Thu Jul 14 18:50:31 2011
> @@ -5120,6 +5120,7 @@
>
> LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
> LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
> + LLVM_NATIVE_MCASMINFO="LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo"
> LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
> if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then
> LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
> @@ -5136,6 +5137,11 @@
>
>
> cat >>confdefs.h <<_ACEOF
> +#define LLVM_NATIVE_MCASMINFO $LLVM_NATIVE_MCASMINFO
> +_ACEOF
> +
> +
> +cat >>confdefs.h <<_ACEOF
> #define LLVM_NATIVE_ASMPRINTER $LLVM_NATIVE_ASMPRINTER
> _ACEOF
>
>
> Modified: llvm/trunk/include/llvm-c/Target.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Target.h (original)
> +++ llvm/trunk/include/llvm-c/Target.h Thu Jul 14 18:50:31 2011
> @@ -41,6 +41,11 @@
> #include "llvm/Config/Targets.def"
> #undef LLVM_TARGET /* Explicit undef to make SWIG happier */
>
> +#define LLVM_TARGET(TargetName) \
> + void LLVMInitialize##TargetName##MCAsmInfo(void);
> +#include "llvm/Config/Targets.def"
> +#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
> +
> /** LLVMInitializeAllTargetInfos - The main program should call this function if
> it wants access to all available targets that LLVM is configured to
> support. */
> @@ -67,6 +72,7 @@
> #ifdef LLVM_NATIVE_TARGET
> LLVM_NATIVE_TARGETINFO();
> LLVM_NATIVE_TARGET();
> + LLVM_NATIVE_MCASMINFO();
> return 0;
> #else
> return 1;
>
> Modified: llvm/trunk/include/llvm/Config/config.h.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/config.h.cmake (original)
> +++ llvm/trunk/include/llvm/Config/config.h.cmake Thu Jul 14 18:50:31 2011
> @@ -557,6 +557,9 @@
> /* LLVM name for the native TargetInfo init function, if available */
> #cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
>
> +/* LLVM name for the native MCAsmInfo init function, if available */
> +#cmakedefine LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo
> +
> /* Define if this is Unixish platform */
> #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
>
>
> Modified: llvm/trunk/include/llvm/Config/config.h.in
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/config.h.in (original)
> +++ llvm/trunk/include/llvm/Config/config.h.in Thu Jul 14 18:50:31 2011
> @@ -573,6 +573,9 @@
> /* LLVM name for the native AsmPrinter init function, if available */
> #undef LLVM_NATIVE_ASMPRINTER
>
> +/* LLVM name for the native MCAsmInfo init function, if available */
> +#undef LLVM_NATIVE_MCASMINFO
> +
> /* LLVM name for the native Target init function, if available */
> #undef LLVM_NATIVE_TARGET
>
>
> Modified: llvm/trunk/include/llvm/Config/llvm-config.h.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.cmake?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/llvm-config.h.cmake (original)
> +++ llvm/trunk/include/llvm/Config/llvm-config.h.cmake Thu Jul 14 18:50:31 2011
> @@ -58,6 +58,9 @@
> /* LLVM name for the native TargetInfo init function, if available */
> #cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
>
> +/* LLVM name for the native MCAsmInfo init function, if available */
> +#cmakedefine LLVM_NATIVE_MCASMINFO LLVMInitialize${LLVM_NATIVE_ARCH}MCAsmInfo
> +
> /* LLVM name for the native AsmPrinter init function, if available */
> #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter
>
>
> Modified: llvm/trunk/include/llvm/Config/llvm-config.h.in
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/llvm-config.h.in?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Config/llvm-config.h.in (original)
> +++ llvm/trunk/include/llvm/Config/llvm-config.h.in Thu Jul 14 18:50:31 2011
> @@ -58,6 +58,9 @@
> /* LLVM name for the native TargetInfo init function, if available */
> #undef LLVM_NATIVE_TARGETINFO
>
> +/* LLVM name for the native MCAsmInfo init function, if available */
> +#undef LLVM_NATIVE_MCASMINFO
> +
> /* LLVM name for the native AsmPrinter init function, if available */
> #undef LLVM_NATIVE_ASMPRINTER
>
>
> Modified: llvm/trunk/include/llvm/Target/TargetRegistry.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegistry.h?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/TargetRegistry.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetRegistry.h Thu Jul 14 18:50:31 2011
> @@ -66,8 +66,8 @@
>
> typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT);
>
> - typedef MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T,
> - StringRef TT);
> + typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const Target &T,
> + StringRef TT);
> typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void);
> typedef MCRegisterInfo *(*MCRegInfoCtorFnTy)(void);
> typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT,
> @@ -128,9 +128,9 @@
> /// HasJIT - Whether this target supports the JIT.
> bool HasJIT;
>
> - /// AsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
> + /// MCAsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
> /// registered.
> - AsmInfoCtorFnTy AsmInfoCtorFn;
> + MCAsmInfoCtorFnTy MCAsmInfoCtorFn;
>
> /// MCInstrInfoCtorFn - Constructor function for this target's MCInstrInfo,
> /// if registered.
> @@ -240,17 +240,17 @@
> /// @name Feature Constructors
> /// @{
>
> - /// createAsmInfo - Create a MCAsmInfo implementation for the specified
> + /// createMCAsmInfo - Create a MCAsmInfo implementation for the specified
> /// target triple.
> ///
> /// \arg Triple - This argument is used to determine the target machine
> /// feature set; it should always be provided. Generally this should be
> /// either the target triple from the module, or the target triple of the
> /// host if that does not exist.
> - MCAsmInfo *createAsmInfo(StringRef Triple) const {
> - if (!AsmInfoCtorFn)
> + MCAsmInfo *createMCAsmInfo(StringRef Triple) const {
> + if (!MCAsmInfoCtorFn)
> return 0;
> - return AsmInfoCtorFn(*this, Triple);
> + return MCAsmInfoCtorFn(*this, Triple);
> }
>
> /// createMCInstrInfo - Create a MCInstrInfo implementation.
> @@ -485,7 +485,7 @@
> Target::TripleMatchQualityFnTy TQualityFn,
> bool HasJIT = false);
>
> - /// RegisterAsmInfo - Register a MCAsmInfo implementation for the
> + /// RegisterMCAsmInfo - Register a MCAsmInfo implementation for the
> /// given target.
> ///
> /// Clients are responsible for ensuring that registration doesn't occur
> @@ -494,10 +494,10 @@
> ///
> /// @param T - The target being registered.
> /// @param Fn - A function to construct a MCAsmInfo for the target.
> - static void RegisterAsmInfo(Target &T, Target::AsmInfoCtorFnTy Fn) {
> + static void RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
> // Ignore duplicate registration.
> - if (!T.AsmInfoCtorFn)
> - T.AsmInfoCtorFn = Fn;
> + if (!T.MCAsmInfoCtorFn)
> + T.MCAsmInfoCtorFn = Fn;
> }
>
> /// RegisterMCInstrInfo - Register a MCInstrInfo implementation for the
> @@ -722,18 +722,18 @@
> }
> };
>
> - /// RegisterAsmInfo - Helper template for registering a target assembly info
> + /// RegisterMCAsmInfo - Helper template for registering a target assembly info
> /// implementation. This invokes the static "Create" method on the class to
> /// actually do the construction. Usage:
> ///
> /// extern "C" void LLVMInitializeFooTarget() {
> /// extern Target TheFooTarget;
> - /// RegisterAsmInfo<FooMCAsmInfo> X(TheFooTarget);
> + /// RegisterMCAsmInfo<FooMCAsmInfo> X(TheFooTarget);
> /// }
> template<class MCAsmInfoImpl>
> - struct RegisterAsmInfo {
> - RegisterAsmInfo(Target &T) {
> - TargetRegistry::RegisterAsmInfo(T, &Allocator);
> + struct RegisterMCAsmInfo {
> + RegisterMCAsmInfo(Target &T) {
> + TargetRegistry::RegisterMCAsmInfo(T, &Allocator);
> }
> private:
> static MCAsmInfo *Allocator(const Target &T, StringRef TT) {
> @@ -742,17 +742,17 @@
>
> };
>
> - /// RegisterAsmInfoFn - Helper template for registering a target assembly info
> + /// RegisterMCAsmInfoFn - Helper template for registering a target assembly info
> /// implementation. This invokes the specified function to do the
> /// construction. Usage:
> ///
> /// extern "C" void LLVMInitializeFooTarget() {
> /// extern Target TheFooTarget;
> - /// RegisterAsmInfoFn X(TheFooTarget, TheFunction);
> + /// RegisterMCAsmInfoFn X(TheFooTarget, TheFunction);
> /// }
> - struct RegisterAsmInfoFn {
> - RegisterAsmInfoFn(Target &T, Target::AsmInfoCtorFnTy Fn) {
> - TargetRegistry::RegisterAsmInfo(T, Fn);
> + struct RegisterMCAsmInfoFn {
> + RegisterMCAsmInfoFn(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
> + TargetRegistry::RegisterMCAsmInfo(T, Fn);
> }
> };
>
>
> Modified: llvm/trunk/include/llvm/Target/TargetSelect.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelect.h?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/TargetSelect.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetSelect.h Thu Jul 14 18:50:31 2011
> @@ -27,6 +27,10 @@
> #include "llvm/Config/Targets.def"
>
> #define LLVM_TARGET(TargetName) \
> + void LLVMInitialize##TargetName##MCAsmInfo();
> +#include "llvm/Config/Targets.def"
> +
> +#define LLVM_TARGET(TargetName) \
> void LLVMInitialize##TargetName##MCInstrInfo();
> #include "llvm/Config/Targets.def"
>
> @@ -72,6 +76,17 @@
> #include "llvm/Config/Targets.def"
> }
>
> + /// InitializeAllMCAsmInfos - The main program should call this function
> + /// if it wants access to all available assembly infos for targets that
> + /// LLVM is configured to support, to make them available via the
> + /// TargetRegistry.
> + ///
> + /// It is legal for a client to make multiple calls to this function.
> + inline void InitializeAllMCAsmInfos() {
> +#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##MCAsmInfo();
> +#include "llvm/Config/Targets.def"
> + }
> +
> /// InitializeAllMCInstrInfos - The main program should call this function
> /// if it wants access to all available instruction infos for targets that
> /// LLVM is configured to support, to make them available via the
> @@ -133,6 +148,7 @@
> #ifdef LLVM_NATIVE_TARGET
> LLVM_NATIVE_TARGETINFO();
> LLVM_NATIVE_TARGET();
> + LLVM_NATIVE_MCASMINFO();
> return false;
> #else
> return true;
>
> Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -105,7 +105,7 @@
> LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
> StringRef CPU, StringRef FS)
> : TargetMachine(T, Triple, CPU, FS) {
> - AsmInfo = T.createAsmInfo(Triple);
> + AsmInfo = T.createMCAsmInfo(Triple);
> }
>
> // Set the default code model for the JIT for a generic target.
>
> Modified: llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp (original)
> +++ llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp Thu Jul 14 18:50:31 2011
> @@ -40,6 +40,7 @@
> llvm::InitializeAllTargetInfos();
> // FIXME: We shouldn't need to initialize the Target(Machine)s.
> llvm::InitializeAllTargets();
> + llvm::InitializeAllMCAsmInfos();
> llvm::InitializeAllAsmPrinters();
> llvm::InitializeAllAsmParsers();
> llvm::InitializeAllDisassemblers();
> @@ -50,7 +51,7 @@
> assert(TheTarget && "Unable to create target!");
>
> // Get the assembler info needed to setup the MCContext.
> - const MCAsmInfo *MAI = TheTarget->createAsmInfo(TripleName);
> + const MCAsmInfo *MAI = TheTarget->createMCAsmInfo(TripleName);
> assert(MAI && "Unable to create target asm info!");
>
> // Package up features to be passed to target/subtarget
>
> Modified: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp (original)
> +++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Thu Jul 14 18:50:31 2011
> @@ -107,6 +107,7 @@
>
> InitializeAllTargetInfos();
> InitializeAllTargets();
> + InitializeAllMCAsmInfos();
> InitializeAllAsmPrinters();
> InitializeAllAsmParsers();
> InitializeAllDisassemblers();
> @@ -180,7 +181,7 @@
>
> initMaps(*registerInfo);
>
> - AsmInfo.reset(Tgt->createAsmInfo(tripleString));
> + AsmInfo.reset(Tgt->createMCAsmInfo(tripleString));
>
> if (!AsmInfo)
> return;
>
> Removed: llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.cpp (removed)
> @@ -1,78 +0,0 @@
> -//===-- ARMMCAsmInfo.cpp - ARM asm properties -------------------*- C++ -*-===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the ARMMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "ARMMCAsmInfo.h"
> -#include "llvm/Support/CommandLine.h"
> -
> -using namespace llvm;
> -
> -cl::opt<bool>
> -EnableARMEHABI("arm-enable-ehabi", cl::Hidden,
> - cl::desc("Generate ARM EHABI tables"),
> - cl::init(false));
> -
> -
> -static const char *const arm_asm_table[] = {
> - "{r0}", "r0",
> - "{r1}", "r1",
> - "{r2}", "r2",
> - "{r3}", "r3",
> - "{r4}", "r4",
> - "{r5}", "r5",
> - "{r6}", "r6",
> - "{r7}", "r7",
> - "{r8}", "r8",
> - "{r9}", "r9",
> - "{r10}", "r10",
> - "{r11}", "r11",
> - "{r12}", "r12",
> - "{r13}", "r13",
> - "{r14}", "r14",
> - "{lr}", "lr",
> - "{sp}", "sp",
> - "{ip}", "ip",
> - "{fp}", "fp",
> - "{sl}", "sl",
> - "{memory}", "memory",
> - "{cc}", "cc",
> - 0,0
> -};
> -
> -ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
> - AsmTransCBE = arm_asm_table;
> - Data64bitsDirective = 0;
> - CommentString = "@";
> - SupportsDebugInformation = true;
> -
> - // Exceptions handling
> - ExceptionsType = ExceptionHandling::SjLj;
> -}
> -
> -ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
> - // ".comm align is in bytes but .align is pow-2."
> - AlignmentIsInBytes = false;
> -
> - Data64bitsDirective = 0;
> - CommentString = "@";
> -
> - HasLEB128 = true;
> - PrivateGlobalPrefix = ".L";
> - WeakRefDirective = "\t.weak\t";
> - HasLCOMMDirective = true;
> -
> - SupportsDebugInformation = true;
> -
> - // Exceptions handling
> - if (EnableARMEHABI)
> - ExceptionsType = ExceptionHandling::ARM;
> -}
>
> Removed: llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/ARM/ARMMCAsmInfo.h (removed)
> @@ -1,31 +0,0 @@
> -//=====-- ARMMCAsmInfo.h - ARM asm properties -------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the ARMMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef LLVM_ARMTARGETASMINFO_H
> -#define LLVM_ARMTARGETASMINFO_H
> -
> -#include "llvm/MC/MCAsmInfoDarwin.h"
> -
> -namespace llvm {
> -
> - struct ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
> - explicit ARMMCAsmInfoDarwin();
> - };
> -
> - struct ARMELFMCAsmInfo : public MCAsmInfo {
> - explicit ARMELFMCAsmInfo();
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -11,7 +11,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "ARMTargetMachine.h"
> -#include "ARMMCAsmInfo.h"
> #include "ARMFrameLowering.h"
> #include "ARM.h"
> #include "llvm/PassManager.h"
> @@ -22,15 +21,6 @@
> #include "llvm/Target/TargetRegistry.h"
> using namespace llvm;
>
> -static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> - Triple TheTriple(TT);
> -
> - if (TheTriple.isOSDarwin())
> - return new ARMMCAsmInfoDarwin();
> -
> - return new ARMELFMCAsmInfo();
> -}
> -
> // This is duplicated code. Refactor this.
> static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
> MCContext &Ctx, TargetAsmBackend &TAB,
> @@ -56,10 +46,6 @@
> RegisterTargetMachine<ARMTargetMachine> X(TheARMTarget);
> RegisterTargetMachine<ThumbTargetMachine> Y(TheThumbTarget);
>
> - // Register the target asm info.
> - RegisterAsmInfoFn A(TheARMTarget, createMCAsmInfo);
> - RegisterAsmInfoFn B(TheThumbTarget, createMCAsmInfo);
> -
> // Register the MC Code Emitter
> TargetRegistry::RegisterCodeEmitter(TheARMTarget, createARMMCCodeEmitter);
> TargetRegistry::RegisterCodeEmitter(TheThumbTarget, createARMMCCodeEmitter);
>
> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "ARMMCTargetDesc.h"
> +#include "ARMMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -97,32 +98,47 @@
> return X;
> }
>
> -MCInstrInfo *createARMMCInstrInfo() {
> - MCInstrInfo *X = new MCInstrInfo();
> - InitARMMCInstrInfo(X);
> - return X;
> +// Force static initialization.
> +extern "C" void LLVMInitializeARMMCSubtargetInfo() {
> + TargetRegistry::RegisterMCSubtargetInfo(TheARMTarget,
> + ARM_MC::createARMMCSubtargetInfo);
> + TargetRegistry::RegisterMCSubtargetInfo(TheThumbTarget,
> + ARM_MC::createARMMCSubtargetInfo);
> }
>
> -MCRegisterInfo *createARMMCRegisterInfo() {
> - MCRegisterInfo *X = new MCRegisterInfo();
> - InitARMMCRegisterInfo(X);
> +static MCInstrInfo *createARMMCInstrInfo() {
> + MCInstrInfo *X = new MCInstrInfo();
> + InitARMMCInstrInfo(X);
> return X;
> }
>
> -// Force static initialization.
> extern "C" void LLVMInitializeARMMCInstrInfo() {
> TargetRegistry::RegisterMCInstrInfo(TheARMTarget, createARMMCInstrInfo);
> TargetRegistry::RegisterMCInstrInfo(TheThumbTarget, createARMMCInstrInfo);
> }
>
> +static MCRegisterInfo *createARMMCRegisterInfo() {
> + MCRegisterInfo *X = new MCRegisterInfo();
> + InitARMMCRegisterInfo(X);
> + return X;
> +}
> +
> extern "C" void LLVMInitializeARMMCRegInfo() {
> TargetRegistry::RegisterMCRegInfo(TheARMTarget, createARMMCRegisterInfo);
> TargetRegistry::RegisterMCRegInfo(TheThumbTarget, createARMMCRegisterInfo);
> }
>
> -extern "C" void LLVMInitializeARMMCSubtargetInfo() {
> - TargetRegistry::RegisterMCSubtargetInfo(TheARMTarget,
> - ARM_MC::createARMMCSubtargetInfo);
> - TargetRegistry::RegisterMCSubtargetInfo(TheThumbTarget,
> - ARM_MC::createARMMCSubtargetInfo);
> +static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> + Triple TheTriple(TT);
> +
> + if (TheTriple.isOSDarwin())
> + return new ARMMCAsmInfoDarwin();
> +
> + return new ARMELFMCAsmInfo();
> +}
> +
> +extern "C" void LLVMInitializeARMMCAsmInfo() {
> + // Register the target asm info.
> + RegisterMCAsmInfoFn A(TheARMTarget, createMCAsmInfo);
> + RegisterMCAsmInfoFn B(TheThumbTarget, createMCAsmInfo);
> }
>
> Removed: llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.cpp (removed)
> @@ -1,23 +0,0 @@
> -//===-- AlphaMCAsmInfo.cpp - Alpha asm properties ---------------*- C++ -*-===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the AlphaMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "AlphaMCAsmInfo.h"
> -using namespace llvm;
> -
> -AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, StringRef TT) {
> - AlignmentIsInBytes = false;
> - PrivateGlobalPrefix = "$";
> - GPRel32Directive = ".gprel32";
> - WeakRefDirective = "\t.weak\t";
> - HasSetDirective = false;
> -}
>
> Removed: llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/Alpha/AlphaMCAsmInfo.h (removed)
> @@ -1,29 +0,0 @@
> -//=====-- AlphaMCAsmInfo.h - Alpha asm properties -------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the AlphaMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef ALPHATARGETASMINFO_H
> -#define ALPHATARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - struct AlphaMCAsmInfo : public MCAsmInfo {
> - explicit AlphaMCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -11,7 +11,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "Alpha.h"
> -#include "AlphaMCAsmInfo.h"
> #include "AlphaTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/Support/FormattedStream.h"
> @@ -21,7 +20,6 @@
> extern "C" void LLVMInitializeAlphaTarget() {
> // Register the target.
> RegisterTargetMachine<AlphaTargetMachine> X(TheAlphaTarget);
> - RegisterAsmInfo<AlphaMCAsmInfo> Y(TheAlphaTarget);
> }
>
> AlphaTargetMachine::AlphaTargetMachine(const Target &T, const std::string &TT,
>
> Modified: llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "AlphaMCTargetDesc.h"
> +#include "AlphaMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -29,7 +30,7 @@
> using namespace llvm;
>
>
> -MCInstrInfo *createAlphaMCInstrInfo() {
> +static MCInstrInfo *createAlphaMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitAlphaMCInstrInfo(X);
> return X;
> @@ -39,9 +40,8 @@
> TargetRegistry::RegisterMCInstrInfo(TheAlphaTarget, createAlphaMCInstrInfo);
> }
>
> -
> -MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitAlphaMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -51,3 +51,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheAlphaTarget,
> createAlphaMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeAlphaMCAsmInfo() {
> + RegisterMCAsmInfo<AlphaMCAsmInfo> X(TheAlphaTarget);
> +}
>
> Modified: llvm/trunk/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMAlphaDesc AlphaMCTargetDesc.cpp)
> +add_llvm_library(LLVMAlphaDesc
> + AlphaMCTargetDesc.cpp
> + AlphaMCAsmInfo.cpp
> + )
>
> Removed: llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp (removed)
> @@ -1,22 +0,0 @@
> -//===-- BlackfinMCAsmInfo.cpp - Blackfin asm properties -------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the BlackfinMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "BlackfinMCAsmInfo.h"
> -
> -using namespace llvm;
> -
> -BlackfinMCAsmInfo::BlackfinMCAsmInfo(const Target &T, StringRef TT) {
> - GlobalPrefix = "_";
> - CommentString = "//";
> - HasSetDirective = false;
> -}
>
> Removed: llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/Blackfin/BlackfinMCAsmInfo.h (removed)
> @@ -1,29 +0,0 @@
> -//===-- BlackfinMCAsmInfo.h - Blackfin asm properties ---------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the BlackfinMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef BLACKFINTARGETASMINFO_H
> -#define BLACKFINTARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - struct BlackfinMCAsmInfo : public MCAsmInfo {
> - explicit BlackfinMCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/Blackfin/BlackfinTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Blackfin/BlackfinTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Blackfin/BlackfinTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
>
> #include "BlackfinTargetMachine.h"
> #include "Blackfin.h"
> -#include "BlackfinMCAsmInfo.h"
> #include "llvm/PassManager.h"
> #include "llvm/Target/TargetRegistry.h"
>
> @@ -20,8 +19,6 @@
>
> extern "C" void LLVMInitializeBlackfinTarget() {
> RegisterTargetMachine<BlackfinTargetMachine> X(TheBlackfinTarget);
> - RegisterAsmInfo<BlackfinMCAsmInfo> Y(TheBlackfinTarget);
> -
> }
>
> BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
>
> Modified: llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "BlackfinMCTargetDesc.h"
> +#include "BlackfinMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -29,7 +30,7 @@
> using namespace llvm;
>
>
> -MCInstrInfo *createBlackfinMCInstrInfo() {
> +static MCInstrInfo *createBlackfinMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitBlackfinMCInstrInfo(X);
> return X;
> @@ -41,8 +42,9 @@
> }
>
>
> -MCSubtargetInfo *createBlackfinMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createBlackfinMCSubtargetInfo(StringRef TT,
> + StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitBlackfinMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -52,3 +54,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheBlackfinTarget,
> createBlackfinMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeBlackfinMCAsmInfo() {
> + RegisterMCAsmInfo<BlackfinMCAsmInfo> X(TheBlackfinTarget);
> +}
>
> Modified: llvm/trunk/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMBlackfinDesc BlackfinMCTargetDesc.cpp)
> +add_llvm_library(LLVMBlackfinDesc
> + BlackfinMCTargetDesc.cpp
> + BlackfinMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
> +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Thu Jul 14 18:50:31 2011
> @@ -62,13 +62,11 @@
> RegisterTargetMachine<CTargetMachine> X(TheCBackendTarget);
> }
>
> -extern "C" void LLVMInitializeCBackendMCInstrInfo() {
> - RegisterMCInstrInfo<MCInstrInfo> X(TheCBackendTarget);
> -}
> +extern "C" void LLVMInitializeCBackendMCAsmInfo() {}
>
> -extern "C" void LLVMInitializeCBackendMCSubtargetInfo() {
> - RegisterMCSubtargetInfo<MCSubtargetInfo> X(TheCBackendTarget);
> -}
> +extern "C" void LLVMInitializeCBackendMCInstrInfo() {}
> +
> +extern "C" void LLVMInitializeCBackendMCSubtargetInfo() {}
>
> namespace {
> class CBEMCAsmInfo : public MCAsmInfo {
> @@ -1664,7 +1662,7 @@
>
> std::string E;
> if (const Target *Match = TargetRegistry::lookupTarget(Triple, E))
> - TAsm = Match->createAsmInfo(Triple);
> + TAsm = Match->createMCAsmInfo(Triple);
> #endif
> TAsm = new CBEMCAsmInfo();
> TCtx = new MCContext(*TAsm, NULL);
> @@ -3167,7 +3165,7 @@
>
> std::string E;
> if (const Target *Match = TargetRegistry::lookupTarget(Triple, E))
> - TargetAsm = Match->createAsmInfo(Triple);
> + TargetAsm = Match->createMCAsmInfo(Triple);
> else
> return c.Codes[0];
>
>
> Modified: llvm/trunk/lib/Target/CellSPU/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/CellSPU/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -15,7 +15,6 @@
> SPUISelDAGToDAG.cpp
> SPUISelLowering.cpp
> SPUFrameLowering.cpp
> - SPUMCAsmInfo.cpp
> SPURegisterInfo.cpp
> SPUSubtarget.cpp
> SPUTargetMachine.cpp
>
> Modified: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMCellSPUDesc SPUMCTargetDesc.cpp)
> +add_llvm_library(LLVMCellSPUDesc
> + SPUMCTargetDesc.cpp
> + SPUMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "SPUMCTargetDesc.h"
> +#include "SPUMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createSPUMCInstrInfo() {
> +static MCInstrInfo *createSPUMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitSPUMCInstrInfo(X);
> return X;
> @@ -38,8 +39,8 @@
> TargetRegistry::RegisterMCInstrInfo(TheCellSPUTarget, createSPUMCInstrInfo);
> }
>
> -MCSubtargetInfo *createSPUMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createSPUMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitSPUMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -49,3 +50,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheCellSPUTarget,
> createSPUMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeCellSPUMCAsmInfo() {
> + RegisterMCAsmInfo<SPULinuxMCAsmInfo> X(TheCellSPUTarget);
> +}
>
> Removed: llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp (removed)
> @@ -1,39 +0,0 @@
> -//===-- SPUMCAsmInfo.cpp - Cell SPU asm properties ------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the SPUMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "SPUMCAsmInfo.h"
> -using namespace llvm;
> -
> -SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, StringRef TT) {
> - ZeroDirective = "\t.space\t";
> - Data64bitsDirective = "\t.quad\t";
> - AlignmentIsInBytes = false;
> -
> - PCSymbol = ".";
> - CommentString = "#";
> - GlobalPrefix = "";
> - PrivateGlobalPrefix = ".L";
> -
> - // Has leb128
> - HasLEB128 = true;
> -
> - SupportsDebugInformation = true;
> -
> - // Exception handling is not supported on CellSPU (think about it: you only
> - // have 256K for code+data. Would you support exception handling?)
> - ExceptionsType = ExceptionHandling::None;
> -
> - // SPU assembly requires ".section" before ".bss"
> - UsesELFSectionDirectiveForBSS = true;
> -}
> -
>
> Removed: llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.h (removed)
> @@ -1,28 +0,0 @@
> -//===-- SPUMCAsmInfo.h - Cell SPU asm properties ---------------*- C++ -*--===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the SPUMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef SPUTARGETASMINFO_H
> -#define SPUTARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - struct SPULinuxMCAsmInfo : public MCAsmInfo {
> - explicit SPULinuxMCAsmInfo(const Target &T, StringRef TT);
> - };
> -} // namespace llvm
> -
> -#endif /* SPUTARGETASMINFO_H */
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "SPU.h"
> -#include "SPUMCAsmInfo.h"
> #include "SPUTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/CodeGen/RegAllocRegistry.h"
> @@ -24,7 +23,6 @@
> extern "C" void LLVMInitializeCellSPUTarget() {
> // Register the target.
> RegisterTargetMachine<SPUTargetMachine> X(TheCellSPUTarget);
> - RegisterAsmInfo<SPULinuxMCAsmInfo> Y(TheCellSPUTarget);
> }
>
> const std::pair<unsigned, int> *
>
> Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
> +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Thu Jul 14 18:50:31 2011
> @@ -22,6 +22,7 @@
> #include "llvm/Module.h"
> #include "llvm/Pass.h"
> #include "llvm/PassManager.h"
> +#include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> #include "llvm/ADT/SmallPtrSet.h"
> @@ -76,6 +77,8 @@
> RegisterTargetMachine<CPPTargetMachine> X(TheCppBackendTarget);
> }
>
> +extern "C" void LLVMInitializeCppBackendMCAsmInfo() {}
> +
> extern "C" void LLVMInitializeCppBackendMCInstrInfo() {
> RegisterMCInstrInfo<MCInstrInfo> X(TheCppBackendTarget);
> }
>
> Modified: llvm/trunk/lib/Target/MBlaze/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/MBlaze/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -17,7 +17,6 @@
> MBlazeISelDAGToDAG.cpp
> MBlazeISelLowering.cpp
> MBlazeFrameLowering.cpp
> - MBlazeMCAsmInfo.cpp
> MBlazeRegisterInfo.cpp
> MBlazeSubtarget.cpp
> MBlazeTargetMachine.cpp
>
> Removed: llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp (removed)
> @@ -1,22 +0,0 @@
> -//===-- MBlazeMCAsmInfo.cpp - MBlaze asm properties -----------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the MBlazeMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "MBlazeMCAsmInfo.h"
> -using namespace llvm;
> -
> -MBlazeMCAsmInfo::MBlazeMCAsmInfo() {
> - SupportsDebugInformation = true;
> - AlignmentIsInBytes = false;
> - PrivateGlobalPrefix = "$";
> - GPRel32Directive = "\t.gpword\t";
> -}
>
> Removed: llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/MBlaze/MBlazeMCAsmInfo.h (removed)
> @@ -1,30 +0,0 @@
> -//=====-- MBlazeMCAsmInfo.h - MBlaze asm properties -----------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the MBlazeMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef MBLAZETARGETASMINFO_H
> -#define MBLAZETARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - class MBlazeMCAsmInfo : public MCAsmInfo {
> - public:
> - explicit MBlazeMCAsmInfo();
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/MBlaze/MBlazeTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "MBlaze.h"
> -#include "MBlazeMCAsmInfo.h"
> #include "MBlazeTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/CodeGen/Passes.h"
> @@ -21,14 +20,6 @@
> #include "llvm/Target/TargetRegistry.h"
> using namespace llvm;
>
> -static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> - Triple TheTriple(TT);
> - switch (TheTriple.getOS()) {
> - default:
> - return new MBlazeMCAsmInfo();
> - }
> -}
> -
> static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
> MCContext &Ctx, TargetAsmBackend &TAB,
> raw_ostream &_OS,
> @@ -55,9 +46,6 @@
> // Register the target.
> RegisterTargetMachine<MBlazeTargetMachine> X(TheMBlazeTarget);
>
> - // Register the target asm info.
> - RegisterAsmInfoFn A(TheMBlazeTarget, createMCAsmInfo);
> -
> // Register the MC code emitter
> TargetRegistry::RegisterCodeEmitter(TheMBlazeTarget,
> llvm::createMBlazeMCCodeEmitter);
>
> Modified: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMMBlazeDesc MBlazeMCTargetDesc.cpp)
> +add_llvm_library(LLVMMBlazeDesc
> + MBlazeMCTargetDesc.cpp
> + MBlazeMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "MBlazeMCTargetDesc.h"
> +#include "MBlazeMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -29,7 +30,7 @@
> using namespace llvm;
>
>
> -MCInstrInfo *createMBlazeMCInstrInfo() {
> +static MCInstrInfo *createMBlazeMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitMBlazeMCInstrInfo(X);
> return X;
> @@ -39,8 +40,8 @@
> TargetRegistry::RegisterMCInstrInfo(TheMBlazeTarget, createMBlazeMCInstrInfo);
> }
>
> -MCSubtargetInfo *createMBlazeMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createMBlazeMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitMBlazeMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -50,3 +51,15 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheMBlazeTarget,
> createMBlazeMCSubtargetInfo);
> }
> +
> +static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> + Triple TheTriple(TT);
> + switch (TheTriple.getOS()) {
> + default:
> + return new MBlazeMCAsmInfo();
> + }
> +}
> +
> +extern "C" void LLVMInitializeMBlazeMCAsmInfo() {
> + RegisterMCAsmInfoFn X(TheMBlazeTarget, createMCAsmInfo);
> +}
>
> Modified: llvm/trunk/lib/Target/MSP430/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/MSP430/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -13,7 +13,6 @@
> MSP430ISelLowering.cpp
> MSP430InstrInfo.cpp
> MSP430FrameLowering.cpp
> - MSP430MCAsmInfo.cpp
> MSP430RegisterInfo.cpp
> MSP430Subtarget.cpp
> MSP430TargetMachine.cpp
>
> Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMMSP430Desc MSP430MCTargetDesc.cpp)
> +add_llvm_library(LLVMMSP430Desc
> + MSP430MCTargetDesc.cpp
> + MSP430MCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "MSP430MCTargetDesc.h"
> +#include "MSP430MCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -29,7 +30,7 @@
> using namespace llvm;
>
>
> -MCInstrInfo *createMSP430MCInstrInfo() {
> +static MCInstrInfo *createMSP430MCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitMSP430MCInstrInfo(X);
> return X;
> @@ -40,8 +41,8 @@
> }
>
>
> -MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitMSP430MCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -51,3 +52,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target,
> createMSP430MCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeMSP430MCAsmInfo() {
> + RegisterMCAsmInfo<MSP430MCAsmInfo> X(TheMSP430Target);
> +}
>
> Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Thu Jul 14 18:50:31 2011
> @@ -15,7 +15,6 @@
> #define DEBUG_TYPE "asm-printer"
> #include "MSP430.h"
> #include "MSP430InstrInfo.h"
> -#include "MSP430MCAsmInfo.h"
> #include "MSP430MCInstLower.h"
> #include "MSP430TargetMachine.h"
> #include "InstPrinter/MSP430InstPrinter.h"
> @@ -28,6 +27,7 @@
> #include "llvm/CodeGen/MachineFunctionPass.h"
> #include "llvm/CodeGen/MachineConstantPool.h"
> #include "llvm/CodeGen/MachineInstr.h"
> +#include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCInst.h"
> #include "llvm/MC/MCStreamer.h"
> #include "llvm/MC/MCSymbol.h"
>
> Removed: llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.cpp (removed)
> @@ -1,26 +0,0 @@
> -//===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the MSP430MCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "MSP430MCAsmInfo.h"
> -using namespace llvm;
> -
> -MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
> - PrivateGlobalPrefix = ".L";
> - WeakRefDirective ="\t.weak\t";
> - PCSymbol=".";
> - CommentString = ";";
> -
> - AlignmentIsInBytes = false;
> - AllowNameToStartWithDigit = true;
> - UsesELFSectionDirectiveForBSS = true;
> -}
>
> Removed: llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/MSP430/MSP430MCAsmInfo.h (removed)
> @@ -1,29 +0,0 @@
> -//=====-- MSP430MCAsmInfo.h - MSP430 asm properties -----------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the MSP430MCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef MSP430TARGETASMINFO_H
> -#define MSP430TARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - struct MSP430MCAsmInfo : public MCAsmInfo {
> - explicit MSP430MCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "MSP430.h"
> -#include "MSP430MCAsmInfo.h"
> #include "MSP430TargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/CodeGen/Passes.h"
> @@ -23,7 +22,6 @@
> extern "C" void LLVMInitializeMSP430Target() {
> // Register the target.
> RegisterTargetMachine<MSP430TargetMachine> X(TheMSP430Target);
> - RegisterAsmInfo<MSP430MCAsmInfo> Z(TheMSP430Target);
> }
>
> MSP430TargetMachine::MSP430TargetMachine(const Target &T,
>
> Modified: llvm/trunk/lib/Target/Mips/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Mips/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -16,7 +16,6 @@
> MipsISelDAGToDAG.cpp
> MipsISelLowering.cpp
> MipsFrameLowering.cpp
> - MipsMCAsmInfo.cpp
> MipsMCInstLower.cpp
> MipsMCSymbolRefExpr.cpp
> MipsRegisterInfo.cpp
>
> Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMMipsDesc MipsMCTargetDesc.cpp)
> +add_llvm_library(LLVMMipsDesc
> + MipsMCTargetDesc.cpp
> + MipsMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "MipsMCTargetDesc.h"
> +#include "MipsMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createMipsMCInstrInfo() {
> +static MCInstrInfo *createMipsMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitMipsMCInstrInfo(X);
> return X;
> @@ -39,8 +40,8 @@
> }
>
>
> -MCSubtargetInfo *createMipsMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createMipsMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitMipsMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -50,3 +51,8 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheMipsTarget,
> createMipsMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeMipsMCAsmInfo() {
> + RegisterMCAsmInfo<MipsMCAsmInfo> X(TheMipsTarget);
> + RegisterMCAsmInfo<MipsMCAsmInfo> Y(TheMipselTarget);
> +}
>
> Removed: llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.cpp (removed)
> @@ -1,32 +0,0 @@
> -//===-- MipsMCAsmInfo.cpp - Mips asm properties ---------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the MipsMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "MipsMCAsmInfo.h"
> -using namespace llvm;
> -
> -MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
> - AlignmentIsInBytes = false;
> - Data16bitsDirective = "\t.2byte\t";
> - Data32bitsDirective = "\t.4byte\t";
> - Data64bitsDirective = 0;
> - PrivateGlobalPrefix = "$";
> - CommentString = "#";
> - ZeroDirective = "\t.space\t";
> - GPRel32Directive = "\t.gpword\t";
> - WeakRefDirective = "\t.weak\t";
> -
> - SupportsDebugInformation = true;
> - ExceptionsType = ExceptionHandling::DwarfCFI;
> - HasLEB128 = true;
> - DwarfRegNumForCFI = true;
> -}
>
> Removed: llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/Mips/MipsMCAsmInfo.h (removed)
> @@ -1,30 +0,0 @@
> -//=====-- MipsMCAsmInfo.h - Mips asm properties ---------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the MipsMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef MIPSTARGETASMINFO_H
> -#define MIPSTARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - class MipsMCAsmInfo : public MCAsmInfo {
> - public:
> - explicit MipsMCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "Mips.h"
> -#include "MipsMCAsmInfo.h"
> #include "MipsTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/Target/TargetRegistry.h"
> @@ -22,8 +21,6 @@
> // Register the target.
> RegisterTargetMachine<MipsTargetMachine> X(TheMipsTarget);
> RegisterTargetMachine<MipselTargetMachine> Y(TheMipselTarget);
> - RegisterAsmInfo<MipsMCAsmInfo> A(TheMipsTarget);
> - RegisterAsmInfo<MipsMCAsmInfo> B(TheMipselTarget);
> }
>
> // DataLayout --> Big-endian, 32-bit pointer/ABI/alignment
>
> Modified: llvm/trunk/lib/Target/PTX/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/PTX/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -13,7 +13,6 @@
> PTXISelLowering.cpp
> PTXInstrInfo.cpp
> PTXFrameLowering.cpp
> - PTXMCAsmInfo.cpp
> PTXMCAsmStreamer.cpp
> PTXMFInfoExtract.cpp
> PTXRegisterInfo.cpp
>
> Modified: llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/PTX/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMPTXDesc PTXMCTargetDesc.cpp)
> +add_llvm_library(LLVMPTXDesc
> + PTXMCTargetDesc.cpp
> + PTXMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "PTXMCTargetDesc.h"
> +#include "PTXMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createPTXMCInstrInfo() {
> +static MCInstrInfo *createPTXMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitPTXMCInstrInfo(X);
> return X;
> @@ -39,8 +40,8 @@
> TargetRegistry::RegisterMCInstrInfo(ThePTX64Target, createPTXMCInstrInfo);
> }
>
> -MCSubtargetInfo *createPTXMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createPTXMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitPTXMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -52,3 +53,8 @@
> TargetRegistry::RegisterMCSubtargetInfo(ThePTX64Target,
> createPTXMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializePTXMCAsmInfo() {
> + RegisterMCAsmInfo<PTXMCAsmInfo> X(ThePTX32Target);
> + RegisterMCAsmInfo<PTXMCAsmInfo> Y(ThePTX64Target);
> +}
>
> Removed: llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.cpp (removed)
> @@ -1,30 +0,0 @@
> -//===-- PTXMCAsmInfo.cpp - PTX asm properties -----------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the PTXMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "PTXMCAsmInfo.h"
> -
> -using namespace llvm;
> -
> -PTXMCAsmInfo::PTXMCAsmInfo(const Target &T, const StringRef &TT) {
> - CommentString = "//";
> -
> - PrivateGlobalPrefix = "$L__";
> -
> - AllowPeriodsInName = false;
> -
> - HasSetDirective = false;
> -
> - HasDotTypeDotSizeDirective = false;
> -
> - HasSingleParameterDotFile = false;
> -}
>
> Removed: llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/PTX/PTXMCAsmInfo.h (removed)
> @@ -1,28 +0,0 @@
> -//=====-- PTXMCAsmInfo.h - PTX asm properties -----------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the PTXMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef PTX_MCASM_INFO_H
> -#define PTX_MCASM_INFO_H
> -
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> - class StringRef;
> -
> - struct PTXMCAsmInfo : public MCAsmInfo {
> - explicit PTXMCAsmInfo(const Target &T, const StringRef &TT);
> - };
> -} // namespace llvm
> -
> -#endif // PTX_MCASM_INFO_H
>
> Modified: llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "PTX.h"
> -#include "PTXMCAsmInfo.h"
> #include "PTXTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/Target/TargetRegistry.h"
> @@ -35,9 +34,6 @@
> RegisterTargetMachine<PTX32TargetMachine> X(ThePTX32Target);
> RegisterTargetMachine<PTX64TargetMachine> Y(ThePTX64Target);
>
> - RegisterAsmInfo<PTXMCAsmInfo> Z(ThePTX32Target);
> - RegisterAsmInfo<PTXMCAsmInfo> W(ThePTX64Target);
> -
> TargetRegistry::RegisterAsmStreamer(ThePTX32Target, createPTXAsmStreamer);
> TargetRegistry::RegisterAsmStreamer(ThePTX64Target, createPTXAsmStreamer);
> }
>
> Modified: llvm/trunk/lib/Target/PowerPC/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/PowerPC/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -20,7 +20,6 @@
> PPCISelLowering.cpp
> PPCFrameLowering.cpp
> PPCJITInfo.cpp
> - PPCMCAsmInfo.cpp
> PPCMCCodeEmitter.cpp
> PPCMCInstLower.cpp
> PPCPredicates.cpp
>
> Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMPowerPCDesc PPCMCTargetDesc.cpp)
> +add_llvm_library(LLVMPowerPCDesc
> + PPCMCTargetDesc.cpp
> + PPCMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "PPCMCTargetDesc.h"
> +#include "PPCMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createPPCMCInstrInfo() {
> +static MCInstrInfo *createPPCMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitPPCMCInstrInfo(X);
> return X;
> @@ -40,8 +41,8 @@
> }
>
>
> -MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitPPCMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -53,3 +54,17 @@
> TargetRegistry::RegisterMCSubtargetInfo(ThePPC64Target,
> createPPCMCSubtargetInfo);
> }
> +
> +static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> + Triple TheTriple(TT);
> + bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
> + if (TheTriple.isOSDarwin())
> + return new PPCMCAsmInfoDarwin(isPPC64);
> + return new PPCLinuxMCAsmInfo(isPPC64);
> +
> +}
> +
> +extern "C" void LLVMInitializePowerPCMCAsmInfo() {
> + RegisterMCAsmInfoFn C(ThePPC32Target, createMCAsmInfo);
> + RegisterMCAsmInfoFn D(ThePPC64Target, createMCAsmInfo);
> +}
>
> Removed: llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.cpp (removed)
> @@ -1,58 +0,0 @@
> -//===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the MCAsmInfoDarwin properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "PPCMCAsmInfo.h"
> -using namespace llvm;
> -
> -PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
> - PCSymbol = ".";
> - CommentString = ";";
> - ExceptionsType = ExceptionHandling::DwarfCFI;
> -
> - if (!is64Bit)
> - Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
> -
> - AssemblerDialect = 1; // New-Style mnemonics.
> - SupportsDebugInformation= true; // Debug information.
> -}
> -
> -PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
> - // ".comm align is in bytes but .align is pow-2."
> - AlignmentIsInBytes = false;
> -
> - CommentString = "#";
> - GlobalPrefix = "";
> - PrivateGlobalPrefix = ".L";
> - WeakRefDirective = "\t.weak\t";
> -
> - // Uses '.section' before '.bss' directive
> - UsesELFSectionDirectiveForBSS = true;
> -
> - // Debug Information
> - SupportsDebugInformation = true;
> -
> - PCSymbol = ".";
> -
> - // Set up DWARF directives
> - HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
> -
> - // Exceptions handling
> - if (!is64Bit)
> - ExceptionsType = ExceptionHandling::DwarfCFI;
> -
> - ZeroDirective = "\t.space\t";
> - Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
> - HasLCOMMDirective = true;
> - AssemblerDialect = 0; // Old-Style mnemonics.
> -}
> -
>
> Removed: llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCMCAsmInfo.h (removed)
> @@ -1,31 +0,0 @@
> -//=====-- PPCMCAsmInfo.h - PPC asm properties -----------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the MCAsmInfoDarwin class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef PPCTARGETASMINFO_H
> -#define PPCTARGETASMINFO_H
> -
> -#include "llvm/MC/MCAsmInfoDarwin.h"
> -
> -namespace llvm {
> -
> - struct PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
> - explicit PPCMCAsmInfoDarwin(bool is64Bit);
> - };
> -
> - struct PPCLinuxMCAsmInfo : public MCAsmInfo {
> - explicit PPCLinuxMCAsmInfo(bool is64Bit);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -12,7 +12,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "PPC.h"
> -#include "PPCMCAsmInfo.h"
> #include "PPCTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/MC/MCStreamer.h"
> @@ -21,15 +20,6 @@
> #include "llvm/Support/FormattedStream.h"
> using namespace llvm;
>
> -static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> - Triple TheTriple(TT);
> - bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
> - if (TheTriple.isOSDarwin())
> - return new PPCMCAsmInfoDarwin(isPPC64);
> - return new PPCLinuxMCAsmInfo(isPPC64);
> -
> -}
> -
> // This is duplicated code. Refactor this.
> static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
> MCContext &Ctx, TargetAsmBackend &TAB,
> @@ -48,9 +38,6 @@
> RegisterTargetMachine<PPC32TargetMachine> A(ThePPC32Target);
> RegisterTargetMachine<PPC64TargetMachine> B(ThePPC64Target);
>
> - RegisterAsmInfoFn C(ThePPC32Target, createMCAsmInfo);
> - RegisterAsmInfoFn D(ThePPC64Target, createMCAsmInfo);
> -
> // Register the MC Code Emitter
> TargetRegistry::RegisterCodeEmitter(ThePPC32Target, createPPCMCCodeEmitter);
> TargetRegistry::RegisterCodeEmitter(ThePPC64Target, createPPCMCCodeEmitter);
>
> Modified: llvm/trunk/lib/Target/Sparc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Sparc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -15,7 +15,6 @@
> SparcISelDAGToDAG.cpp
> SparcISelLowering.cpp
> SparcFrameLowering.cpp
> - SparcMCAsmInfo.cpp
> SparcRegisterInfo.cpp
> SparcSubtarget.cpp
> SparcTargetMachine.cpp
>
> Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt Thu Jul 14 18:50:31 2011
> @@ -1 +1,4 @@
> -add_llvm_library(LLVMSparcDesc SparcMCTargetDesc.cpp)
> +add_llvm_library(LLVMSparcDesc
> + SparcMCTargetDesc.cpp
> + SparcMCAsmInfo.cpp
> + )
>
> Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "SparcMCTargetDesc.h"
> +#include "SparcMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createSparcMCInstrInfo() {
> +static MCInstrInfo *createSparcMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitSparcMCInstrInfo(X);
> return X;
> @@ -38,8 +39,8 @@
> TargetRegistry::RegisterMCInstrInfo(TheSparcTarget, createSparcMCInstrInfo);
> }
>
> -MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitSparcMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -49,3 +50,8 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheSparcTarget,
> createSparcMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeSparcMCAsmInfo() {
> + RegisterMCAsmInfo<SparcELFMCAsmInfo> X(TheSparcTarget);
> + RegisterMCAsmInfo<SparcELFMCAsmInfo> Y(TheSparcV9Target);
> +}
>
> Removed: llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.cpp (removed)
> @@ -1,34 +0,0 @@
> -//===-- SparcMCAsmInfo.cpp - Sparc asm properties -------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the SparcMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "SparcMCAsmInfo.h"
> -using namespace llvm;
> -
> -SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
> - Data16bitsDirective = "\t.half\t";
> - Data32bitsDirective = "\t.word\t";
> - Data64bitsDirective = 0; // .xword is only supported by V9.
> - ZeroDirective = "\t.skip\t";
> - CommentString = "!";
> - HasLEB128 = true;
> - SupportsDebugInformation = true;
> -
> - SunStyleELFSectionSwitchSyntax = true;
> - UsesELFSectionDirectiveForBSS = true;
> -
> - WeakRefDirective = "\t.weak\t";
> -
> - PrivateGlobalPrefix = ".L";
> -}
> -
> -
>
> Removed: llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcMCAsmInfo.h (removed)
> @@ -1,29 +0,0 @@
> -//=====-- SparcMCAsmInfo.h - Sparc asm properties -------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the SparcMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef SPARCTARGETASMINFO_H
> -#define SPARCTARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - struct SparcELFMCAsmInfo : public MCAsmInfo {
> - explicit SparcELFMCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -11,7 +11,6 @@
> //===----------------------------------------------------------------------===//
>
> #include "Sparc.h"
> -#include "SparcMCAsmInfo.h"
> #include "SparcTargetMachine.h"
> #include "llvm/PassManager.h"
> #include "llvm/Target/TargetRegistry.h"
> @@ -21,10 +20,6 @@
> // Register the target.
> RegisterTargetMachine<SparcV8TargetMachine> X(TheSparcTarget);
> RegisterTargetMachine<SparcV9TargetMachine> Y(TheSparcV9Target);
> -
> - RegisterAsmInfo<SparcELFMCAsmInfo> A(TheSparcTarget);
> - RegisterAsmInfo<SparcELFMCAsmInfo> B(TheSparcV9Target);
> -
> }
>
> /// SparcTargetMachine ctor - Create an ILP32 architecture model
>
> Modified: llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "SystemZMCTargetDesc.h"
> +#include "SystemZMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createSystemZMCInstrInfo() {
> +static MCInstrInfo *createSystemZMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitSystemZMCInstrInfo(X);
> return X;
> @@ -39,8 +40,9 @@
> createSystemZMCInstrInfo);
> }
>
> -MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT,
> + StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitSystemZMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -50,3 +52,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget,
> createSystemZMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeSystemZMCAsmInfo() {
> + RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget);
> +}
>
> Removed: llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.cpp (removed)
> @@ -1,30 +0,0 @@
> -//===-- SystemZMCAsmInfo.cpp - SystemZ asm properties ---------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the SystemZMCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "SystemZMCAsmInfo.h"
> -#include "llvm/MC/MCContext.h"
> -#include "llvm/MC/MCSectionELF.h"
> -#include "llvm/Support/ELF.h"
> -using namespace llvm;
> -
> -SystemZMCAsmInfo::SystemZMCAsmInfo(const Target &T, StringRef TT) {
> - PrivateGlobalPrefix = ".L";
> - WeakRefDirective = "\t.weak\t";
> - PCSymbol = ".";
> -}
> -
> -const MCSection *SystemZMCAsmInfo::
> -getNonexecutableStackSection(MCContext &Ctx) const{
> - return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
> - 0, SectionKind::getMetadata());
> -}
>
> Removed: llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/SystemZ/SystemZMCAsmInfo.h (removed)
> @@ -1,30 +0,0 @@
> -//====-- SystemZMCAsmInfo.h - SystemZ asm properties -----------*- C++ -*--===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the SystemZMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef SystemZTARGETASMINFO_H
> -#define SystemZTARGETASMINFO_H
> -
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> - class StringRef;
> -
> - struct SystemZMCAsmInfo : public MCAsmInfo {
> - explicit SystemZMCAsmInfo(const Target &T, StringRef TT);
> - virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/SystemZ/SystemZTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -7,7 +7,6 @@
> //
> //===----------------------------------------------------------------------===//
>
> -#include "SystemZMCAsmInfo.h"
> #include "SystemZTargetMachine.h"
> #include "SystemZ.h"
> #include "llvm/PassManager.h"
> @@ -17,7 +16,6 @@
> extern "C" void LLVMInitializeSystemZTarget() {
> // Register the target.
> RegisterTargetMachine<SystemZTargetMachine> X(TheSystemZTarget);
> - RegisterAsmInfo<SystemZMCAsmInfo> Y(TheSystemZTarget);
> }
>
> /// SystemZTargetMachine ctor - Create an ILP64 architecture model
>
> Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "X86MCTargetDesc.h"
> +#include "X86MCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -130,33 +131,55 @@
> return X;
> }
>
> -MCInstrInfo *createX86MCInstrInfo() {
> - MCInstrInfo *X = new MCInstrInfo();
> - InitX86MCInstrInfo(X);
> - return X;
> +// Force static initialization.
> +extern "C" void LLVMInitializeX86MCSubtargetInfo() {
> + TargetRegistry::RegisterMCSubtargetInfo(TheX86_32Target,
> + X86_MC::createX86MCSubtargetInfo);
> + TargetRegistry::RegisterMCSubtargetInfo(TheX86_64Target,
> + X86_MC::createX86MCSubtargetInfo);
> }
>
> -MCRegisterInfo *createX86MCRegisterInfo() {
> - MCRegisterInfo *X = new MCRegisterInfo();
> - InitX86MCRegisterInfo(X);
> +static MCInstrInfo *createX86MCInstrInfo() {
> + MCInstrInfo *X = new MCInstrInfo();
> + InitX86MCInstrInfo(X);
> return X;
> }
>
> -// Force static initialization.
> extern "C" void LLVMInitializeX86MCInstrInfo() {
> TargetRegistry::RegisterMCInstrInfo(TheX86_32Target, createX86MCInstrInfo);
> TargetRegistry::RegisterMCInstrInfo(TheX86_64Target, createX86MCInstrInfo);
> }
>
> +static MCRegisterInfo *createX86MCRegisterInfo() {
> + MCRegisterInfo *X = new MCRegisterInfo();
> + InitX86MCRegisterInfo(X);
> + return X;
> +}
> +
> extern "C" void LLVMInitializeX86MCRegInfo() {
> TargetRegistry::RegisterMCRegInfo(TheX86_32Target, createX86MCRegisterInfo);
> TargetRegistry::RegisterMCRegInfo(TheX86_64Target, createX86MCRegisterInfo);
> }
>
>
> -extern "C" void LLVMInitializeX86MCSubtargetInfo() {
> - TargetRegistry::RegisterMCSubtargetInfo(TheX86_32Target,
> - X86_MC::createX86MCSubtargetInfo);
> - TargetRegistry::RegisterMCSubtargetInfo(TheX86_64Target,
> - X86_MC::createX86MCSubtargetInfo);
> +static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> + Triple TheTriple(TT);
> +
> + if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) {
> + if (TheTriple.getArch() == Triple::x86_64)
> + return new X86_64MCAsmInfoDarwin(TheTriple);
> + else
> + return new X86MCAsmInfoDarwin(TheTriple);
> + }
> +
> + if (TheTriple.isOSWindows())
> + return new X86MCAsmInfoCOFF(TheTriple);
> +
> + return new X86ELFMCAsmInfo(TheTriple);
> +}
> +
> +extern "C" void LLVMInitializeX86MCAsmInfo() {
> + // Register the target asm info.
> + RegisterMCAsmInfoFn A(TheX86_32Target, createMCAsmInfo);
> + RegisterMCAsmInfoFn B(TheX86_64Target, createMCAsmInfo);
> }
>
> Removed: llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86MCAsmInfo.cpp (removed)
> @@ -1,134 +0,0 @@
> -//===-- X86MCAsmInfo.cpp - X86 asm properties -----------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declarations of the X86MCAsmInfo properties.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "X86MCAsmInfo.h"
> -#include "X86TargetMachine.h"
> -#include "llvm/ADT/Triple.h"
> -#include "llvm/MC/MCContext.h"
> -#include "llvm/MC/MCExpr.h"
> -#include "llvm/MC/MCSectionELF.h"
> -#include "llvm/MC/MCStreamer.h"
> -#include "llvm/Support/CommandLine.h"
> -#include "llvm/Support/ELF.h"
> -using namespace llvm;
> -
> -enum AsmWriterFlavorTy {
> - // Note: This numbering has to match the GCC assembler dialects for inline
> - // asm alternatives to work right.
> - ATT = 0, Intel = 1
> -};
> -
> -static cl::opt<AsmWriterFlavorTy>
> -AsmWriterFlavor("x86-asm-syntax", cl::init(ATT),
> - cl::desc("Choose style of code to emit from X86 backend:"),
> - cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"),
> - clEnumValN(Intel, "intel", "Emit Intel-style assembly"),
> - clEnumValEnd));
> -
> -
> -static const char *const x86_asm_table[] = {
> - "{si}", "S",
> - "{di}", "D",
> - "{ax}", "a",
> - "{cx}", "c",
> - "{memory}", "memory",
> - "{flags}", "",
> - "{dirflag}", "",
> - "{fpsr}", "",
> - "{fpcr}", "",
> - "{cc}", "cc",
> - 0,0};
> -
> -X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
> - AsmTransCBE = x86_asm_table;
> - AssemblerDialect = AsmWriterFlavor;
> -
> - bool is64Bit = Triple.getArch() == Triple::x86_64;
> -
> - TextAlignFillValue = 0x90;
> -
> - if (!is64Bit)
> - Data64bitsDirective = 0; // we can't emit a 64-bit unit
> -
> - // Use ## as a comment string so that .s files generated by llvm can go
> - // through the GCC preprocessor without causing an error. This is needed
> - // because "clang foo.s" runs the C preprocessor, which is usually reserved
> - // for .S files on other systems. Perhaps this is because the file system
> - // wasn't always case preserving or something.
> - CommentString = "##";
> - PCSymbol = ".";
> -
> - SupportsDebugInformation = true;
> - DwarfUsesInlineInfoSection = true;
> -
> - // Exceptions handling
> - ExceptionsType = ExceptionHandling::DwarfCFI;
> -}
> -
> -const MCExpr *
> -X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(const MCSymbol *Sym,
> - unsigned Encoding,
> - MCStreamer &Streamer) const {
> - MCContext &Context = Streamer.getContext();
> - const MCExpr *Res =
> - MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, Context);
> - const MCExpr *Four = MCConstantExpr::Create(4, Context);
> - return MCBinaryExpr::CreateAdd(Res, Four, Context);
> -}
> -
> -X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)
> - : X86MCAsmInfoDarwin(Triple) {
> -}
> -
> -X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
> - AsmTransCBE = x86_asm_table;
> - AssemblerDialect = AsmWriterFlavor;
> -
> - TextAlignFillValue = 0x90;
> -
> - PrivateGlobalPrefix = ".L";
> - WeakRefDirective = "\t.weak\t";
> - PCSymbol = ".";
> -
> - // Set up DWARF directives
> - HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
> -
> - // Debug Information
> - SupportsDebugInformation = true;
> -
> - // Exceptions handling
> - ExceptionsType = ExceptionHandling::DwarfCFI;
> -
> - // OpenBSD has buggy support for .quad in 32-bit mode, just split into two
> - // .words.
> - if (T.getOS() == Triple::OpenBSD && T.getArch() == Triple::x86)
> - Data64bitsDirective = 0;
> -}
> -
> -const MCSection *X86ELFMCAsmInfo::
> -getNonexecutableStackSection(MCContext &Ctx) const {
> - return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
> - 0, SectionKind::getMetadata());
> -}
> -
> -X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) {
> - if (Triple.getArch() == Triple::x86_64) {
> - GlobalPrefix = "";
> - PrivateGlobalPrefix = ".L";
> - }
> -
> - AsmTransCBE = x86_asm_table;
> - AssemblerDialect = AsmWriterFlavor;
> -
> - TextAlignFillValue = 0x90;
> -}
>
> Removed: llvm/trunk/lib/Target/X86/X86MCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86MCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/X86/X86MCAsmInfo.h (removed)
> @@ -1,46 +0,0 @@
> -//=====-- X86MCAsmInfo.h - X86 asm properties -----------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the X86MCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef X86TARGETASMINFO_H
> -#define X86TARGETASMINFO_H
> -
> -#include "llvm/MC/MCAsmInfo.h"
> -#include "llvm/MC/MCAsmInfoCOFF.h"
> -#include "llvm/MC/MCAsmInfoDarwin.h"
> -
> -namespace llvm {
> - class Triple;
> -
> - struct X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
> - explicit X86MCAsmInfoDarwin(const Triple &Triple);
> - };
> -
> - struct X86_64MCAsmInfoDarwin : public X86MCAsmInfoDarwin {
> - explicit X86_64MCAsmInfoDarwin(const Triple &Triple);
> - virtual const MCExpr *
> - getExprForPersonalitySymbol(const MCSymbol *Sym,
> - unsigned Encoding,
> - MCStreamer &Streamer) const;
> - };
> -
> - struct X86ELFMCAsmInfo : public MCAsmInfo {
> - explicit X86ELFMCAsmInfo(const Triple &Triple);
> - virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
> - };
> -
> - struct X86MCAsmInfoCOFF : public MCAsmInfoCOFF {
> - explicit X86MCAsmInfoCOFF(const Triple &Triple);
> - };
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Thu Jul 14 18:50:31 2011
> @@ -16,8 +16,8 @@
> #include "X86MCInstLower.h"
> #include "X86AsmPrinter.h"
> #include "X86COFFMachineModuleInfo.h"
> -#include "X86MCAsmInfo.h"
> #include "llvm/CodeGen/MachineModuleInfoImpls.h"
> +#include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCContext.h"
> #include "llvm/MC/MCExpr.h"
> #include "llvm/MC/MCInst.h"
>
> Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -11,7 +11,6 @@
> //
> //===----------------------------------------------------------------------===//
>
> -#include "X86MCAsmInfo.h"
> #include "X86TargetMachine.h"
> #include "X86.h"
> #include "llvm/PassManager.h"
> @@ -24,22 +23,6 @@
> #include "llvm/Target/TargetRegistry.h"
> using namespace llvm;
>
> -static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
> - Triple TheTriple(TT);
> -
> - if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) {
> - if (TheTriple.getArch() == Triple::x86_64)
> - return new X86_64MCAsmInfoDarwin(TheTriple);
> - else
> - return new X86MCAsmInfoDarwin(TheTriple);
> - }
> -
> - if (TheTriple.isOSWindows())
> - return new X86MCAsmInfoCOFF(TheTriple);
> -
> - return new X86ELFMCAsmInfo(TheTriple);
> -}
> -
> static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
> MCContext &Ctx, TargetAsmBackend &TAB,
> raw_ostream &_OS,
> @@ -62,10 +45,6 @@
> RegisterTargetMachine<X86_32TargetMachine> X(TheX86_32Target);
> RegisterTargetMachine<X86_64TargetMachine> Y(TheX86_64Target);
>
> - // Register the target asm info.
> - RegisterAsmInfoFn A(TheX86_32Target, createMCAsmInfo);
> - RegisterAsmInfoFn B(TheX86_64Target, createMCAsmInfo);
> -
> // Register the code emitter.
> TargetRegistry::RegisterCodeEmitter(TheX86_32Target,
> createX86MCCodeEmitter);
>
> Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp Thu Jul 14 18:50:31 2011
> @@ -12,6 +12,7 @@
> //===----------------------------------------------------------------------===//
>
> #include "XCoreMCTargetDesc.h"
> +#include "XCoreMCAsmInfo.h"
> #include "llvm/MC/MCInstrInfo.h"
> #include "llvm/MC/MCRegisterInfo.h"
> #include "llvm/MC/MCSubtargetInfo.h"
> @@ -28,7 +29,7 @@
>
> using namespace llvm;
>
> -MCInstrInfo *createXCoreMCInstrInfo() {
> +static MCInstrInfo *createXCoreMCInstrInfo() {
> MCInstrInfo *X = new MCInstrInfo();
> InitXCoreMCInstrInfo(X);
> return X;
> @@ -38,8 +39,8 @@
> TargetRegistry::RegisterMCInstrInfo(TheXCoreTarget, createXCoreMCInstrInfo);
> }
>
> -MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU,
> - StringRef FS) {
> +static MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU,
> + StringRef FS) {
> MCSubtargetInfo *X = new MCSubtargetInfo();
> InitXCoreMCSubtargetInfo(X, TT, CPU, FS);
> return X;
> @@ -49,3 +50,7 @@
> TargetRegistry::RegisterMCSubtargetInfo(TheXCoreTarget,
> createXCoreMCSubtargetInfo);
> }
> +
> +extern "C" void LLVMInitializeXCoreMCAsmInfo() {
> + RegisterMCAsmInfo<XCoreMCAsmInfo> X(TheXCoreTarget);
> +}
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Thu Jul 14 18:50:31 2011
> @@ -16,7 +16,6 @@
> #include "XCore.h"
> #include "XCoreInstrInfo.h"
> #include "XCoreSubtarget.h"
> -#include "XCoreMCAsmInfo.h"
> #include "XCoreTargetMachine.h"
> #include "llvm/Constants.h"
> #include "llvm/DerivedTypes.h"
> @@ -27,6 +26,7 @@
> #include "llvm/CodeGen/MachineConstantPool.h"
> #include "llvm/CodeGen/MachineInstr.h"
> #include "llvm/CodeGen/MachineJumpTableInfo.h"
> +#include "llvm/MC/MCAsmInfo.h"
> #include "llvm/MC/MCStreamer.h"
> #include "llvm/MC/MCSymbol.h"
> #include "llvm/Target/Mangler.h"
>
> Removed: llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.cpp (removed)
> @@ -1,29 +0,0 @@
> -//===-- XCoreMCAsmInfo.cpp - XCore asm properties -------------------------===//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#include "XCoreMCAsmInfo.h"
> -using namespace llvm;
> -
> -XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) {
> - SupportsDebugInformation = true;
> - Data16bitsDirective = "\t.short\t";
> - Data32bitsDirective = "\t.long\t";
> - Data64bitsDirective = 0;
> - ZeroDirective = "\t.space\t";
> - CommentString = "#";
> -
> - PrivateGlobalPrefix = ".L";
> - AscizDirective = ".asciiz";
> - WeakDefDirective = "\t.weak\t";
> - WeakRefDirective = "\t.weak\t";
> -
> - // Debug
> - HasLEB128 = true;
> -}
> -
>
> Removed: llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h?rev=135218&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreMCAsmInfo.h (removed)
> @@ -1,30 +0,0 @@
> -//=====-- XCoreMCAsmInfo.h - XCore asm properties -------------*- C++ -*--====//
> -//
> -// The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
> -//===----------------------------------------------------------------------===//
> -//
> -// This file contains the declaration of the XCoreMCAsmInfo class.
> -//
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef XCORETARGETASMINFO_H
> -#define XCORETARGETASMINFO_H
> -
> -#include "llvm/ADT/StringRef.h"
> -#include "llvm/MC/MCAsmInfo.h"
> -
> -namespace llvm {
> - class Target;
> -
> - class XCoreMCAsmInfo : public MCAsmInfo {
> - public:
> - explicit XCoreMCAsmInfo(const Target &T, StringRef TT);
> - };
> -
> -} // namespace llvm
> -
> -#endif
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreTargetMachine.cpp Thu Jul 14 18:50:31 2011
> @@ -10,7 +10,6 @@
> //
> //===----------------------------------------------------------------------===//
>
> -#include "XCoreMCAsmInfo.h"
> #include "XCoreTargetMachine.h"
> #include "XCore.h"
> #include "llvm/Module.h"
> @@ -42,5 +41,4 @@
> // Force static initialization.
> extern "C" void LLVMInitializeXCoreTarget() {
> RegisterTargetMachine<XCoreTargetMachine> X(TheXCoreTarget);
> - RegisterAsmInfo<XCoreMCAsmInfo> Y(TheXCoreTarget);
> }
>
> Modified: llvm/trunk/tools/llc/llc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llc/llc.cpp (original)
> +++ llvm/trunk/tools/llc/llc.cpp Thu Jul 14 18:50:31 2011
> @@ -201,6 +201,7 @@
>
> // Initialize targets first, so that --version shows registered targets.
> InitializeAllTargets();
> + InitializeAllMCAsmInfos();
> InitializeAllMCInstrInfos();
> InitializeAllMCSubtargetInfos();
> InitializeAllAsmPrinters();
>
> Modified: llvm/trunk/tools/llvm-mc/Disassembler.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/Disassembler.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-mc/Disassembler.cpp (original)
> +++ llvm/trunk/tools/llvm-mc/Disassembler.cpp Thu Jul 14 18:50:31 2011
> @@ -132,7 +132,7 @@
> MemoryBuffer &Buffer,
> raw_ostream &Out) {
> // Set up disassembler.
> - OwningPtr<const MCAsmInfo> AsmInfo(T.createAsmInfo(Triple));
> + OwningPtr<const MCAsmInfo> AsmInfo(T.createMCAsmInfo(Triple));
>
> if (!AsmInfo) {
> errs() << "error: no assembly info for target " << Triple << "\n";
>
> Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
> +++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Thu Jul 14 18:50:31 2011
> @@ -196,7 +196,7 @@
> if (!TheTarget)
> return 1;
>
> - llvm::OwningPtr<MCAsmInfo> MAI(TheTarget->createAsmInfo(TripleName));
> + llvm::OwningPtr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(TripleName));
> assert(MAI && "Unable to create target asm info!");
>
> AsmLexer Lexer(*MAI);
> @@ -306,7 +306,7 @@
> SrcMgr.setIncludeDirs(IncludeDirs);
>
>
> - llvm::OwningPtr<MCAsmInfo> MAI(TheTarget->createAsmInfo(TripleName));
> + llvm::OwningPtr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(TripleName));
> assert(MAI && "Unable to create target asm info!");
>
> // Package up features to be passed to target/subtarget
> @@ -436,6 +436,7 @@
> llvm::InitializeAllTargetInfos();
> // FIXME: We shouldn't need to initialize the Target(Machine)s.
> llvm::InitializeAllTargets();
> + llvm::InitializeAllMCAsmInfos();
> llvm::InitializeAllMCInstrInfos();
> llvm::InitializeAllMCSubtargetInfos();
> llvm::InitializeAllAsmPrinters();
>
> Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
> +++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Thu Jul 14 18:50:31 2011
> @@ -174,7 +174,7 @@
> outs() << "Disassembly of section " << name << ":\n\n";
>
> // Set up disassembler.
> - OwningPtr<const MCAsmInfo> AsmInfo(TheTarget->createAsmInfo(TripleName));
> + OwningPtr<const MCAsmInfo> AsmInfo(TheTarget->createMCAsmInfo(TripleName));
>
> if (!AsmInfo) {
> errs() << "error: no assembly info for target " << TripleName << "\n";
> @@ -236,6 +236,7 @@
> llvm::InitializeAllTargetInfos();
> // FIXME: We shouldn't need to initialize the Target(Machine)s.
> llvm::InitializeAllTargets();
> + llvm::InitializeAllMCAsmInfos();
> llvm::InitializeAllAsmPrinters();
> llvm::InitializeAllAsmParsers();
> llvm::InitializeAllDisassemblers();
>
> Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
> +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Thu Jul 14 18:50:31 2011
> @@ -73,6 +73,7 @@
> _nativeObjectFile(NULL)
> {
> InitializeAllTargets();
> + InitializeAllMCAsmInfos();
> InitializeAllMCSubtargetInfos();
> InitializeAllAsmPrinters();
> }
>
> Modified: llvm/trunk/tools/lto/LTOModule.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=135219&r1=135218&r2=135219&view=diff
> ==============================================================================
> --- llvm/trunk/tools/lto/LTOModule.cpp (original)
> +++ llvm/trunk/tools/lto/LTOModule.cpp Thu Jul 14 18:50:31 2011
> @@ -135,6 +135,7 @@
> static bool Initialized = false;
> if (!Initialized) {
> InitializeAllTargets();
> + InitializeAllMCAsmInfos();
> InitializeAllMCSubtargetInfos();
> InitializeAllAsmParsers();
> Initialized = true;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110714/6372f9f7/attachment.html>
More information about the llvm-commits
mailing list