aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-03-07 13:15:57 -0800
committerTim Murray <timmurray@google.com>2014-03-14 17:13:27 -0700
commit8aa5ce8cbaa58d14493eb694f06c8a0fde23c509 (patch)
tree343d7ce8767a0a37430083e6b4a567ebb30c19f4 /lib
parent130045bafb1899ab3ba3a4eab679a7df08321796 (diff)
downloadexternal_llvm-8aa5ce8cbaa58d14493eb694f06c8a0fde23c509.zip
external_llvm-8aa5ce8cbaa58d14493eb694f06c8a0fde23c509.tar.gz
external_llvm-8aa5ce8cbaa58d14493eb694f06c8a0fde23c509.tar.bz2
Make LLVM build on AArch64.
bug 13343378 Change-Id: I4152d2437a144645fa0b5a425b7bfdcb3a2a5594
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/AArch64/AArch64InstrNEON.td13
-rw-r--r--lib/Target/AArch64/Android.mk64
-rw-r--r--lib/Target/AArch64/AsmParser/Android.mk61
-rw-r--r--lib/Target/AArch64/Disassembler/Android.mk53
-rw-r--r--lib/Target/AArch64/InstPrinter/Android.mk55
-rw-r--r--lib/Target/AArch64/MCTargetDesc/Android.mk55
-rw-r--r--lib/Target/AArch64/TargetInfo/Android.mk53
-rw-r--r--lib/Target/AArch64/Utils/Android.mk34
8 files changed, 383 insertions, 5 deletions
diff --git a/lib/Target/AArch64/AArch64InstrNEON.td b/lib/Target/AArch64/AArch64InstrNEON.td
index d71749d..fe73a05 100644
--- a/lib/Target/AArch64/AArch64InstrNEON.td
+++ b/lib/Target/AArch64/AArch64InstrNEON.td
@@ -5734,16 +5734,16 @@ defm : Neon_ScalarXIndexedElem_MLAL_Patterns<int_arm_neon_vqsubs,
// Scalar general arithmetic operation
class Neon_Scalar_GeneralMath2D_pattern<SDPatternOperator opnode,
- Instruction INST>
+ Instruction INST>
: Pat<(v1f64 (opnode (v1f64 FPR64:$Rn))), (INST FPR64:$Rn)>;
class Neon_Scalar_GeneralMath3D_pattern<SDPatternOperator opnode,
- Instruction INST>
+ Instruction INST>
: Pat<(v1f64 (opnode (v1f64 FPR64:$Rn), (v1f64 FPR64:$Rm))),
(INST FPR64:$Rn, FPR64:$Rm)>;
class Neon_Scalar_GeneralMath4D_pattern<SDPatternOperator opnode,
- Instruction INST>
+ Instruction INST>
: Pat<(v1f64 (opnode (v1f64 FPR64:$Rn), (v1f64 FPR64:$Rm),
(v1f64 FPR64:$Ra))),
(INST FPR64:$Rn, FPR64:$Rm, FPR64:$Ra)>;
@@ -6678,8 +6678,11 @@ def : Pat<(v1f32 (scalar_to_vector (f32 FPR32:$Rn))),
def : Pat<(v1f64 (scalar_to_vector (f64 FPR64:$Rn))),
(v1f64 FPR64:$Rn)>;
-def : Pat<(v1f64 (scalar_to_vector (f64 FPR64:$src))),
- (FMOVdd $src)>;
+// begin ANDROID-CHANGED-3-14-2014
+// duplicate symbol error if this is not commented out
+//def : Pat<(v1f64 (scalar_to_vector (f64 FPR64:$src))),
+// (FMOVdd $src)>;
+// end ANDROID-CHANGED-3-14-2014
def : Pat<(v2f64 (scalar_to_vector (f64 FPR64:$src))),
(INSERT_SUBREG (v2f64 (IMPLICIT_DEF)),
diff --git a/lib/Target/AArch64/Android.mk b/lib/Target/AArch64/Android.mk
new file mode 100644
index 0000000..3e1d50e
--- /dev/null
+++ b/lib/Target/AArch64/Android.mk
@@ -0,0 +1,64 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_codegen_TBLGEN_TABLES := \
+ AArch64GenRegisterInfo.inc \
+ AArch64GenInstrInfo.inc \
+ AArch64GenCodeEmitter.inc \
+ AArch64GenMCCodeEmitter.inc \
+ AArch64GenMCPseudoLowering.inc \
+ AArch64GenAsmWriter.inc \
+ AArch64GenAsmMatcher.inc \
+ AArch64GenDAGISel.inc \
+ AArch64GenFastISel.inc \
+ AArch64GenCallingConv.inc \
+ AArch64GenSubtargetInfo.inc \
+ AArch64GenDisassemblerTables.inc
+
+arm64_codegen_SRC_FILES := \
+ AArch64AsmPrinter.cpp \
+ AArch64FrameLowering.cpp \
+ AArch64ISelDAGToDAG.cpp \
+ AArch64MachineFunctionInfo.cpp \
+ AArch64RegisterInfo.cpp \
+ AArch64Subtarget.cpp \
+ AArch64TargetObjectFile.cpp \
+ AArch64BranchFixupPass.cpp \
+ AArch64InstrInfo.cpp \
+ AArch64ISelLowering.cpp \
+ AArch64MCInstLower.cpp \
+ AArch64SelectionDAGInfo.cpp \
+ AArch64TargetMachine.cpp
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMARM64CodeGen
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(arm64_codegen_SRC_FILES)
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/MCTargetDesc
+TBLGEN_TABLES := $(arm64_codegen_TBLGEN_TABLES)
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMARM64CodeGen
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(arm64_codegen_SRC_FILES)
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/MCTargetDesc
+TBLGEN_TABLES := $(arm64_codegen_TBLGEN_TABLES)
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/lib/Target/AArch64/AsmParser/Android.mk b/lib/Target/AArch64/AsmParser/Android.mk
new file mode 100644
index 0000000..899c84d
--- /dev/null
+++ b/lib/Target/AArch64/AsmParser/Android.mk
@@ -0,0 +1,61 @@
+LOCAL_PATH := $(call my-dir)
+
+#===---------------------------------------------------------------===
+# libARMAsmParser (common)
+#===---------------------------------------------------------------===
+
+arm64_asm_parser_SRC_FILES := \
+ AArch64AsmParser.cpp
+
+arm64_asm_parser_TBLGEN_TABLES := \
+ AArch64GenInstrInfo.inc \
+ AArch64GenRegisterInfo.inc \
+ AArch64GenAsmMatcher.inc \
+ AArch64GenSubtargetInfo.inc
+
+arm64_asm_parser_TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+arm64_asm_parser_C_INCLUDES := $(LOCAL_PATH)/..
+
+
+#===---------------------------------------------------------------===
+# libARM64AsmParser (host)
+#===---------------------------------------------------------------===
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMARM64AsmParser
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(arm64_asm_parser_SRC_FILES)
+LOCAL_C_INCLUDES += $(arm64_asm_parser_C_INCLUDES)
+TBLGEN_TABLES := $(arm64_asm_parser_TBLGEN_TABLES)
+TBLGEN_TD_DIR := $(arm64_asm_parser_TBLGEN_TD_DIR)
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+ifneq (,$(filter windows darwin,$(HOST_OS)))
+# Override the default optimization level to work around taking forever (~50m)
+# to compile ARM64AsmParser.cpp on Mac with gcc 4.2,
+# or on Linux with mingw32msvc-gcc 4.2, which is used to cross-compile
+# the win_sdk.
+LOCAL_CFLAGS += -O0
+endif
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+
+#===---------------------------------------------------------------===
+# libARM64AsmParser (target)
+#===---------------------------------------------------------------===
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMARM64AsmParser
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(arm64_asm_parser_SRC_FILES)
+LOCAL_C_INCLUDES += $(arm64_asm_parser_C_INCLUDES)
+TBLGEN_TABLES := $(arm64_asm_parser_TBLGEN_TABLES)
+TBLGEN_TD_DIR := $(arm64_asm_parser_TBLGEN_TD_DIR)
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/lib/Target/AArch64/Disassembler/Android.mk b/lib/Target/AArch64/Disassembler/Android.mk
new file mode 100644
index 0000000..f7d888a
--- /dev/null
+++ b/lib/Target/AArch64/Disassembler/Android.mk
@@ -0,0 +1,53 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_disassembler_TBLGEN_TABLES := \
+ AArch64GenDisassemblerTables.inc \
+ AArch64GenInstrInfo.inc \
+ AArch64GenSubtargetInfo.inc \
+ AArch64GenRegisterInfo.inc
+
+arm64_disassembler_SRC_FILES := \
+ AArch64Disassembler.cpp
+
+# For the device
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_disassembler_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_disassembler_SRC_FILES)
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Disassembler
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_disassembler_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_disassembler_SRC_FILES)
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Disassembler
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
diff --git a/lib/Target/AArch64/InstPrinter/Android.mk b/lib/Target/AArch64/InstPrinter/Android.mk
new file mode 100644
index 0000000..ffe94d3
--- /dev/null
+++ b/lib/Target/AArch64/InstPrinter/Android.mk
@@ -0,0 +1,55 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_asm_printer_TBLGEN_TABLES := \
+ AArch64GenAsmWriter.inc \
+ AArch64GenRegisterInfo.inc \
+ AArch64GenSubtargetInfo.inc \
+ AArch64GenInstrInfo.inc
+
+arm64_asm_printer_SRC_FILES := \
+ AArch64InstPrinter.cpp
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_asm_printer_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_asm_printer_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMARM64AsmPrinter
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_asm_printer_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_asm_printer_SRC_FILES)
+
+LOCAL_C_INCLUDES+= \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64AsmPrinter
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
+
diff --git a/lib/Target/AArch64/MCTargetDesc/Android.mk b/lib/Target/AArch64/MCTargetDesc/Android.mk
new file mode 100644
index 0000000..0dcc84f
--- /dev/null
+++ b/lib/Target/AArch64/MCTargetDesc/Android.mk
@@ -0,0 +1,55 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_mc_desc_TBLGEN_TABLES := \
+ AArch64GenRegisterInfo.inc \
+ AArch64GenInstrInfo.inc \
+ AArch64GenMCCodeEmitter.inc \
+ AArch64GenSubtargetInfo.inc
+
+arm64_mc_desc_SRC_FILES := \
+ AArch64AsmBackend.cpp \
+ AArch64ELFObjectWriter.cpp \
+ AArch64ELFStreamer.cpp \
+ AArch64MCAsmInfo.cpp \
+ AArch64MCCodeEmitter.cpp \
+ AArch64MCExpr.cpp \
+ AArch64MCTargetDesc.cpp
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+
+LOCAL_MODULE:= libLLVMARM64Desc
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(arm64_mc_desc_SRC_FILES)
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+TBLGEN_TABLES := $(arm64_mc_desc_TBLGEN_TABLES)
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMARM64Desc
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(arm64_mc_desc_SRC_FILES)
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+TBLGEN_TABLES := $(arm64_mc_desc_TBLGEN_TABLES)
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/lib/Target/AArch64/TargetInfo/Android.mk b/lib/Target/AArch64/TargetInfo/Android.mk
new file mode 100644
index 0000000..e163329
--- /dev/null
+++ b/lib/Target/AArch64/TargetInfo/Android.mk
@@ -0,0 +1,53 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_target_info_TBLGEN_TABLES := \
+ AArch64GenSubtargetInfo.inc \
+ AArch64GenRegisterInfo.inc \
+ AArch64GenInstrInfo.inc
+
+arm64_target_info_SRC_FILES := \
+ AArch64TargetInfo.cpp
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_target_info_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_target_info_SRC_FILES)
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Info
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(arm64_target_info_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(arm64_target_info_SRC_FILES)
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Info
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/lib/Target/AArch64/Utils/Android.mk b/lib/Target/AArch64/Utils/Android.mk
new file mode 100644
index 0000000..a94f5c6
--- /dev/null
+++ b/lib/Target/AArch64/Utils/Android.mk
@@ -0,0 +1,34 @@
+LOCAL_PATH := $(call my-dir)
+
+arm64_utils_SRC_FILES := \
+ AArch64BaseInfo.cpp
+
+# For the device
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(arm64_utils_SRC_FILES)
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Utils
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(arm64_utils_SRC_FILES)
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+
+LOCAL_MODULE:= libLLVMARM64Utils
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)