2022-02-26 02:57:33 +08:00
# For MSVC_RUNTIME_LIBRARY
cmake_minimum_required ( VERSION 3.15 )
if ( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
message ( FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build" )
endif ( )
2024-09-30 11:35:51 +08:00
set ( BUILD_RPATH_USE_ORIGIN true )
2022-02-26 02:57:33 +08:00
# Detect whether capstone is compiled as top-level or a subdirectory
set ( PROJECT_IS_TOP_LEVEL OFF )
if ( CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
set ( PROJECT_IS_TOP_LEVEL ON )
# Enable folder support
set_property ( GLOBAL PROPERTY USE_FOLDERS ON )
2022-01-13 00:13:57 +08:00
endif ( )
2014-05-18 17:03:15 +08:00
2022-02-26 02:57:33 +08:00
# https://cmake.org/cmake/help/latest/policy/CMP0042.html
cmake_policy ( SET CMP0042 NEW )
2014-05-28 16:27:53 +08:00
2024-12-17 13:04:03 +08:00
# Check if VERSION is provided externally, otherwise default to 6.0.0
if ( NOT DEFINED PROJECT_VERSION )
set ( PROJECT_VERSION "6.0.0" )
endif ( )
# Extract the major, minor, and patch versions
string ( REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" PROJECT_VERSION_BASE ${ PROJECT_VERSION } )
# Set the project version without the pre-release identifier
project ( capstone VERSION ${ PROJECT_VERSION_BASE } )
2014-05-28 16:27:53 +08:00
2024-04-26 15:11:46 +08:00
set ( UNIX_COMPILER_OPTIONS -Werror -Wall -Warray-bounds -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation )
2023-11-30 10:21:02 +08:00
2024-06-19 18:54:05 +08:00
# maybe-uninitialized is only supported by newer versions of GCC.
2023-11-30 10:21:02 +08:00
# Unfortunately, it is pretty unreliable and reports wrong results.
# So we disable it for all compilers versions which support it.
include ( CheckCCompilerFlag )
2024-06-19 18:54:05 +08:00
check_c_compiler_flag ( "-Wno-maybe-uninitialized" SUPPORTS_MU )
2024-04-26 15:11:46 +08:00
check_c_compiler_flag ( "-Wshadow=local" SUPPORTS_SHADOWING )
check_c_compiler_flag ( "-Wsometimes-uninitialized" SUPPORTS_SUNINIT )
2023-11-30 10:21:02 +08:00
if ( SUPPORTS_MU )
2024-06-19 18:54:05 +08:00
set ( UNIX_COMPILER_OPTIONS ${ UNIX_COMPILER_OPTIONS } -Wno-maybe-uninitialized )
2023-11-30 10:21:02 +08:00
endif ( )
2024-04-26 15:11:46 +08:00
if ( SUPPORTS_SHADOWING )
set ( UNIX_COMPILER_OPTIONS ${ UNIX_COMPILER_OPTIONS } -Wshadow=local )
endif ( )
if ( SUPPORTS_SUNINIT )
set ( UNIX_COMPILER_OPTIONS ${ UNIX_COMPILER_OPTIONS } -Wsometimes-uninitialized )
endif ( )
2023-04-06 16:58:09 +08:00
if ( MSVC )
2023-05-30 11:08:18 +08:00
add_compile_options ( /W1 /w14189 )
2023-04-06 16:58:09 +08:00
else ( )
2024-04-26 15:11:46 +08:00
add_compile_options ( ${ UNIX_COMPILER_OPTIONS } )
2023-04-06 16:58:09 +08:00
endif ( )
2024-06-13 08:53:20 +08:00
# to configure the options specify them in the command line or change them in the cmake UI.
2014-05-31 10:44:27 +08:00
# Don't edit the makefile!
2024-11-09 15:05:30 +08:00
option ( CAPSTONE_BUILD_SHARED_LIBS "Build shared library" OFF )
option ( CAPSTONE_BUILD_STATIC_LIBS "Build static library" ON )
option ( CAPSTONE_BUILD_STATIC_MSVC_RUNTIME "Embed static MSVC runtime (Windows only). Always set if CAPSTONE_BUILD_SHARED_LIBS=ON" ${ CAPSTONE_BUILD_SHARED_LIBS } )
2024-01-12 10:05:45 +08:00
option ( CAPSTONE_BUILD_MACOS_THIN "Disable universal2 builds on macOS" OFF )
2014-09-20 00:39:22 +08:00
option ( CAPSTONE_BUILD_DIET "Build diet library" OFF )
2024-08-31 21:33:38 +08:00
option ( CAPSTONE_BUILD_LEGACY_TESTS "Build legacy tests" ${ PROJECT_IS_TOP_LEVEL } )
2022-02-26 02:57:33 +08:00
option ( CAPSTONE_BUILD_CSTOOL "Build cstool" ${ PROJECT_IS_TOP_LEVEL } )
2023-03-25 06:26:09 +08:00
option ( CAPSTONE_BUILD_CSTEST "Build cstest" OFF )
2014-09-20 00:39:22 +08:00
option ( CAPSTONE_USE_DEFAULT_ALLOC "Use default memory allocation functions" ON )
2024-01-20 21:48:05 +08:00
option ( CAPSTONE_USE_ARCH_REGISTRATION "Use explicit architecture registration" OFF )
2019-04-29 20:20:01 +08:00
option ( CAPSTONE_ARCHITECTURE_DEFAULT "Whether architectures are enabled by default" ON )
2024-09-25 14:58:06 +08:00
option ( CAPSTONE_DEBUG "Whether to enable extra debug assertions (enabled with CMAKE_BUILD_TYPE=Debug)" OFF )
2022-02-26 02:57:33 +08:00
option ( CAPSTONE_INSTALL "Generate install target" ${ PROJECT_IS_TOP_LEVEL } )
2024-06-10 10:01:00 +08:00
option ( ENABLE_ASAN "Enable address sanitizer" OFF )
2024-08-31 21:33:38 +08:00
option ( ENABLE_COVERAGE "Enable test coverage" OFF )
2024-06-10 10:01:00 +08:00
2024-11-09 15:05:30 +08:00
if ( NOT CAPSTONE_BUILD_SHARED_LIBS AND NOT CAPSTONE_BUILD_STATIC_LIBS )
FATAL_ERROR ( "CAPSTONE_BUILD_SHARED_LIBS and CAPSTONE_BUILD_STATIC_LIBS are both unset. Nothing to build." )
2024-11-04 20:32:53 +08:00
endif ( )
2024-06-10 10:01:00 +08:00
if ( ENABLE_ASAN )
2024-08-31 21:33:38 +08:00
message ( "Enabling ASAN" )
2024-06-10 10:01:00 +08:00
add_definitions ( -DASAN_ENABLED )
2024-10-06 08:45:13 +08:00
add_compile_options ( -fsanitize=address,undefined )
add_link_options ( -fsanitize=address,undefined )
2024-06-10 10:01:00 +08:00
endif ( )
2014-09-20 00:39:22 +08:00
2024-08-31 21:33:38 +08:00
if ( ENABLE_COVERAGE )
message ( "Enabling COVERAGE" )
add_compile_options ( --coverage )
add_link_options ( --coverage )
endif ( )
2024-01-12 10:05:45 +08:00
# If building for OSX it's best to allow CMake to handle building both architectures
if ( APPLE AND NOT CAPSTONE_BUILD_MACOS_THIN )
set ( CMAKE_OSX_ARCHITECTURES "x86_64;arm64" )
endif ( )
2024-09-30 11:35:51 +08:00
set ( SUPPORTED_ARCHITECTURES ARM AARCH64 M68K MIPS PPC SPARC SYSTEMZ XCORE X86 TMS320C64X M680X EVM MOS65XX WASM BPF RISCV SH TRICORE ALPHA HPPA LOONGARCH XTENSA )
set ( SUPPORTED_ARCHITECTURE_LABELS ARM AARCH64 M68K MIPS PowerPC Sparc SystemZ XCore x86 TMS320C64x M680x EVM MOS65XX WASM BPF RISCV SH TriCore Alpha HPPA LoongArch Xtensa )
2015-07-31 04:01:19 +08:00
2024-08-15 20:57:23 +08:00
# If building for OSX it's best to allow CMake to handle building both architectures
if ( APPLE AND NOT CAPSTONE_BUILD_MACOS_THIN )
# The cibuildwheel on Github Actions sets this env variable
# with the architecture flags it wants to build for.
if ( DEFINED ENV{ARCHFLAGS} )
if ( "$ENV{ARCHFLAGS}" STREQUAL "-arch arm64 -arch x86_64" )
set ( CMAKE_OSX_ARCHITECTURES "x86_64;arm64" )
elseif ( "$ENV{ARCHFLAGS}" STREQUAL "-arch arm64" )
set ( CMAKE_OSX_ARCHITECTURES "arm64" )
elseif ( "$ENV{ARCHFLAGS}" STREQUAL "-arch x86_64" )
set ( CMAKE_OSX_ARCHITECTURES "x86_64" )
endif ( )
else ( )
set ( CMAKE_OSX_ARCHITECTURES "x86_64;arm64" )
endif ( )
endif ( )
2015-07-31 04:01:19 +08:00
list ( LENGTH SUPPORTED_ARCHITECTURES count )
math ( EXPR count "${count}-1" )
# create options controlling whether support for a particular architecture is needed
foreach ( i RANGE ${ count } )
2022-02-26 02:57:33 +08:00
list ( GET SUPPORTED_ARCHITECTURES ${ i } supported_architecture )
list ( GET SUPPORTED_ARCHITECTURE_LABELS ${ i } supported_architecture_label )
option ( "CAPSTONE_${supported_architecture}_SUPPORT" "${supported_architecture_label} support" ${ CAPSTONE_ARCHITECTURE_DEFAULT } )
endforeach ( )
2015-07-31 04:01:19 +08:00
2014-09-20 00:39:22 +08:00
option ( CAPSTONE_X86_REDUCE "x86 with reduce instruction sets to minimize library" OFF )
2014-10-14 07:55:30 +08:00
option ( CAPSTONE_X86_ATT_DISABLE "Disable x86 AT&T syntax" OFF )
2015-04-10 01:28:19 +08:00
option ( CAPSTONE_OSXKERNEL_SUPPORT "Support to embed Capstone into OS X Kernel extensions" OFF )
2014-09-20 00:39:22 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_BUILD_DIET )
2014-05-31 10:44:27 +08:00
add_definitions ( -DCAPSTONE_DIET )
2022-02-26 02:57:33 +08:00
endif ( )
2014-05-31 10:44:27 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_USE_DEFAULT_ALLOC )
2014-06-03 17:38:29 +08:00
add_definitions ( -DCAPSTONE_USE_SYS_DYN_MEM )
2022-02-26 02:57:33 +08:00
endif ( )
2014-05-18 17:03:15 +08:00
2024-01-20 21:48:05 +08:00
if ( CAPSTONE_USE_ARCH_REGISTRATION )
add_definitions ( -DCAPSTONE_USE_ARCH_REGISTRATION )
2024-02-23 13:20:00 +08:00
elseif ( CAPSTONE_ARCHITECTURE_DEFAULT )
# propagate architecture support variables to preprocessor
foreach ( supported_architecture ${ SUPPORTED_ARCHITECTURES } )
set ( option_name "CAPSTONE_${supported_architecture}_SUPPORT" )
if ( ${ option_name } )
message ( "Enabling ${option_name}" )
add_definitions ( "-D${option_name}" )
endif ( )
endforeach ( )
2024-01-20 21:48:05 +08:00
endif ( )
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_X86_REDUCE )
2014-05-31 10:44:27 +08:00
add_definitions ( -DCAPSTONE_X86_REDUCE )
2022-02-26 02:57:33 +08:00
endif ( )
2014-05-18 17:03:15 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_X86_ATT_DISABLE )
2014-08-18 02:59:05 +08:00
add_definitions ( -DCAPSTONE_X86_ATT_DISABLE )
2022-02-26 02:57:33 +08:00
endif ( )
2014-08-18 02:59:05 +08:00
2024-09-25 14:58:06 +08:00
if ( CAPSTONE_DEBUG OR CMAKE_BUILD_TYPE STREQUAL "Debug" )
2019-05-23 09:25:36 +08:00
add_definitions ( -DCAPSTONE_DEBUG )
2022-02-26 02:57:33 +08:00
endif ( )
# Force static runtime libraries
2024-11-09 15:05:30 +08:00
if ( CAPSTONE_BUILD_STATIC_MSVC_RUNTIME )
2022-02-26 02:57:33 +08:00
set ( CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
endif ( )
2019-05-23 09:25:36 +08:00
2014-06-04 05:04:23 +08:00
## sources
2015-04-16 02:31:32 +08:00
set ( SOURCES_ENGINE
2014-05-18 17:03:15 +08:00
c s . c
2023-05-30 11:08:18 +08:00
M a p p i n g . c
2014-05-18 17:03:15 +08:00
M C I n s t . c
M C I n s t r D e s c . c
2023-07-19 17:56:27 +08:00
M C I n s t P r i n t e r . c
2014-05-18 17:03:15 +08:00
M C R e g i s t e r I n f o . c
S S t r e a m . c
u t i l s . c
2015-04-23 01:35:47 +08:00
)
2015-04-16 02:31:32 +08:00
set ( HEADERS_ENGINE
2023-05-30 11:08:18 +08:00
c s _ s i m p l e _ t y p e s . h
2015-04-23 01:35:47 +08:00
c s _ p r i v . h
L E B 1 2 8 . h
2023-05-30 11:08:18 +08:00
M a p p i n g . h
2015-04-23 01:35:47 +08:00
M a t h E x t r a s . h
M C D i s a s s e m b l e r . h
M C F i x e d L e n D i s a s s e m b l e r . h
2015-04-15 18:15:26 +08:00
M C I n s t . h
M C I n s t r D e s c . h
2023-07-19 17:56:27 +08:00
M C I n s t P r i n t e r . h
2015-04-23 01:35:47 +08:00
M C R e g i s t e r I n f o . h
2015-04-15 18:15:26 +08:00
S S t r e a m . h
2015-04-23 01:35:47 +08:00
u t i l s . h
2022-02-26 02:57:33 +08:00
)
2015-04-15 18:15:26 +08:00
2015-04-24 02:39:48 +08:00
set ( HEADERS_COMMON
2023-11-15 12:12:14 +08:00
i n c l u d e / c a p s t o n e / a a r c h 6 4 . h
2024-05-31 20:07:03 +08:00
i n c l u d e / c a p s t o n e / a r m 6 4 . h
2015-04-23 03:03:47 +08:00
i n c l u d e / c a p s t o n e / a r m . h
i n c l u d e / c a p s t o n e / c a p s t o n e . h
2023-07-21 17:04:08 +08:00
i n c l u d e / c a p s t o n e / c s _ o p e r a n d . h
2018-07-20 12:36:50 +08:00
i n c l u d e / c a p s t o n e / e v m . h
2019-02-01 23:03:47 +08:00
i n c l u d e / c a p s t o n e / w a s m . h
2015-04-23 03:03:47 +08:00
i n c l u d e / c a p s t o n e / m i p s . h
i n c l u d e / c a p s t o n e / p p c . h
i n c l u d e / c a p s t o n e / x 8 6 . h
i n c l u d e / c a p s t o n e / s p a r c . h
i n c l u d e / c a p s t o n e / s y s t e m z . h
2024-09-14 16:57:54 +08:00
i n c l u d e / c a p s t o n e / s y s t e m z _ c o m p a t i b i l i t y . h
2015-04-23 03:03:47 +08:00
i n c l u d e / c a p s t o n e / x c o r e . h
2015-08-04 00:45:08 +08:00
i n c l u d e / c a p s t o n e / m 6 8 k . h
2016-05-03 20:52:11 +08:00
i n c l u d e / c a p s t o n e / t m s 3 2 0 c 6 4 x . h
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
i n c l u d e / c a p s t o n e / m 6 8 0 x . h
2018-12-03 04:39:41 +08:00
i n c l u d e / c a p s t o n e / m o s 6 5 x x . h
2019-02-18 17:39:51 +08:00
i n c l u d e / c a p s t o n e / b p f . h
2019-03-20 23:19:26 +08:00
i n c l u d e / c a p s t o n e / r i s c v . h
2023-03-06 21:48:42 +08:00
i n c l u d e / c a p s t o n e / s h . h
2016-05-21 20:49:53 +08:00
i n c l u d e / c a p s t o n e / t r i c o r e . h
2015-04-23 03:03:47 +08:00
i n c l u d e / c a p s t o n e / p l a t f o r m . h
2023-07-19 17:56:27 +08:00
i n c l u d e / c a p s t o n e / s h . h
2023-12-28 10:10:38 +08:00
i n c l u d e / c a p s t o n e / a l p h a . h
2024-03-26 13:58:56 +08:00
i n c l u d e / c a p s t o n e / h p p a . h
2024-06-26 14:47:44 +08:00
i n c l u d e / c a p s t o n e / l o o n g a r c h . h
2024-09-30 11:35:51 +08:00
i n c l u d e / c a p s t o n e / x t e n s a . h
2022-02-26 02:57:33 +08:00
)
2015-04-24 02:39:48 +08:00
2014-06-04 05:04:23 +08:00
## architecture support
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_ARM_SUPPORT )
2014-05-18 17:03:15 +08:00
add_definitions ( -DCAPSTONE_HAS_ARM )
2015-04-15 18:15:26 +08:00
set ( SOURCES_ARM
2023-07-19 17:56:27 +08:00
a r c h / A R M / A R M B a s e I n f o . c
2014-05-18 17:03:15 +08:00
a r c h / A R M / A R M D i s a s s e m b l e r . c
2023-07-19 17:56:27 +08:00
a r c h / A R M / A R M D i s a s s e m b l e r E x t e n s i o n . c
2014-05-18 17:03:15 +08:00
a r c h / A R M / A R M I n s t P r i n t e r . c
a r c h / A R M / A R M M a p p i n g . c
a r c h / A R M / A R M M o d u l e . c
2015-04-23 01:35:47 +08:00
)
set ( HEADERS_ARM
a r c h / A R M / A R M A d d r e s s i n g M o d e s . h
a r c h / A R M / A R M B a s e I n f o . h
2023-07-19 17:56:27 +08:00
a r c h / A R M / A R M D i s a s s e m b l e r E x t e n s i o n . h
2015-04-23 01:35:47 +08:00
a r c h / A R M / A R M I n s t P r i n t e r . h
2023-07-19 17:56:27 +08:00
a r c h / A R M / A R M L i n k a g e . h
2015-04-23 01:35:47 +08:00
a r c h / A R M / A R M M a p p i n g . h
2015-04-16 02:31:32 +08:00
a r c h / A R M / A R M G e n A s m W r i t e r . i n c
a r c h / A R M / A R M G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / A R M / A R M G e n I n s t r I n f o . i n c
a r c h / A R M / A R M G e n R e g i s t e r I n f o . i n c
a r c h / A R M / A R M G e n S u b t a r g e t I n f o . i n c
2023-07-19 17:56:27 +08:00
a r c h / A R M / A R M G e n C S F e a t u r e N a m e . i n c
a r c h / A R M / A R M G e n C S M a p p i n g I n s n . i n c
a r c h / A R M / A R M G e n C S M a p p i n g I n s n O p . i n c
a r c h / A R M / A R M G e n C S M a p p i n g I n s n N a m e . i n c
2019-03-16 15:22:15 +08:00
a r c h / A R M / A R M G e n S y s t e m R e g i s t e r . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-28 14:29:20 +08:00
2023-11-15 12:12:14 +08:00
if ( CAPSTONE_AARCH64_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_AARCH64 )
set ( SOURCES_AARCH64
2014-05-18 17:03:15 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 B a s e I n f o . c
a r c h / A A r c h 6 4 / A A r c h 6 4 D i s a s s e m b l e r . c
2023-11-15 12:12:14 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 D i s a s s e m b l e r E x t e n s i o n . c
2014-05-18 17:03:15 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 I n s t P r i n t e r . c
a r c h / A A r c h 6 4 / A A r c h 6 4 M a p p i n g . c
a r c h / A A r c h 6 4 / A A r c h 6 4 M o d u l e . c
2015-04-23 01:35:47 +08:00
)
2023-11-15 12:12:14 +08:00
set ( HEADERS_AARCH64
2015-04-23 01:35:47 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 A d d r e s s i n g M o d e s . h
a r c h / A A r c h 6 4 / A A r c h 6 4 B a s e I n f o . h
2023-11-15 12:12:14 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 D i s a s s e m b l e r E x t e n s i o n . h
2015-04-23 01:35:47 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 I n s t P r i n t e r . h
2023-11-15 12:12:14 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 L i n k a g e . h
2015-04-23 01:35:47 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 M a p p i n g . h
2015-04-16 02:31:32 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n A s m W r i t e r . i n c
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n I n s t r I n f o . i n c
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n R e g i s t e r I n f o . i n c
2019-04-10 14:17:08 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n R e g i s t e r N a m e . i n c
2015-04-16 02:31:32 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n S u b t a r g e t I n f o . i n c
2019-04-10 14:17:08 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n S y s t e m O p e r a n d s . i n c
2023-11-15 12:12:14 +08:00
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n C S M a p p i n g I n s n . i n c
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n C S M a p p i n g I n s n N a m e . i n c
a r c h / A A r c h 6 4 / A A r c h 6 4 G e n C S M a p p i n g I n s n O p . i n c
2019-04-10 14:17:08 +08:00
)
2022-02-26 02:57:33 +08:00
endif ( )
2014-05-18 17:03:15 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_MIPS_SUPPORT )
2014-05-18 17:03:15 +08:00
add_definitions ( -DCAPSTONE_HAS_MIPS )
2015-04-15 18:15:26 +08:00
set ( SOURCES_MIPS
2014-05-18 17:03:15 +08:00
a r c h / M i p s / M i p s D i s a s s e m b l e r . c
2014-05-28 14:29:20 +08:00
a r c h / M i p s / M i p s I n s t P r i n t e r . c
2014-05-18 17:03:15 +08:00
a r c h / M i p s / M i p s M a p p i n g . c
a r c h / M i p s / M i p s M o d u l e . c
2015-04-23 01:35:47 +08:00
)
set ( HEADERS_MIPS
a r c h / M i p s / M i p s D i s a s s e m b l e r . h
a r c h / M i p s / M i p s G e n A s m W r i t e r . i n c
a r c h / M i p s / M i p s G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / M i p s / M i p s G e n I n s t r I n f o . i n c
a r c h / M i p s / M i p s G e n R e g i s t e r I n f o . i n c
a r c h / M i p s / M i p s G e n S u b t a r g e t I n f o . i n c
a r c h / M i p s / M i p s I n s t P r i n t e r . h
a r c h / M i p s / M i p s M a p p i n g . h
a r c h / M i p s / M i p s M a p p i n g I n s n . i n c
2022-02-26 02:57:33 +08:00
)
2015-04-16 02:31:32 +08:00
set ( HEADERS_MIPS
a r c h / M i p s / M i p s D i s a s s e m b l e r . h
a r c h / M i p s / M i p s G e n A s m W r i t e r . i n c
a r c h / M i p s / M i p s G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / M i p s / M i p s G e n I n s t r I n f o . i n c
a r c h / M i p s / M i p s G e n R e g i s t e r I n f o . i n c
a r c h / M i p s / M i p s G e n S u b t a r g e t I n f o . i n c
a r c h / M i p s / M i p s I n s t P r i n t e r . h
a r c h / M i p s / M i p s M a p p i n g . h
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-18 17:03:15 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_PPC_SUPPORT )
2014-05-18 17:03:15 +08:00
add_definitions ( -DCAPSTONE_HAS_POWERPC )
2015-04-15 18:15:26 +08:00
set ( SOURCES_PPC
2014-05-18 17:03:15 +08:00
a r c h / P o w e r P C / P P C D i s a s s e m b l e r . c
a r c h / P o w e r P C / P P C I n s t P r i n t e r . c
a r c h / P o w e r P C / P P C M a p p i n g . c
a r c h / P o w e r P C / P P C M o d u l e . c
2015-04-23 01:35:47 +08:00
)
set ( HEADERS_PPC
2023-09-05 12:24:59 +08:00
a r c h / P o w e r P C / P P C I n s t r I n f o . h
a r c h / P o w e r P C / P P C L i n k a g e . h
2015-04-23 01:35:47 +08:00
a r c h / P o w e r P C / P P C M a p p i n g . h
2023-09-05 12:24:59 +08:00
a r c h / P o w e r P C / P P C M C T a r g e t D e s c . h
2015-04-23 01:35:47 +08:00
a r c h / P o w e r P C / P P C P r e d i c a t e s . h
2023-09-05 12:24:59 +08:00
a r c h / P o w e r P C / P P C R e g i s t e r I n f o . h
2015-04-16 02:31:32 +08:00
a r c h / P o w e r P C / P P C G e n A s m W r i t e r . i n c
2023-09-05 12:24:59 +08:00
a r c h / P o w e r P C / P P C G e n C S F e a t u r e N a m e . i n c
a r c h / P o w e r P C / P P C G e n C S M a p p i n g I n s n . i n c
a r c h / P o w e r P C / P P C G e n C S M a p p i n g I n s n O p . i n c
a r c h / P o w e r P C / P P C G e n C S M a p p i n g I n s n N a m e . i n c
a r c h / P o w e r P C / P P C G e n C S O p G r o u p . i n c
2015-04-16 02:31:32 +08:00
a r c h / P o w e r P C / P P C G e n D i s a s s e m b l e r T a b l e s . i n c
2023-09-05 12:24:59 +08:00
a r c h / P o w e r P C / P P C G e n I n s t r I n f o . i n c
2015-04-16 02:31:32 +08:00
a r c h / P o w e r P C / P P C G e n S u b t a r g e t I n f o . i n c
2019-04-30 13:50:42 +08:00
a r c h / P o w e r P C / P P C G e n R e g i s t e r I n f o . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-18 17:03:15 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_X86_SUPPORT )
2014-05-18 17:03:15 +08:00
add_definitions ( -DCAPSTONE_HAS_X86 )
2015-04-15 18:15:26 +08:00
set ( SOURCES_X86
2014-05-18 17:03:15 +08:00
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r . c
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r D e c o d e r . c
a r c h / X 8 6 / X 8 6 I n t e l I n s t P r i n t e r . c
2019-02-26 15:19:51 +08:00
a r c h / X 8 6 / X 8 6 I n s t P r i n t e r C o m m o n . c
2014-05-18 17:03:15 +08:00
a r c h / X 8 6 / X 8 6 M a p p i n g . c
a r c h / X 8 6 / X 8 6 M o d u l e . c
2015-04-23 01:35:47 +08:00
)
set ( HEADERS_X86
a r c h / X 8 6 / X 8 6 B a s e I n f o . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r D e c o d e r . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r D e c o d e r C o m m o n . h
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r . i n c
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r 1 . i n c
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r 1 _ r e d u c e . i n c
2019-03-16 15:22:15 +08:00
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r _ r e d u c e . i n c
2015-04-23 01:35:47 +08:00
a r c h / X 8 6 / X 8 6 G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / X 8 6 / X 8 6 G e n D i s a s s e m b l e r T a b l e s _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n I n s t r I n f o . i n c
a r c h / X 8 6 / X 8 6 G e n I n s t r I n f o _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n R e g i s t e r I n f o . i n c
2019-03-16 15:22:15 +08:00
a r c h / X 8 6 / X 8 6 I n s t P r i n t e r . h
a r c h / X 8 6 / X 8 6 M a p p i n g . h
2015-04-23 01:35:47 +08:00
a r c h / X 8 6 / X 8 6 M a p p i n g I n s n . i n c
a r c h / X 8 6 / X 8 6 M a p p i n g I n s n O p . i n c
a r c h / X 8 6 / X 8 6 M a p p i n g I n s n O p _ r e d u c e . i n c
2019-03-16 15:22:15 +08:00
a r c h / X 8 6 / X 8 6 M a p p i n g I n s n _ r e d u c e . i n c
2022-02-26 02:57:33 +08:00
)
2019-03-16 15:22:15 +08:00
set ( HEADERS_X86
a r c h / X 8 6 / X 8 6 B a s e I n f o . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r D e c o d e r . h
a r c h / X 8 6 / X 8 6 D i s a s s e m b l e r D e c o d e r C o m m o n . h
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r . i n c
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r 1 . i n c
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r 1 _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n A s m W r i t e r _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / X 8 6 / X 8 6 G e n D i s a s s e m b l e r T a b l e s _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n I n s t r I n f o . i n c
a r c h / X 8 6 / X 8 6 G e n I n s t r I n f o _ r e d u c e . i n c
a r c h / X 8 6 / X 8 6 G e n R e g i s t e r I n f o . i n c
a r c h / X 8 6 / X 8 6 I n s t P r i n t e r . h
a r c h / X 8 6 / X 8 6 M a p p i n g . h
2022-02-26 02:57:33 +08:00
)
if ( NOT CAPSTONE_BUILD_DIET )
2015-04-16 03:39:10 +08:00
set ( SOURCES_X86 ${ SOURCES_X86 } arch/X86/X86ATTInstPrinter.c )
2022-02-26 02:57:33 +08:00
endif ( )
endif ( )
2014-05-28 14:29:20 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_SPARC_SUPPORT )
2014-05-28 15:15:00 +08:00
add_definitions ( -DCAPSTONE_HAS_SPARC )
2015-04-15 18:15:26 +08:00
set ( SOURCES_SPARC
a r c h / S p a r c / S p a r c D i s a s s e m b l e r . c
a r c h / S p a r c / S p a r c I n s t P r i n t e r . c
a r c h / S p a r c / S p a r c M a p p i n g . c
a r c h / S p a r c / S p a r c M o d u l e . c
2022-02-26 02:57:33 +08:00
)
2015-04-16 02:31:32 +08:00
set ( HEADERS_SPARC
a r c h / S p a r c / S p a r c . h
a r c h / S p a r c / S p a r c D i s a s s e m b l e r . h
a r c h / S p a r c / S p a r c G e n A s m W r i t e r . i n c
a r c h / S p a r c / S p a r c G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / S p a r c / S p a r c G e n I n s t r I n f o . i n c
a r c h / S p a r c / S p a r c G e n R e g i s t e r I n f o . i n c
a r c h / S p a r c / S p a r c G e n S u b t a r g e t I n f o . i n c
a r c h / S p a r c / S p a r c I n s t P r i n t e r . h
a r c h / S p a r c / S p a r c M a p p i n g . h
2015-04-23 01:35:47 +08:00
a r c h / S p a r c / S p a r c M a p p i n g I n s n . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-28 15:15:00 +08:00
2024-09-14 16:57:54 +08:00
if ( CAPSTONE_SYSTEMZ_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_SYSTEMZ )
set ( SOURCES_SYSTEMZ
2015-04-15 18:15:26 +08:00
a r c h / S y s t e m Z / S y s t e m Z D i s a s s e m b l e r . c
2024-09-14 16:57:54 +08:00
a r c h / S y s t e m Z / S y s t e m Z D i s a s s e m b l e r E x t e n s i o n . c
2015-04-15 18:15:26 +08:00
a r c h / S y s t e m Z / S y s t e m Z I n s t P r i n t e r . c
a r c h / S y s t e m Z / S y s t e m Z M a p p i n g . c
a r c h / S y s t e m Z / S y s t e m Z M o d u l e . c
a r c h / S y s t e m Z / S y s t e m Z M C T a r g e t D e s c . c
2022-02-26 02:57:33 +08:00
)
2024-09-14 16:57:54 +08:00
set ( HEADERS_SYSTEMZ
a r c h / S y s t e m Z / S y s t e m Z L i n k a g e . h
a r c h / S y s t e m Z / S y s t e m Z D i s a s s e m b l e r E x t e n s i o n . h
a r c h / S y s t e m Z / S y s t e m Z I n s t P r i n t e r . h
a r c h / S y s t e m Z / S y s t e m Z M C T a r g e t D e s c . h
a r c h / S y s t e m Z / S y s t e m Z M a p p i n g . h
a r c h / S y s t e m Z / S y s t e m Z M o d u l e . h
2015-04-16 02:31:32 +08:00
a r c h / S y s t e m Z / S y s t e m Z G e n A s m W r i t e r . i n c
2024-09-14 16:57:54 +08:00
a r c h / S y s t e m Z / S y s t e m Z G e n C S A l i a s M n e m M a p . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n C S F e a t u r e N a m e . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n C S M a p p i n g I n s n . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n C S M a p p i n g I n s n N a m e . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n C S M a p p i n g I n s n O p . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n C S O p G r o u p . i n c
2015-04-16 02:31:32 +08:00
a r c h / S y s t e m Z / S y s t e m Z G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n I n s t r I n f o . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n R e g i s t e r I n f o . i n c
a r c h / S y s t e m Z / S y s t e m Z G e n S u b t a r g e t I n f o . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-28 15:15:00 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_XCORE_SUPPORT )
2014-05-28 15:15:00 +08:00
add_definitions ( -DCAPSTONE_HAS_XCORE )
2015-04-15 18:15:26 +08:00
set ( SOURCES_XCORE
a r c h / X C o r e / X C o r e D i s a s s e m b l e r . c
a r c h / X C o r e / X C o r e I n s t P r i n t e r . c
a r c h / X C o r e / X C o r e M a p p i n g . c
a r c h / X C o r e / X C o r e M o d u l e . c
2022-02-26 02:57:33 +08:00
)
2015-04-16 02:31:32 +08:00
set ( HEADERS_XCORE
a r c h / X C o r e / X C o r e D i s a s s e m b l e r . h
a r c h / X C o r e / X C o r e G e n A s m W r i t e r . i n c
a r c h / X C o r e / X C o r e G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / X C o r e / X C o r e G e n I n s t r I n f o . i n c
a r c h / X C o r e / X C o r e G e n R e g i s t e r I n f o . i n c
a r c h / X C o r e / X C o r e I n s t P r i n t e r . h
a r c h / X C o r e / X C o r e M a p p i n g . h
2015-04-23 01:35:47 +08:00
a r c h / X C o r e / X C o r e M a p p i n g I n s n . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2014-05-28 15:15:00 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_M68K_SUPPORT )
2015-08-04 00:45:08 +08:00
add_definitions ( -DCAPSTONE_HAS_M68K )
set ( SOURCES_M68K
2022-02-26 02:57:33 +08:00
a r c h / M 6 8 K / M 6 8 K D i s a s s e m b l e r . c
a r c h / M 6 8 K / M 6 8 K I n s t P r i n t e r . c
a r c h / M 6 8 K / M 6 8 K M o d u l e . c
2015-08-04 00:45:08 +08:00
)
set ( HEADERS_M68K
2022-02-26 02:57:33 +08:00
a r c h / M 6 8 K / M 6 8 K D i s a s s e m b l e r . h
)
endif ( )
2015-08-04 00:45:08 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_TMS320C64X_SUPPORT )
2016-05-03 20:52:11 +08:00
add_definitions ( -DCAPSTONE_HAS_TMS320C64X )
set ( SOURCES_TMS320C64X
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x D i s a s s e m b l e r . c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x I n s t P r i n t e r . c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x M a p p i n g . c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x M o d u l e . c
2022-02-26 02:57:33 +08:00
)
2016-05-03 20:52:11 +08:00
set ( HEADERS_TMS320C64X
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x D i s a s s e m b l e r . h
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x G e n A s m W r i t e r . i n c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x G e n I n s t r I n f o . i n c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x G e n R e g i s t e r I n f o . i n c
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x I n s t P r i n t e r . h
a r c h / T M S 3 2 0 C 6 4 x / T M S 3 2 0 C 6 4 x M a p p i n g . h
2022-02-26 02:57:33 +08:00
)
endif ( )
2016-05-03 20:52:11 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_M680X_SUPPORT )
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
add_definitions ( -DCAPSTONE_HAS_M680X )
set ( SOURCES_M680X
2022-02-26 02:57:33 +08:00
a r c h / M 6 8 0 X / M 6 8 0 X D i s a s s e m b l e r . c
a r c h / M 6 8 0 X / M 6 8 0 X I n s t P r i n t e r . c
a r c h / M 6 8 0 X / M 6 8 0 X M o d u l e . c
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
)
set ( HEADERS_M680X
2022-02-26 02:57:33 +08:00
a r c h / M 6 8 0 X / M 6 8 0 X I n s t P r i n t e r . h
a r c h / M 6 8 0 X / M 6 8 0 X D i s a s s e m b l e r . h
a r c h / M 6 8 0 X / M 6 8 0 X D i s a s s e m b l e r I n t e r n a l s . h
)
endif ( )
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_EVM_SUPPORT )
2018-03-31 17:29:22 +08:00
add_definitions ( -DCAPSTONE_HAS_EVM )
set ( SOURCES_EVM
a r c h / E V M / E V M D i s a s s e m b l e r . c
a r c h / E V M / E V M I n s t P r i n t e r . c
a r c h / E V M / E V M M a p p i n g . c
a r c h / E V M / E V M M o d u l e . c
)
set ( HEADERS_EVM
a r c h / E V M / E V M D i s a s s e m b l e r . h
a r c h / E V M / E V M I n s t P r i n t e r . h
a r c h / E V M / E V M M a p p i n g . h
a r c h / E V M / E V M M a p p i n g I n s n . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2018-03-31 17:29:22 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_WASM_SUPPORT )
2019-02-01 23:03:47 +08:00
add_definitions ( -DCAPSTONE_HAS_WASM )
set ( SOURCES_WASM
a r c h / W A S M / W A S M D i s a s s e m b l e r . c
a r c h / W A S M / W A S M I n s t P r i n t e r . c
a r c h / W A S M / W A S M M a p p i n g . c
a r c h / W A S M / W A S M M o d u l e . c
)
set ( HEADERS_WASM
a r c h / W A S M / W A S M D i s a s s e m b l e r . h
a r c h / W A S M / W A S M I n s t P r i n t e r . h
a r c h / W A S M / W A S M M a p p i n g . h
2022-02-26 02:57:33 +08:00
)
endif ( )
2019-02-01 23:03:47 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_MOS65XX_SUPPORT )
2018-12-03 04:39:41 +08:00
add_definitions ( -DCAPSTONE_HAS_MOS65XX )
set ( SOURCES_MOS65XX
a r c h / M O S 6 5 X X / M O S 6 5 X X M o d u l e . c
a r c h / M O S 6 5 X X / M O S 6 5 X X D i s a s s e m b l e r . c )
set ( HEADERS_SOURCES_MOS65XX
a r c h / M O S 6 5 X X / M O S 6 5 X X D i s a s s e m b l e r . h
)
2022-02-26 02:57:33 +08:00
endif ( )
2018-12-03 04:39:41 +08:00
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_BPF_SUPPORT )
2019-02-18 17:39:51 +08:00
add_definitions ( -DCAPSTONE_HAS_BPF )
set ( SOURCES_BPF
a r c h / B P F / B P F D i s a s s e m b l e r . c
a r c h / B P F / B P F I n s t P r i n t e r . c
a r c h / B P F / B P F M a p p i n g . c
a r c h / B P F / B P F M o d u l e . c
2022-02-26 02:57:33 +08:00
)
2019-02-18 17:39:51 +08:00
set ( HEADERS_BPF
a r c h / B P F / B P F C o n s t a n t s . h
a r c h / B P F / B P F D i s a s s e m b l e r . h
a r c h / B P F / B P F I n s t P r i n t e r . h
a r c h / B P F / B P F M a p p i n g . h
a r c h / B P F / B P F M o d u l e . h
)
2022-02-26 02:57:33 +08:00
endif ( )
if ( CAPSTONE_RISCV_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_RISCV )
set ( SOURCES_RISCV
a r c h / R I S C V / R I S C V D i s a s s e m b l e r . c
a r c h / R I S C V / R I S C V I n s t P r i n t e r . c
a r c h / R I S C V / R I S C V M a p p i n g . c
a r c h / R I S C V / R I S C V M o d u l e . c
)
set ( HEADERS_RISCV
a r c h / R I S C V / R I S C V B a s e I n f o . h
a r c h / R I S C V / R I S C V D i s a s s e m b l e r . h
a r c h / R I S C V / R I S C V I n s t P r i n t e r . h
a r c h / R I S C V / R I S C V M a p p i n g . h
a r c h / R I S C V / R I S C V M o d u l e . h
a r c h / R I S C V / R I S C V G e n A s m W r i t e r . i n c
a r c h / R I S C V / R I S C V G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / R I S C V / R I S C V G e n I n s n N a m e M a p s . i n c
a r c h / R I S C V / R I S C V G e n I n s t r I n f o . i n c
a r c h / R I S C V / R I S C V G e n R e g i s t e r I n f o . i n c
a r c h / R I S C V / R I S C V G e n S u b t a r g e t I n f o . i n c
a r c h / R I S C V / R I S C V M a p p i n g I n s n . i n c
2024-07-10 11:36:39 +08:00
a r c h / R I S C V / R I S C V M a p p i n g I n s n O p . i n c
2022-02-26 02:57:33 +08:00
)
endif ( )
2022-09-12 20:26:04 +08:00
if ( CAPSTONE_SH_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_SH )
set ( SOURCES_SH
a r c h / S H / S H D i s a s s e m b l e r . c
a r c h / S H / S H I n s t P r i n t e r . c
a r c h / S H / S H M o d u l e . c
)
set ( HEADERS_SH
a r c h / S H / S H D i s a s s e m b l e r . h
a r c h / S H / S H I n s t P r i n t e r . h
a r c h / S H / S H M o d u l e . h
a r c h / S H / S H I n s n T a b l e . i n c
)
endif ( )
2016-05-21 20:49:53 +08:00
if ( CAPSTONE_TRICORE_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_TRICORE )
set ( SOURCES_TRICORE
a r c h / T r i C o r e / T r i C o r e D i s a s s e m b l e r . c
a r c h / T r i C o r e / T r i C o r e I n s t P r i n t e r . c
a r c h / T r i C o r e / T r i C o r e M a p p i n g . c
a r c h / T r i C o r e / T r i C o r e M o d u l e . c
)
set ( HEADERS_TRICORE
a r c h / T r i C o r e / T r i C o r e D i s a s s e m b l e r . h
2023-05-30 11:13:03 +08:00
a r c h / T r i C o r e / T r i C o r e L i n k a g e . h
2016-05-21 20:49:53 +08:00
a r c h / T r i C o r e / T r i C o r e G e n A s m W r i t e r . i n c
a r c h / T r i C o r e / T r i C o r e G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / T r i C o r e / T r i C o r e G e n I n s t r I n f o . i n c
a r c h / T r i C o r e / T r i C o r e G e n R e g i s t e r I n f o . i n c
a r c h / T r i C o r e / T r i C o r e M a p p i n g . h
2023-03-04 07:21:30 +08:00
a r c h / T r i C o r e / T r i C o r e M o d u l e . h
2016-05-21 20:49:53 +08:00
)
endif ( )
2023-12-28 10:10:38 +08:00
if ( CAPSTONE_ALPHA_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_ALPHA )
set ( SOURCES_ALPHA
a r c h / A l p h a / A l p h a D i s a s s e m b l e r . c
a r c h / A l p h a / A l p h a I n s t P r i n t e r . c
a r c h / A l p h a / A l p h a M a p p i n g . c
a r c h / A l p h a / A l p h a M o d u l e . c
)
set ( HEADERS_ALPHA
a r c h / A l p h a / A l p h a D i s a s s e m b l e r . h
a r c h / A l p h a / A l p h a G e n A s m W r i t e r . i n c
a r c h / A l p h a / A l p h a G e n D i s a s s e m b l e r T a b l e s . i n c
a r c h / A l p h a / A l p h a G e n I n s t r I n f o . i n c
a r c h / A l p h a / A l p h a G e n R e g i s t e r I n f o . i n c
a r c h / A l p h a / A l p h a L i n k a g e . h
a r c h / A l p h a / A l p h a M a p p i n g . h
a r c h / A l p h a / A l p h a M o d u l e . h
a r c h / A l p h a / A l p h a G e n C S M a p p i n g I n s n O p . i n c
a r c h / A l p h a / A l p h a G e n C S M a p p i n g I n s n . i n c
a r c h / A l p h a / A l p h a G e n C S M a p p i n g I n s n N a m e . i n c
)
endif ( )
2024-03-26 13:58:56 +08:00
if ( CAPSTONE_HPPA_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_HPPA )
set ( SOURCES_HPPA
a r c h / H P P A / H P P A D i s a s s e m b l e r . c
a r c h / H P P A / H P P A I n s t P r i n t e r . c
a r c h / H P P A / H P P A M a p p i n g . c
a r c h / H P P A / H P P A M o d u l e . c
)
set ( HEADERS_HPPA
a r c h / H P P A / H P P A C o n s t a n t s . h
a r c h / H P P A / H P P A D i s a s s e m b l e r . h
a r c h / H P P A / H P P A I n s t P r i n t e r . h
a r c h / H P P A / H P P A M a p p i n g . h
a r c h / H P P A / H P P A M o d u l e . h
)
endif ( )
2024-06-26 14:47:44 +08:00
if ( CAPSTONE_LOONGARCH_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_LOONGARCH )
set ( SOURCES_LOONGARCH
a r c h / L o o n g A r c h / L o o n g A r c h D i s a s s e m b l e r . c
a r c h / L o o n g A r c h / L o o n g A r c h D i s a s s e m b l e r E x t e n s i o n . c
a r c h / L o o n g A r c h / L o o n g A r c h I n s t P r i n t e r . c
a r c h / L o o n g A r c h / L o o n g A r c h M a p p i n g . c
a r c h / L o o n g A r c h / L o o n g A r c h M o d u l e . c
)
set ( HEADERS_LOONGARCH
a r c h / L o o n g A r c h / L o o n g A r c h I n s t P r i n t e r . h
a r c h / L o o n g A r c h / L o o n g A r c h M a p p i n g . h
a r c h / L o o n g A r c h / L o o n g A r c h M o d u l e . h
a r c h / L o o n g A r c h / L o o n g A r c h L i n k a g e . h
)
endif ( )
2024-09-30 11:35:51 +08:00
if ( CAPSTONE_XTENSA_SUPPORT )
add_definitions ( -DCAPSTONE_HAS_XTENSA )
set ( SOURCES_XTENSA
a r c h / X t e n s a / X t e n s a D i s a s s e m b l e r . c
a r c h / X t e n s a / X t e n s a I n s t P r i n t e r . c
a r c h / X t e n s a / X t e n s a M a p p i n g . c
a r c h / X t e n s a / X t e n s a M o d u l e . c
)
set ( HEADERS_XTENSA
a r c h / X t e n s a / X t e n s a D i s a s s e m b l e r . h
a r c h / X t e n s a / X t e n s a I n s t P r i n t e r . h
a r c h / X t e n s a / X t e n s a M a p p i n g . h
a r c h / X t e n s a / X t e n s a M o d u l e . h
)
endif ( )
2016-05-21 20:49:53 +08:00
if ( CAPSTONE_OSXKERNEL_SUPPORT )
2015-04-10 01:28:19 +08:00
add_definitions ( -DCAPSTONE_HAS_OSXKERNEL )
2022-02-26 02:57:33 +08:00
endif ( )
2015-04-10 01:28:19 +08:00
2015-04-15 18:15:26 +08:00
set ( ALL_SOURCES
2015-04-16 02:31:32 +08:00
$ { S O U R C E S _ E N G I N E }
2015-04-15 18:15:26 +08:00
$ { S O U R C E S _ A R M }
2023-11-15 12:12:14 +08:00
$ { S O U R C E S _ A A R C H 6 4 }
2015-04-15 18:15:26 +08:00
$ { S O U R C E S _ M I P S }
$ { S O U R C E S _ P P C }
$ { S O U R C E S _ X 8 6 }
$ { S O U R C E S _ S P A R C }
2024-09-14 16:57:54 +08:00
$ { S O U R C E S _ S Y S T E M Z }
2015-04-15 18:15:26 +08:00
$ { S O U R C E S _ X C O R E }
2015-08-04 00:45:08 +08:00
$ { S O U R C E S _ M 6 8 K }
2016-05-03 20:52:11 +08:00
$ { S O U R C E S _ T M S 3 2 0 C 6 4 X }
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
$ { S O U R C E S _ M 6 8 0 X }
2018-03-31 17:29:22 +08:00
$ { S O U R C E S _ E V M }
2019-02-01 23:03:47 +08:00
$ { S O U R C E S _ W A S M }
2018-12-03 04:39:41 +08:00
$ { S O U R C E S _ M O S 6 5 X X }
2019-02-18 17:39:51 +08:00
$ { S O U R C E S _ B P F }
2019-03-20 23:19:26 +08:00
$ { S O U R C E S _ R I S C V }
2022-09-12 20:26:04 +08:00
$ { S O U R C E S _ S H }
2016-05-21 20:49:53 +08:00
$ { S O U R C E S _ T R I C O R E }
2023-12-28 10:10:38 +08:00
$ { S O U R C E S _ A L P H A }
2024-03-26 13:58:56 +08:00
$ { S O U R C E S _ H P P A }
2024-06-26 14:47:44 +08:00
$ { S O U R C E S _ L O O N G A R C H }
2024-09-30 11:35:51 +08:00
$ { S O U R C E S _ X T E N S A }
2022-02-26 02:57:33 +08:00
)
2015-04-15 18:15:26 +08:00
2015-04-16 02:31:32 +08:00
set ( ALL_HEADERS
2015-04-24 02:39:48 +08:00
$ { H E A D E R S _ C O M M O N }
2015-04-16 02:31:32 +08:00
$ { H E A D E R S _ E N G I N E }
$ { H E A D E R S _ A R M }
2023-11-15 12:12:14 +08:00
$ { H E A D E R S _ A A R C H 6 4 }
2015-04-16 02:31:32 +08:00
$ { H E A D E R S _ M I P S }
$ { H E A D E R S _ P P C }
$ { H E A D E R S _ X 8 6 }
$ { H E A D E R S _ S P A R C }
2024-09-14 16:57:54 +08:00
$ { H E A D E R S _ S Y S T E M Z }
2015-04-16 02:31:32 +08:00
$ { H E A D E R S _ X C O R E }
2015-10-04 14:56:35 +08:00
$ { H E A D E R S _ M 6 8 K }
2016-05-03 20:52:11 +08:00
$ { H E A D E R S _ T M S 3 2 0 C 6 4 X }
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
$ { H E A D E R S _ M 6 8 0 X }
2018-03-31 17:29:22 +08:00
$ { H E A D E R S _ E V M }
2019-02-01 23:03:47 +08:00
$ { H E A D E R S _ W A S M }
2018-12-03 04:39:41 +08:00
$ { H E A D E R S _ M O S 6 5 X X }
2019-02-18 17:39:51 +08:00
$ { H E A D E R S _ B P F }
2019-03-20 23:19:26 +08:00
$ { H E A D E R S _ R I S C V }
2022-09-12 20:26:04 +08:00
$ { H E A D E R S _ S H }
2016-05-21 20:49:53 +08:00
$ { H E A D E R S _ T R I C O R E }
2023-12-28 10:10:38 +08:00
$ { H E A D E R S _ A L P H A }
2024-03-26 13:58:56 +08:00
$ { H E A D E R S _ H P P A }
2024-06-26 14:47:44 +08:00
$ { H E A D E R S _ L O O N G A R C H }
2024-09-30 11:35:51 +08:00
$ { H E A D E R S _ X T E N S A }
2022-02-26 02:57:33 +08:00
)
2014-05-18 17:03:15 +08:00
2014-06-04 05:04:23 +08:00
## properties
# version info
2022-02-26 02:57:33 +08:00
set_property ( GLOBAL PROPERTY VERSION ${ PROJECT_VERSION } )
2014-06-04 05:04:23 +08:00
## targets
2024-11-04 20:32:53 +08:00
add_library ( capstone OBJECT ${ ALL_SOURCES } ${ ALL_HEADERS } )
set_property ( TARGET capstone PROPERTY C_STANDARD 99 )
2022-02-26 02:57:33 +08:00
target_include_directories ( capstone PUBLIC
$ < B U I L D _ I N T E R F A C E : $ { P R O J E C T _ S O U R C E _ D I R } / i n c l u d e >
)
2024-11-04 20:32:53 +08:00
2024-11-09 15:05:30 +08:00
if ( CAPSTONE_BUILD_STATIC_LIBS )
2024-11-04 20:32:53 +08:00
add_library ( capstone_static STATIC $< TARGET_OBJECTS:capstone > )
# Use normal capstone name. Otherwise we get libcapstone_static.a
set_target_properties ( capstone_static PROPERTIES OUTPUT_NAME "capstone" )
target_include_directories ( capstone_static PUBLIC
$ < B U I L D _ I N T E R F A C E : $ { P R O J E C T _ S O U R C E _ D I R } / i n c l u d e >
)
endif ( )
2014-05-28 15:58:35 +08:00
2024-11-09 15:05:30 +08:00
if ( CAPSTONE_BUILD_SHARED_LIBS )
2024-11-04 20:32:53 +08:00
set_property ( TARGET capstone PROPERTY POSITION_INDEPENDENT_CODE 1 )
add_library ( capstone_shared SHARED $< TARGET_OBJECTS:capstone > )
# Use normal capstone name. Otherwise we get libcapstone_shared.so
set_target_properties ( capstone_shared PROPERTIES OUTPUT_NAME "capstone" )
set_target_properties ( capstone_shared PROPERTIES
2022-02-26 02:57:33 +08:00
V E R S I O N $ { P R O J E C T _ V E R S I O N }
S O V E R S I O N $ { P R O J E C T _ V E R S I O N _ M A J O R }
)
2024-11-04 20:32:53 +08:00
target_include_directories ( capstone_shared PUBLIC
$ < B U I L D _ I N T E R F A C E : $ { P R O J E C T _ S O U R C E _ D I R } / i n c l u d e >
)
target_compile_definitions ( capstone PUBLIC CAPSTONE_SHARED )
2022-02-26 02:57:33 +08:00
endif ( )
2024-08-31 21:33:38 +08:00
# Fuzzer if this is moved to it's own CMakeLists.txt (as it should be)
# the OSS fuzzer build fails. And must be fixed.
# Simply because it builds the fuzzer there again with hard-coded paths.
# See: https://github.com/google/oss-fuzz/blob/master/projects/capstone/build.sh
# and: https://github.com/capstone-engine/capstone/issues/2454
add_executable ( fuzz_disasm ${ PROJECT_SOURCE_DIR } /suite/fuzz/onefile.c ${ PROJECT_SOURCE_DIR } /suite/fuzz/fuzz_disasm.c ${ PROJECT_SOURCE_DIR } /suite/fuzz/platform.c )
target_link_libraries ( fuzz_disasm PRIVATE capstone )
2014-05-18 17:03:15 +08:00
2015-04-16 02:31:32 +08:00
source_group ( "Source\\Engine" FILES ${ SOURCES_ENGINE } )
source_group ( "Source\\ARM" FILES ${ SOURCES_ARM } )
2023-11-15 12:12:14 +08:00
source_group ( "Source\\AARCH64" FILES ${ SOURCES_AARCH64 } )
2015-04-16 02:31:32 +08:00
source_group ( "Source\\Mips" FILES ${ SOURCES_MIPS } )
source_group ( "Source\\PowerPC" FILES ${ SOURCES_PPC } )
2015-04-17 01:15:14 +08:00
source_group ( "Source\\Sparc" FILES ${ SOURCES_SPARC } )
2024-09-14 16:57:54 +08:00
source_group ( "Source\\SystemZ" FILES ${ SOURCES_SYSTEMZ } )
2015-04-17 01:15:14 +08:00
source_group ( "Source\\X86" FILES ${ SOURCES_X86 } )
2015-04-16 02:31:32 +08:00
source_group ( "Source\\XCore" FILES ${ SOURCES_XCORE } )
2015-10-04 14:56:35 +08:00
source_group ( "Source\\M68K" FILES ${ SOURCES_M68K } )
2016-05-03 20:52:11 +08:00
source_group ( "Source\\TMS320C64x" FILES ${ SOURCES_TMS320C64X } )
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
source_group ( "Source\\M680X" FILES ${ SOURCES_M680X } )
2018-03-31 17:29:22 +08:00
source_group ( "Source\\EVM" FILES ${ SOURCES_EVM } )
2019-02-01 23:03:47 +08:00
source_group ( "Source\\WASM" FILES ${ SOURCES_WASM } )
2018-12-03 04:39:41 +08:00
source_group ( "Source\\MOS65XX" FILES ${ SOURCES_MOS65XX } )
2019-02-18 17:39:51 +08:00
source_group ( "Source\\BPF" FILES ${ SOURCES_BPF } )
2019-03-20 23:19:26 +08:00
source_group ( "Source\\RISCV" FILES ${ SOURCES_RISCV } )
2022-09-12 20:26:04 +08:00
source_group ( "Source\\SH" FILES ${ SOURCES_SH } )
2016-05-21 20:49:53 +08:00
source_group ( "Source\\TriCore" FILES ${ SOURCES_TRICORE } )
2023-12-28 10:10:38 +08:00
source_group ( "Source\\Alpha" FILES ${ SOURCES_ALPHA } )
2024-03-26 13:58:56 +08:00
source_group ( "Source\\HPPA" FILES ${ SOURCES_HPPA } )
2024-06-26 14:47:44 +08:00
source_group ( "Source\\LoongArch" FILES ${ SOURCES_LOONGARCH } )
2024-09-30 11:35:51 +08:00
source_group ( "Source\\Xtensa" FILES ${ SOURCES_XTENSA } )
2019-03-16 15:22:15 +08:00
2015-04-24 02:39:48 +08:00
source_group ( "Include\\Common" FILES ${ HEADERS_COMMON } )
2015-04-16 02:31:32 +08:00
source_group ( "Include\\Engine" FILES ${ HEADERS_ENGINE } )
source_group ( "Include\\ARM" FILES ${ HEADERS_ARM } )
2023-11-15 12:12:14 +08:00
source_group ( "Include\\AARCH64" FILES ${ HEADERS_AARCH64 } )
2015-04-16 02:31:32 +08:00
source_group ( "Include\\Mips" FILES ${ HEADERS_MIPS } )
source_group ( "Include\\PowerPC" FILES ${ HEADERS_PPC } )
2015-04-17 01:15:14 +08:00
source_group ( "Include\\Sparc" FILES ${ HEADERS_SPARC } )
2024-09-14 16:57:54 +08:00
source_group ( "Include\\SystemZ" FILES ${ HEADERS_SYSTEMZ } )
2015-04-17 01:15:14 +08:00
source_group ( "Include\\X86" FILES ${ HEADERS_X86 } )
2015-04-16 02:31:32 +08:00
source_group ( "Include\\XCore" FILES ${ HEADERS_XCORE } )
2015-10-04 14:56:35 +08:00
source_group ( "Include\\M68K" FILES ${ HEADERS_M68K } )
2016-05-03 20:52:11 +08:00
source_group ( "Include\\TMS320C64x" FILES ${ HEADERS_TMS320C64X } )
M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301
* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT
* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.
* M680X: Add python bindings. Added python tests.
* M680X: Added cpu types to usage message.
* cstool: Avoid segfault for invalid <arch+mode>.
* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.
* M680X: Update CMake/make for m680x support. Update .gitignore.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Reduce compiler warnings.
* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).
* M680X: Add ocaml bindings and tests.
* M680X: Add java bindings and tests.
* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Naming, use page1 for PAGE1 instructions (without prefix).
* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.
* M680X: Added access property to cs_m680x_op.
* M680X: Added operand size.
* M680X: Remove compiler warnings.
* M680X: Added READ/WRITE access property per operator.
* M680X: Make reg_inherent_hdlr independent of CPU type.
* M680X: Add HD6309 support + bug fixes
* M680X: Remove errors and warning.
* M680X: Add Bcc/LBcc to group BRAREL (relative branch).
* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.
* M680X: Remove LBRN from group BRAREL.
* M680X: Refactored cpu_type initialization for better readability.
* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.
* M680X: Remove typo in cstool.c
* M680X: Some format improvements in changed_regs.
* M680X: Remove insn id string list from tests (C/python/java/ocaml).
* M680X: SEXW, set access of reg. D to WRITE.
* M680X: Sort changed_regs in increasing m680x_insn order.
* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.
* M680X: cstool, also write '(in mnemonic)' for second reg. operand.
* M680X: Add BRN/LBRN to group JUMP and BRAREL.
* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.
* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.
* M680X: Rename some instruction handlers.
* M680X: Add M68HC05 support.
* M680X: Dont print prefix '<' for direct addr. mode.
* M680X: Add M68HC08 support + resorted tables + bug fixes.
* M680X: Add Freescale HCS08 support.
* M680X: Changed group names, avoid spaces.
* M680X: Refactoring, rename addessing mode handlers.
* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.
* M680X: Rename some M6809/HD6309 specific functions.
* M680X: Add CPU12 (68HC12/HCS12) support.
* M680X: Correctly display illegal instruction as FCB .
* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.
* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.
* M680X: Better support for changing insn id within handler for addessing mode.
* M680X: Remove warnings.
* M680X: In set_changed_regs_read_write_counts use own access_mode.
* M680X: Split cpu specific tables into separate *.inc files.
* M680X: Remove warnings.
* M680X: Removed address_mode. Addressing mode is available in operand.type
* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.
* M680X: Remove register TMP1. It is first visible in CPU12X.
* M680X: Performance improvement + bug fixes.
* M680X: Performance improvement, make cpu_tables const static.
* M680X: Simplify operand decoding by using two handlers.
* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.
* M680X: Format with astyle.
* M680X: Update documentation.
* M680X: Corrected author for m680x specific files.
* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
source_group ( "Include\\M680X" FILES ${ HEADERS_MC680X } )
2018-03-31 17:29:22 +08:00
source_group ( "Include\\EVM" FILES ${ HEADERS_EVM } )
2019-02-01 23:03:47 +08:00
source_group ( "Include\\WASM" FILES ${ HEADERS_WASM } )
2018-12-03 04:39:41 +08:00
source_group ( "Include\\MOS65XX" FILES ${ HEADERS_MOS65XX } )
2019-02-18 17:39:51 +08:00
source_group ( "Include\\BPF" FILES ${ HEADERS_BPF } )
2019-03-20 23:19:26 +08:00
source_group ( "Include\\RISCV" FILES ${ HEADERS_RISCV } )
2022-09-12 20:26:04 +08:00
source_group ( "Include\\SH" FILES ${ HEADERS_SH } )
2016-05-21 20:49:53 +08:00
source_group ( "Include\\TriCore" FILES ${ HEADERS_TRICORE } )
2023-12-28 10:10:38 +08:00
source_group ( "Include\\Alpha" FILES ${ HEADERS_ALPHA } )
2024-03-26 13:58:56 +08:00
source_group ( "Include\\HPPA" FILES ${ HEADERS_HPPA } )
2024-06-26 14:47:44 +08:00
source_group ( "Include\\LoongArch" FILES ${ HEADERS_LOONGARCH } )
2024-09-30 11:35:51 +08:00
source_group ( "Include\\Xtensa" FILES ${ HEADERS_XTENSA } )
2015-04-16 02:31:32 +08:00
2014-06-04 05:04:23 +08:00
## installation
2022-02-26 02:57:33 +08:00
if ( CAPSTONE_INSTALL )
2024-08-17 23:54:12 +08:00
include ( GNUInstallDirs )
2022-02-26 02:57:33 +08:00
install ( FILES ${ HEADERS_COMMON } DESTINATION ${ CMAKE_INSTALL_INCLUDEDIR } /capstone )
2023-07-19 17:56:27 +08:00
install ( FILES ${ HEADERS_INC } DESTINATION ${ CMAKE_INSTALL_INCLUDEDIR } /capstone/inc )
2020-06-02 20:58:33 +08:00
2024-08-17 23:54:12 +08:00
# Support absolute installation paths (discussion: https://github.com/NixOS/nixpkgs/issues/144170)
if ( IS_ABSOLUTE ${ CMAKE_INSTALL_LIBDIR } )
set ( CAPSTONE_PKGCONFIG_INSTALL_LIBDIR ${ CMAKE_INSTALL_LIBDIR } )
set ( CAPSTONE_CMAKE_INSTALL_LIBDIR ${ CMAKE_INSTALL_LIBDIR } )
else ( )
set ( CAPSTONE_PKGCONFIG_INSTALL_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}" )
set ( CAPSTONE_CMAKE_INSTALL_LIBDIR "\${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_LIBDIR}" )
endif ( )
if ( IS_ABSOLUTE ${ CMAKE_INSTALL_INCLUDEDIR } )
set ( CAPSTONE_PKGCONFIG_INSTALL_INCLUDEDIR ${ CMAKE_INSTALL_INCLUDEDIR } )
set ( CAPSTONE_CMAKE_INSTALL_INCLUDEDIR ${ CMAKE_INSTALL_INCLUDEDIR } )
else ( )
set ( CAPSTONE_PKGCONFIG_INSTALL_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}" )
set ( CAPSTONE_CMAKE_INSTALL_INCLUDEDIR "\${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_INCLUDEDIR}" )
endif ( )
2022-02-26 02:57:33 +08:00
configure_file ( capstone.pc.in ${ CMAKE_BINARY_DIR } /capstone.pc @ONLY )
2022-04-13 17:39:30 +08:00
install ( FILES ${ CMAKE_BINARY_DIR } /capstone.pc DESTINATION ${ CMAKE_INSTALL_LIBDIR } /pkgconfig )
2022-02-26 02:57:33 +08:00
include ( CMakePackageConfigHelpers )
set ( CAPSTONE_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/capstone" )
configure_package_config_file (
c a p s t o n e - c o n f i g . c m a k e . i n
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c a p s t o n e - c o n f i g . c m a k e
I N S T A L L _ D E S T I N A T I O N $ { C A P S T O N E _ C M A K E _ C O N F I G _ I N S T A L L _ D I R }
)
write_basic_package_version_file (
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c a p s t o n e - c o n f i g - v e r s i o n . c m a k e
V E R S I O N $ { P R O J E C T _ V E R S I O N }
C O M P A T I B I L I T Y S a m e M a j o r V e r s i o n
)
install ( FILES
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c a p s t o n e - c o n f i g . c m a k e "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c a p s t o n e - c o n f i g - v e r s i o n . c m a k e "
D E S T I N A T I O N $ { C A P S T O N E _ C M A K E _ C O N F I G _ I N S T A L L _ D I R }
)
2014-06-04 05:04:23 +08:00
2024-11-09 15:05:30 +08:00
if ( CAPSTONE_BUILD_SHARED_LIBS )
2024-11-04 20:32:53 +08:00
set ( LIB_INSTALL_TARGETS capstone_shared )
endif ( )
2024-11-09 15:05:30 +08:00
if ( CAPSTONE_BUILD_STATIC_LIBS )
2024-11-04 20:32:53 +08:00
set ( LIB_INSTALL_TARGETS ${ LIB_INSTALL_TARGETS } capstone_static )
endif ( )
install ( TARGETS ${ LIB_INSTALL_TARGETS }
E X P O R T c a p s t o n e - t a r g e t s
R U N T I M E D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ B I N D I R }
L I B R A R Y D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ L I B D I R }
A R C H I V E D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ L I B D I R }
I N C L U D E S D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ I N C L U D E D I R }
2022-02-26 02:57:33 +08:00
)
install ( EXPORT capstone-targets
N A M E S P A C E c a p s t o n e : :
D E S T I N A T I O N $ { C A P S T O N E _ C M A K E _ C O N F I G _ I N S T A L L _ D I R }
)
# uninstall target
if ( NOT TARGET UNINSTALL )
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c m a k e _ u n i n s t a l l . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e "
I M M E D I A T E @ O N L Y
)
add_custom_target ( UNINSTALL COMMAND ${ CMAKE_COMMAND } -P ${ CMAKE_CURRENT_BINARY_DIR } /cmake_uninstall.cmake )
set_target_properties ( UNINSTALL PROPERTIES
F O L D E R C M a k e P r e d e f i n e d T a r g e t s
)
endif ( )
endif ( )
if ( CAPSTONE_BUILD_CSTOOL )
file ( GLOB CSTOOL_SRC cstool/*.c )
add_executable ( cstool ${ CSTOOL_SRC } )
target_link_libraries ( cstool PRIVATE capstone )
if ( CAPSTONE_INSTALL )
2022-04-03 17:33:47 +08:00
install ( TARGETS cstool EXPORT capstone-targets DESTINATION ${ CMAKE_INSTALL_BINDIR } )
2022-02-26 02:57:33 +08:00
endif ( )
2022-01-27 14:22:43 +08:00
endif ( )
2023-03-24 21:41:06 +08:00
if ( CAPSTONE_BUILD_CSTEST )
2024-08-31 21:33:38 +08:00
enable_testing ( )
set ( CSTEST_DIR ${ PROJECT_SOURCE_DIR } /suite/cstest )
add_subdirectory ( ${ CSTEST_DIR } )
# Integration and unit tests
set ( TESTS_INTEGRATION_DIR ${ PROJECT_SOURCE_DIR } /tests/integration )
add_subdirectory ( ${ TESTS_INTEGRATION_DIR } )
set ( TESTS_UNIT_DIR ${ PROJECT_SOURCE_DIR } /tests/unit )
add_subdirectory ( ${ TESTS_UNIT_DIR } )
2023-03-24 21:41:06 +08:00
endif ( )