FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Config/Targets.def \
FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Config/Targets.def \
- include/llvm/Config/AsmPrinters.def \
+ include/llvm/Config/AsmPrinters.def \
+ include/llvm/Config/AsmParsers.def \
+ include/llvm/Config/Disassemblers.def \
include/llvm/System/DataTypes.h \
include/llvm/System/DataTypes.h \
- tools/llvmc/plugins/Base/Base.td
+ tools/llvmc/plugins/Base/Base.td
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
all-local:: $(FilesToConfigPATH)
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
all-local:: $(FilesToConfigPATH)
$(Echo) "Building $(<F) DAG instruction selector implementation with tblgen"
$(Verb) $(TableGen) -gen-dag-isel -o $(call SYSPATH, $@) $<
$(Echo) "Building $(<F) DAG instruction selector implementation with tblgen"
$(Verb) $(TableGen) -gen-dag-isel -o $(call SYSPATH, $@) $<
+$(TARGET:%=$(ObjDir)/%GenDisassemblerTables.inc.tmp): \
+$(ObjDir)/%GenDisassemblerTables.inc.tmp : %.td $(ObjDir)/.dir
+ $(Echo) "Building $(<F) disassembly tables with tblgen"
+ $(Verb) $(TableGen) -gen-disassembler -o $(call SYSPATH, $@) $<
+
$(TARGET:%=$(ObjDir)/%GenFastISel.inc.tmp): \
$(ObjDir)/%GenFastISel.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) \"fast\" instruction selector implementation with tblgen"
$(TARGET:%=$(ObjDir)/%GenFastISel.inc.tmp): \
$(ObjDir)/%GenFastISel.inc.tmp : %.td $(ObjDir)/.dir
$(Echo) "Building $(<F) \"fast\" instruction selector implementation with tblgen"
function(explicit_map_components_to_libraries out_libs)
set( link_components ${ARGN} )
foreach(c ${link_components})
function(explicit_map_components_to_libraries out_libs)
set( link_components ${ARGN} )
foreach(c ${link_components})
- # add codegen, asmprinter, asmparser
+ # add codegen, asmprinter, asmparser, disassembler
list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
if( NOT idx LESS 0 )
list(FIND llvm_libs "LLVM${c}CodeGen" idx)
list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
if( NOT idx LESS 0 )
list(FIND llvm_libs "LLVM${c}CodeGen" idx)
if( NOT asmidx LESS 0 )
list(APPEND expanded_components "LLVM${c}Info")
endif()
if( NOT asmidx LESS 0 )
list(APPEND expanded_components "LLVM${c}Info")
endif()
+ list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
+ if( NOT asmidx LESS 0 )
+ list(APPEND expanded_components "LLVM${c}Disassembler")
+ endif()
elseif( c STREQUAL "native" )
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
elseif( c STREQUAL "nativecodegen" )
elseif( c STREQUAL "native" )
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
elseif( c STREQUAL "nativecodegen" )
// Declare all of the available assembly parser initialization functions.
#define LLVM_ASM_PARSER(TargetName) void LLVMInitialize##TargetName##AsmParser();
#include "llvm/Config/AsmParsers.def"
// Declare all of the available assembly parser initialization functions.
#define LLVM_ASM_PARSER(TargetName) void LLVMInitialize##TargetName##AsmParser();
#include "llvm/Config/AsmParsers.def"
+
+ // Declare all of the available disassembler initialization functions.
+#define LLVM_DISASSEMBLER(TargetName) void LLVMInitialize##TargetName##Disassembler();
+#include "llvm/Config/Disassemblers.def"
#include "llvm/Config/AsmParsers.def"
}
#include "llvm/Config/AsmParsers.def"
}
+ /// InitializeAllDisassemblers - The main program should call this function if
+ /// it wants all disassemblers 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 InitializeAllDisassemblers() {
+#define LLVM_DISASSEMBLER(TargetName) LLVMInitialize##TargetName##Disassembler();
+#include "llvm/Config/Disassemblers.def"
+ }
+
/// InitializeNativeTarget - The main program should call this function to
/// initialize the native target corresponding to the host. This is useful
/// for JIT applications to ensure that the target gets linked in correctly.
/// InitializeNativeTarget - The main program should call this function to
/// initialize the native target corresponding to the host. This is useful
/// for JIT applications to ensure that the target gets linked in correctly.
if (defined $NAME_MAP{$target.'asmparser'}) {
push @{$NAME_MAP{$target}},$target.'asmparser'
}
if (defined $NAME_MAP{$target.'asmparser'}) {
push @{$NAME_MAP{$target}},$target.'asmparser'
}
+
+ if (defined $NAME_MAP{$target.'disassembler'}) {
+ push @{$NAME_MAP{$target}},$target.'disassembler'
+ }