Index: lib/clang/Makefile =================================================================== --- lib/clang/Makefile +++ lib/clang/Makefile @@ -56,6 +56,13 @@ libllvmtransformutils \ libllvmvectorize \ \ + libllvmaarch64asmparser \ + libllvmaarch64codegen \ + libllvmaarch64desc \ + libllvmaarch64disassembler \ + libllvmaarch64info \ + libllvmaarch64instprinter \ + libllvmaarch64utils \ libllvmarmasmparser \ libllvmarmcodegen \ libllvmarmdesc \ Index: lib/clang/clang.build.mk =================================================================== --- lib/clang/clang.build.mk +++ lib/clang/clang.build.mk @@ -29,8 +29,8 @@ TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm53/aarch64/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" @@ -46,7 +46,7 @@ -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ - ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 + AArch64/AArch64 ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 . for hdr in \ AsmMatcher/-gen-asm-matcher \ AsmWriter1/-gen-asm-writer,-asmwriternum=1 \ Index: lib/clang/include/AArch64GenAsmMatcher.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenAsmMatcher.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenAsmMatcher.inc.h" Index: lib/clang/include/AArch64GenAsmWriter.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenAsmWriter.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenAsmWriter.inc.h" Index: lib/clang/include/AArch64GenAsmWriter1.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenAsmWriter1.inc @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenAsmWriter1.inc.h" Index: lib/clang/include/AArch64GenCallingConv.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenCallingConv.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenCallingConv.inc.h" Index: lib/clang/include/AArch64GenDAGISel.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenDAGISel.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenDAGISel.inc.h" Index: lib/clang/include/AArch64GenDisassemblerTables.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenDisassemblerTables.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenDisassemblerTables.inc.h" Index: lib/clang/include/AArch64GenFastISel.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenFastISel.inc @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenFastISel.inc.h" Index: lib/clang/include/AArch64GenInstrInfo.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenInstrInfo.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenInstrInfo.inc.h" Index: lib/clang/include/AArch64GenMCCodeEmitter.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenMCCodeEmitter.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenMCCodeEmitter.inc.h" Index: lib/clang/include/AArch64GenMCPseudoLowering.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenMCPseudoLowering.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenMCPseudoLowering.inc.h" Index: lib/clang/include/AArch64GenRegisterInfo.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenRegisterInfo.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenRegisterInfo.inc.h" Index: lib/clang/include/AArch64GenSubtargetInfo.inc =================================================================== --- /dev/null +++ lib/clang/include/AArch64GenSubtargetInfo.inc @@ -0,0 +1,2 @@ +/* $FreeBSD: projects/arm64/lib/clang/include/ARMGenAsmMatcher.inc 212904 2010-09-20 16:43:17Z dim $ */ +#include "AArch64GenSubtargetInfo.inc.h" Index: lib/clang/include/llvm/Config/AsmParsers.def =================================================================== --- lib/clang/include/llvm/Config/AsmParsers.def +++ lib/clang/include/llvm/Config/AsmParsers.def @@ -1,6 +1,7 @@ /* $FreeBSD$ */ LLVM_ASM_PARSER(ARM) +LLVM_ASM_PARSER(AArch64) LLVM_ASM_PARSER(Mips) LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(Sparc) Index: lib/clang/include/llvm/Config/AsmPrinters.def =================================================================== --- lib/clang/include/llvm/Config/AsmPrinters.def +++ lib/clang/include/llvm/Config/AsmPrinters.def @@ -1,6 +1,7 @@ /* $FreeBSD$ */ LLVM_ASM_PRINTER(ARM) +LLVM_ASM_PRINTER(AArch64) LLVM_ASM_PRINTER(Mips) LLVM_ASM_PRINTER(PowerPC) LLVM_ASM_PRINTER(Sparc) Index: lib/clang/include/llvm/Config/Targets.def =================================================================== --- lib/clang/include/llvm/Config/Targets.def +++ lib/clang/include/llvm/Config/Targets.def @@ -1,6 +1,7 @@ /* $FreeBSD$ */ LLVM_TARGET(ARM) +LLVM_TARGET(AArch64) LLVM_TARGET(Mips) LLVM_TARGET(PowerPC) LLVM_TARGET(Sparc) Index: lib/clang/libllvmaarch64asmparser/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64asmparser/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64asmparser + +SRCDIR= lib/Target/AArch64/AsmParser +INCDIR= lib/Target/AArch64 +SRCS= AArch64AsmParser.cpp + +TGHDRS= AArch64GenAsmMatcher \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64codegen/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64codegen/Makefile @@ -0,0 +1,42 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64codegen + +SRCDIR= lib/Target/AArch64 +SRCS= AArch64AddressTypePromotion.cpp \ + AArch64AdvSIMDScalarPass.cpp \ + AArch64AsmPrinter.cpp \ + AArch64BranchRelaxation.cpp \ + AArch64CleanupLocalDynamicTLSPass.cpp \ + AArch64CollectLOH.cpp \ + AArch64ConditionalCompares.cpp \ + AArch64DeadRegisterDefinitionsPass.cpp \ + AArch64ExpandPseudoInsts.cpp \ + AArch64FastISel.cpp \ + AArch64FrameLowering.cpp \ + AArch64ISelDAGToDAG.cpp \ + AArch64ISelLowering.cpp \ + AArch64InstrInfo.cpp \ + AArch64LoadStoreOptimizer.cpp \ + AArch64MCInstLower.cpp \ + AArch64PromoteConstant.cpp \ + AArch64RegisterInfo.cpp \ + AArch64SelectionDAGInfo.cpp \ + AArch64StorePairSuppress.cpp \ + AArch64Subtarget.cpp \ + AArch64TargetMachine.cpp \ + AArch64TargetObjectFile.cpp \ + AArch64TargetTransformInfo.cpp + +TGHDRS= AArch64GenCallingConv \ + AArch64GenDAGISel \ + AArch64GenFastISel \ + AArch64GenInstrInfo \ + AArch64GenMCPseudoLowering \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo \ + Intrinsics + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64desc/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64desc/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64desc + +SRCDIR= lib/Target/AArch64/MCTargetDesc +SRCS= AArch64AsmBackend.cpp \ + AArch64ELFObjectWriter.cpp \ + AArch64ELFStreamer.cpp \ + AArch64MCAsmInfo.cpp \ + AArch64MCCodeEmitter.cpp \ + AArch64MCExpr.cpp \ + AArch64MCTargetDesc.cpp \ + AArch64MachObjectWriter.cpp \ + AArch64TargetStreamer.cpp +CFLAGS+= -I${LLVM_SRCS}/${SRCDIR}/.. + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenMCCodeEmitter \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64disassembler/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64disassembler/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64disassembler + +SRCDIR= lib/Target/AArch64/Disassembler +INCDIR= lib/Target/AArch64 +SRCS= AArch64Disassembler.cpp + +TGHDRS= AArch64GenDisassemblerTables \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64info/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64info/Makefile @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64info + +SRCDIR= lib/Target/AArch64/TargetInfo +INCDIR= lib/Target/AArch64 +SRCS= AArch64TargetInfo.cpp + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64instprinter/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64instprinter/Makefile @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64instprinter + +SRCDIR= lib/Target/AArch64/InstPrinter +INCDIR= lib/Target/AArch64 +SRCS= AArch64InstPrinter.cpp + +TGHDRS= AArch64GenAsmWriter \ + AArch64GenAsmWriter1 \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: lib/clang/libllvmaarch64utils/Makefile =================================================================== --- /dev/null +++ lib/clang/libllvmaarch64utils/Makefile @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64utils + +SRCDIR= lib/Target/AArch64/Utils +INCDIR= lib/Target/AArch64 +SRCS= AArch64BaseInfo.cpp + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Index: usr.bin/clang/clang/Makefile =================================================================== --- usr.bin/clang/clang/Makefile +++ usr.bin/clang/clang/Makefile @@ -70,6 +70,13 @@ llvminstrumentation \ llvmbitwriter \ llvmasmparser \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \