Skip to content

Commit

Permalink
MIPS disassembler support.
Browse files Browse the repository at this point in the history
Patch by Vladimir Medic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153924 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ahatanak committed Apr 3, 2012
1 parent 5aeda3f commit 885020a
Show file tree
Hide file tree
Showing 21 changed files with 2,967 additions and 104 deletions.
3 changes: 3 additions & 0 deletions lib/Target/Mips/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ set(LLVM_TARGET_DEFINITIONS Mips.td)

tablegen(LLVM MipsGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM MipsGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM MipsGenDisassemblerTables.inc -gen-disassembler)
tablegen(LLVM MipsGenCodeEmitter.inc -gen-emitter)
tablegen(LLVM MipsGenMCCodeEmitter.inc -gen-emitter -mc-emitter)
tablegen(LLVM MipsGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM MipsGenDAGISel.inc -gen-dag-isel)
tablegen(LLVM MipsGenCallingConv.inc -gen-callingconv)
tablegen(LLVM MipsGenSubtargetInfo.inc -gen-subtarget)
tablegen(LLVM MipsGenEDInfo.inc -gen-enhanced-disassembly-info)
add_public_tablegen_target(MipsCommonTableGen)

add_llvm_target(MipsCodeGen
Expand All @@ -32,6 +34,7 @@ add_llvm_target(MipsCodeGen
)

add_subdirectory(InstPrinter)
add_subdirectory(Disassembler)
add_subdirectory(TargetInfo)
add_subdirectory(MCTargetDesc)
add_subdirectory(AsmParser)
30 changes: 30 additions & 0 deletions lib/Target/Mips/Disassembler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )

add_llvm_library(LLVMMipsDisassembler
MipsDisassembler.cpp
)

# workaround for hanging compilation on MSVC9 and 10
if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 )
set_property(
SOURCE MipsDisassembler.cpp
PROPERTY COMPILE_FLAGS "/Od"
)
endif()

add_dependencies(LLVMMipsDisassembler MipsCommonTableGen)
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )

add_llvm_library(LLVMMipsDisassembler
MipsDisassembler.cpp
)

# workaround for hanging compilation on MSVC9 and 10
if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 )
set_property(
SOURCE MipsDisassembler.cpp
PROPERTY COMPILE_FLAGS "/Od"
)
endif()

add_dependencies(LLVMMipsDisassembler MipsCommonTableGen)
46 changes: 46 additions & 0 deletions lib/Target/Mips/Disassembler/LLVMBuild.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
;===- ./lib/Target/Mips/Disassembler/LLVMBuild.txt --------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;

[component_0]
type = Library
name = MipsDisassembler
parent = Mips
required_libraries = MC Support MipsInfo
add_to_library_groups = Mips
;===- ./lib/Target/Mips/Disassembler/LLVMBuild.txt --------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;

[component_0]
type = Library
name = MipsDisassembler
parent = Mips
required_libraries = MC Support MipsInfo
add_to_library_groups = Mips
32 changes: 32 additions & 0 deletions lib/Target/Mips/Disassembler/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
##===- lib/Target/Mips/Disassembler/Makefile ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##

LEVEL = ../../../..
LIBRARYNAME = LLVMMipsDisassembler

# Hack: we need to include 'main' Mips target directory to grab private headers
CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

include $(LEVEL)/Makefile.common
##===- lib/Target/Mips/Disassembler/Makefile ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##

LEVEL = ../../../..
LIBRARYNAME = LLVMMipsDisassembler

# Hack: we need to include 'main' Mips target directory to grab private headers
CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

include $(LEVEL)/Makefile.common
Loading

0 comments on commit 885020a

Please sign in to comment.