lib/CodeGen/AsmPrinter \
lib/Target \
lib/Target/ARM \
+ lib/Target/ARM/AsmPrinter \
+ lib/Target/ARM/Disassembler \
lib/Target/ARM/TargetInfo \
lib/Target/X86 \
+ lib/Target/X86/AsmPrinter \
+ lib/Target/X86/Disassembler \
lib/Target/X86/TargetInfo \
lib/ExecutionEngine/JIT \
lib/MC \
+ lib/MC/MCParser \
))
TBLGEN := $(HOST_OUT_EXECUTABLES)/tblgen$(HOST_EXECUTABLE_SUFFIX)
# error Please define the macro LLVM_DISASSEMBLER(TargetName)
#endif
+LLVM_DISASSEMBLER(ARM)
+
#undef LLVM_DISASSEMBLER
LOCAL_PATH := $(call my-dir)
codegen_asmprinter_SRC_FILES := \
- AsmPrinter.cpp \
- DIE.cpp \
- DwarfDebug.cpp \
- DwarfException.cpp \
- OcamlGCPrinter.cpp
+ AsmPrinter.cpp
# For the host
# =====================================================
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(codegen_asmprinter_SRC_FILES)
+LOCAL_SRC_FILES := \
+ AsmPrinter.cpp \
+ AsmPrinterDwarf.cpp \
+ AsmPrinterInlineAsm.cpp \
+ DIE.cpp \
+ DwarfDebug.cpp \
+ DwarfException.cpp \
+ OcamlGCPrinter.cpp
+
LOCAL_MODULE:= libLLVMAsmPrinter
include $(LLVM_HOST_BUILD_MK)
# =====================================================
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(codegen_asmprinter_SRC_FILES)
+LOCAL_SRC_FILES := \
+ AsmPrinter.cpp \
+ AsmPrinterInlineAsm.cpp
+
LOCAL_MODULE:= libLLVMAsmPrinter
include $(LLVM_DEVICE_BUILD_MK)
#define DEBUG_TYPE "asm-printer"
#include "llvm/CodeGen/AsmPrinter.h"
-#include "DwarfDebug.h"
-#include "DwarfException.h"
+#ifndef ANDROID_TARGET_BUILD
+# include "DwarfDebug.h"
+# include "DwarfException.h"
+#endif // ANDROID_TARGET_BUILD
#include "llvm/Module.h"
#include "llvm/CodeGen/GCMetadataPrinter.h"
#include "llvm/CodeGen/MachineConstantPool.h"
OutStreamer.AddBlankLine();
}
+#ifndef ANDROID_TARGET_BUILD
if (MAI->doesSupportDebugInformation())
DD = new DwarfDebug(this, &M);
if (MAI->doesSupportExceptionHandling())
DE = new DwarfException(this);
+#endif // ANDROID_TARGET_BUILD
return false;
}
}
// Emit pre-function debug and/or EH information.
+#ifndef ANDROID_TARGET_BUILD
if (DE) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(EHTimerName, DWARFGroupName);
DD->beginFunction(MF);
}
}
+#endif // ANDROID_TARGET_BUILD
}
/// EmitFunctionEntryLabel - Emit the label that is the entrypoint for the
++EmittedInsts;
+#ifndef ANDROID_TARGET_BUILD
if (ShouldPrintDebugScopes) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(DbgTimerName, DWARFGroupName);
DD->beginScope(II);
}
}
+#endif // ANDROID_TARGET_BUILD
if (isVerbose())
EmitComments(*II, OutStreamer.GetCommentOS());
break;
}
+#ifndef ANDROID_TARGET_BUILD
if (ShouldPrintDebugScopes) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(DbgTimerName, DWARFGroupName);
DD->endScope(II);
}
}
+#endif // ANDROID_TARGET_BUILD
}
}
}
// Emit post-function debug information.
+#ifndef ANDROID_TARGET_BUILD
if (DD) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(DbgTimerName, DWARFGroupName);
DE->EndFunction();
}
}
+#endif // ANDROID_TARGET_BUILD
MMI->EndFunction();
// Print out jump tables referenced by the function.
EmitGlobalVariable(I);
// Finalize debug and EH information.
+#ifndef ANDROID_TARGET_BUILD
if (DE) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(EHTimerName, DWARFGroupName);
}
delete DD; DD = 0;
}
+#endif // ANDROID_TARGET_BUILD
// If the target wants to know about weak references, print them all.
if (MAI->getWeakRefDirective()) {
/// EmitInlineAsm - Emit a blob of inline asm to the output streamer.
void AsmPrinter::EmitInlineAsm(StringRef Str, unsigned LocCookie) const {
+#ifndef ANDROID_TARGET_BUILD
assert(!Str.empty() && "Can't emit empty inline asm block");
// Remember if the buffer is nul terminated or not so we can avoid a copy.
/*NoFinalize*/ true);
if (Res && !HasDiagHandler)
report_fatal_error("Error parsing inline asm\n");
+#endif // ANDROID_TARGET_BUILD
}
/// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.
void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
+#ifndef ANDROID_TARGET_BUILD
assert(MI->isInlineAsm() && "printInlineAsm only works on inline asms");
unsigned NumOperands = MI->getNumOperands();
if (OutStreamer.hasRawTextSupport())
OutStreamer.EmitRawText(Twine("\t")+MAI->getCommentString()+
MAI->getInlineAsmEnd());
+#endif // ANDROID_TARGET_BUILD
}
--- /dev/null
+LOCAL_PATH:= $(call my-dir)
+
+mc_parser_SRC_FILES := \
+ AsmLexer.cpp \
+ AsmParser.cpp \
+ MCAsmLexer.cpp \
+ MCAsmParser.cpp \
+ TargetAsmParser.cpp
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(mc_parser_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMMCParser
+
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(mc_parser_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMMCParser
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(BUILD_STATIC_LIBRARY)
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/MC/MCAsmInfo.h"
+#include <ctype.h>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ ARMGenInstrNames.inc \
+ ARMGenRegisterNames.inc \
+ ARMGenRegisterInfo.h.inc
+
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ ARMAsmLexer.cpp \
+ ARMAsmParser.cpp
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARMAsmParser
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ ARMGenAsmWriter.inc \
+ ARMGenInstrNames.inc \
+ ARMGenRegisterNames.inc \
+ ARMGenRegisterInfo.h.inc
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ ARMAsmPrinter.cpp \
+ ARMInstPrinter.cpp \
+ ARMMCInstLower.cpp
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARMAsmPrinter
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
/// o static uint16_t decodeThumbInstruction(field_t insn) - the decoding
/// function for a Thumb instruction.
///
-#include "../ARMGenDecoderTables.inc"
+#include "ARMGenDecoderTables.inc"
-#include "../ARMGenEDInfo.inc"
+#include "ARMGenEDInfo.inc"
using namespace llvm;
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ ARMGenDecoderTables.inc \
+ ARMGenEDInfo.inc \
+ ARMGenInstrNames.inc \
+ ARMGenInstrInfo.inc \
+ ARMGenRegisterNames.inc \
+ ARMGenRegisterInfo.h.inc
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ ARMDisassembler.cpp \
+ ARMDisassemblerCore.cpp
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARMDisassembler
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ X86GenAsmMatcher.inc \
+ X86GenInstrNames.inc \
+ X86GenRegisterNames.inc
+
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ X86AsmLexer.cpp \
+ X86AsmParser.cpp
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMX86AsmParser
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ X86GenAsmWriter.inc \
+ X86GenAsmWriter1.inc \
+ X86GenInstrNames.inc \
+ X86GenRegisterNames.inc \
+ X86GenRegisterInfo.h.inc
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ X86ATTInstPrinter.cpp \
+ X86AsmPrinter.cpp \
+ X86IntelInstPrinter.cpp \
+ X86MCInstLower.cpp
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMX86AsmPrinter
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := \
+ X86GenDisassemblerTables.inc \
+ X86GenEDInfo.inc \
+ X86GenRegisterNames.inc
+
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := \
+ X86Disassembler.cpp \
+ X86DisassemblerDecoder.c
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMX86Disassembler
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
$(call transform-td-to-out,tgt_intrinsics)
endif
+ifneq ($(findstring ARMGenDecoderTables.inc,$(tblgen_gen_tables)),)
+$(intermediates)/ARMGenDecoderTables.inc: $(tblgen_source_dir)/ARM.td $(TBLGEN)
+ $(call transform-td-to-out,arm-decoder)
+endif
+
endif