Commit Graph

49 Commits

Author SHA1 Message Date
Wolfgang Schwotzer 22b4d0eb41 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
Ruslan Kabatsayev 4aec4de0c1 cstool: Separate instruction bytes by spaces (#1009) 2017-09-06 20:35:19 +07:00
Zach Riggle 596d31659c Fix the include path for Android builds when building cstool 2017-08-29 07:35:02 +07:00
Nguyen Anh Quynh fef1c2920a cstool: fix #975 2017-07-26 23:22:46 +08:00
Nguyen Anh Quynh e12e2de2cf cstool: cs_op_count() can return -1. fix #978 2017-07-26 23:16:00 +08:00
Nguyen Anh Quynh 13e06987cd cstool: some cleanup 2017-07-04 16:04:53 +08:00
Sergi Àlvarez i Capilla cff66503aa Refactor cstool to use getopt -100LOC (#953)
* Refactor cstool to use getopt -100LOC

* Add getopt.h for portability

* Do not use os-specific separators in include paths
2017-07-04 15:55:46 +08:00
radare 9af9742706 Honor CS_OPT_UNSIGNED on x86 and add cstool -u (#945) 2017-06-16 02:13:28 +08:00
Adrian Herrera 1910fd5635 mingw build: cstool fails to build with mingw (#941)
The correct compiler was not being passed to cstool/Makefile. The expected name
for the capstone lib was also incorrect - there is no "lib" prefix when
compiling with mingw.
2017-06-02 21:49:59 +08:00
echotyh 7982670984 Next (#918)
* Add FPUFLAGS information.

* Change the structure insn_op: from uint64_t eflags to union{ uint64_t eflags, uint64_t fpuflags; }.

* Adjust the  modified structure insn_op.

* Add missing flags.

* Change flags information acorrding to xed files and instruction manual.

* Rename fpuflags to fpu_flags.

* Updating flags information accoring to manual and xed files.

* Changing the name eflags to flags.

* Printing the FPU_FLAGS information when it belongs to group X86_GRP_FPU.

* Defining new flags.

* Updating flags information according to manual and xed files.

* Adding X86_GRP_FPU to all the instructions which have modified fpu_flags.

* Solving the conflict problem when do git commit.

* Rectify the annotation within the structure insn_op.

* Supplement fpu flags information for floating-point instructions which missed fpu flags before.

* Print fpu group information when an instructure belongs to X86_GRP_FPU.

* Add two new groups ARM64_GRP_BASE(base instructions) and ARM64_GRP_FPSIMD(SIMD&FP instructions).

* Revert "Add two new groups ARM64_GRP_BASE(base instructions) and ARM64_GRP_FPSIMD(SIMD&FP instructions)."

This reverts commit 8ab50e80a3688eb8cc3c9e256b1e0809c712a132.

* X86 clean up.

* Clean up arch/X86/X86MappingInsn.inc.

* Double check.

* Delete files.

* Clean up x86.

* Clean up reduce file

* Fix btr

* fix x86
2017-05-29 22:43:47 +08:00
Nguyen Anh Quynh 1be2ed8b24 rebuild cstool when the core changes. fix #932 2017-05-25 23:10:19 +08:00
Nguyen Anh Quynh 6d609ebdb0 cstool: support arm64be 2017-04-25 21:33:26 +08:00
Fotis Loukos 44ca0e3ab3 Added cstool support for tms320c64x 2017-04-17 11:58:29 +03:00
Nguyen Anh Quynh 13271a9c7f cstool: fix mips64 mode 2017-04-11 09:45:55 +08:00
Nguyen Anh Quynh 996db1f1a1 cstool: support armbe mode 2017-03-10 20:30:55 +08:00
Ben Cheney b1b9f2c064 Fix build under VS2012 (i.e. MSC_VER = 1700)
cstool.c currently imports inttypes.h, which breaks
building on older Visual Studio versions (I've been
testing 2012). This commit removes the explicit include
of inttypes.h, which is already handled in platform.h
(which is included by capstone.h). A define for the
function strtoull (used by cstool) has also been added
to platform.h for the case where MSC_VER <= 1700.

I don't know what effect this will have on OS X builds
as I'm unable to test on that platform.

Also, cstool.c doesn't need to include stdio.h
because it's already included by capstone.h.
2016-12-21 11:00:25 +08:00
Nguyen Anh Quynh 3ca6b0df43 x86: fix movw instruction in #789 2016-11-08 10:56:18 +08:00
Nguyen Anh Quynh fc0d6fb2ae cstool: print out insn groups 2016-11-05 00:47:14 +08:00
Nguyen Anh Quynh 570db5f679 cstool: use switch 2016-11-05 00:43:22 +08:00
Nguyen Anh Quynh 7532fc7914 cstool: remove its version 2016-11-04 23:57:52 +08:00
Nguyen Anh Quynh 13fea32b24 cstool: update README 2016-10-28 21:25:32 +08:00
Nguyen Anh Quynh 222d15f170 cleanup 2016-10-28 16:27:56 +08:00
Nguyen Anh Quynh df6f9cc890 cleanup 2016-10-28 16:12:05 +08:00
Nguyen Anh Quynh 27ee77feb1 Merge branch 'next' of https://github.com/echotyh/capstone into echotyh-next 2016-10-28 16:04:52 +08:00
YUHANG TANG 9bc14c18fc cstool: delete tab 2016-10-28 15:32:50 +08:00
YUHANG TANG be3f8674e1 cstool: add m68k and change cstool_x86 2016-10-27 12:12:59 +08:00
Nguyen Anh Quynh 10618e3e6a add CS_VERSION_{MAJOR, MINOR, EXTRA} 2016-10-25 14:29:21 +08:00
Nguyen Anh Quynh e18496fe5d cstool: cleanup 2016-10-22 23:38:35 +08:00
Nguyen Anh Quynh a799790147 cstool: print out core version 2016-10-21 17:34:31 +08:00
Nguyen Anh Quynh 2897a80caf cstool: fix compilation bug 2016-10-21 17:03:27 +08:00
Nguyen Anh Quynh 32238dc8c5 cstool: cleanup 2016-10-21 16:57:23 +08:00
YUHANG TANG bde12aed40 cstool: convert space to tab 2016-10-21 16:57:09 +08:00
YUHANG TANG a7b4852453 Delete platform.h and fix wrong identation. 2016-10-21 16:56:43 +08:00
YUHANG TANG 61e5054b63 cstool version 2 2016-10-21 16:56:00 +08:00
YUHANG TANG ad25742e89 cstool: version 2 could print all debug information for all arch. 2016-10-21 16:55:48 +08:00
YUHANG TANG 08da0c0533 cstool : print all debug information for all arch. 2016-10-21 16:55:28 +08:00
YUHANG TANG 9354e5e364 cstool: add x86 debug information 2016-10-21 16:55:09 +08:00
Nguyen Anh Quynh 130eb7ef94 cstool: compile with CMake using CMakeLists.txt in root dir 2016-10-11 23:24:44 +08:00
Nguyen Anh Quynh 7415467aee cstool: initialize i in preprocess(). this fixes compilation issue for MSVC 2016-10-11 16:56:20 +08:00
Nguyen Anh Quynh eb34f6e478 cstool: support CMake 2016-10-11 16:51:20 +08:00
Nguyen Anh Quynh bab2a93031 cstool: align assembly code for x86 2016-10-11 16:19:27 +08:00
Nguyen Anh Quynh fcd1b44a3f cstool: update README with more details 2016-10-11 00:21:20 +08:00
Nguyen Anh Quynh 5664998f4c cstool: compile for next branch 2016-10-11 00:04:46 +08:00
Nguyen Anh Quynh 6ccfcab154 cstool: make it compile with GCC on Linux 2016-10-11 00:03:19 +08:00
Nguyen Anh Quynh 797a637a86 cstool: fix Makefile 2016-10-11 00:02:08 +08:00
Nguyen Anh Quynh 815b94a452 cstool: add VERSION and reformat to use tabs for indentation 2016-10-11 00:01:57 +08:00
Nguyen Anh Quynh c2887082a2 cstool: fix Makefile 2016-10-11 00:01:46 +08:00
Nguyen Anh Quynh f36b3f426e cstool: compile/clean/install/uninstall from Makefile 2016-10-11 00:01:29 +08:00
echotyh 51c8c5082a cstool 1.0 (#788)
* first cstool -- Segmentation fault: 11

* Modify the format of output.

* Preprocess the input from user. The result of converting looks right but the disassembly is not unsatisfactory.

* Skip the character not in set A = {'a'~'f','A'~'F','0'~'9'}.
i Please enter the commit message for your changes. Lines starting

* delete cstool binary

* using isxdigit() to tests for any hexadecimal-digit character

* write README

* final version 1.0 for cstool
2016-10-10 23:54:25 +08:00