1set(LLVM_TARGET_DEFINITIONS X86.td)
2
3tablegen(LLVM X86GenRegisterInfo.inc -gen-register-info)
4tablegen(LLVM X86GenDisassemblerTables.inc -gen-disassembler)
5tablegen(LLVM X86GenInstrInfo.inc -gen-instr-info)
6tablegen(LLVM X86GenAsmWriter.inc -gen-asm-writer)
7tablegen(LLVM X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
8tablegen(LLVM X86GenAsmMatcher.inc -gen-asm-matcher)
9tablegen(LLVM X86GenDAGISel.inc -gen-dag-isel)
10tablegen(LLVM X86GenFastISel.inc -gen-fast-isel)
11tablegen(LLVM X86GenCallingConv.inc -gen-callingconv)
12tablegen(LLVM X86GenSubtargetInfo.inc -gen-subtarget)
13add_public_tablegen_target(X86CommonTableGen)
14
15set(sources
16  X86AsmPrinter.cpp
17  X86CallFrameOptimization.cpp
18  X86FastISel.cpp
19  X86FloatingPoint.cpp
20  X86FrameLowering.cpp
21  X86ISelDAGToDAG.cpp
22  X86ISelLowering.cpp
23  X86InstrInfo.cpp
24  X86MCInstLower.cpp
25  X86MachineFunctionInfo.cpp
26  X86PadShortFunction.cpp
27  X86RegisterInfo.cpp
28  X86SelectionDAGInfo.cpp
29  X86Subtarget.cpp
30  X86TargetMachine.cpp
31  X86TargetObjectFile.cpp
32  X86TargetTransformInfo.cpp
33  X86VZeroUpper.cpp
34  X86FixupLEAs.cpp
35  )
36
37if( CMAKE_CL_64 )
38  enable_language(ASM_MASM)
39  ADD_CUSTOM_COMMAND(
40    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj
41    MAIN_DEPENDENCY X86CompilationCallback_Win64.asm
42    COMMAND ${CMAKE_ASM_MASM_COMPILER} /nologo /Fo ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/X86CompilationCallback_Win64.asm
43   )
44   set(sources ${sources} ${CMAKE_CURRENT_BINARY_DIR}/X86CompilationCallback_Win64.obj)
45endif()
46
47add_llvm_target(X86CodeGen ${sources})
48
49add_subdirectory(AsmParser)
50add_subdirectory(Disassembler)
51add_subdirectory(InstPrinter)
52add_subdirectory(MCTargetDesc)
53add_subdirectory(TargetInfo)
54add_subdirectory(Utils)
55