Commit Graph

327 Commits

Author SHA1 Message Date
Nguyen Anh Quynh
ee8ddb630f cstest: README 2019-02-12 00:10:54 +08:00
hardtobelieve
7b10f56c02 fix offset 2019-02-11 03:12:08 -08:00
hardtobelieve
360b8f0b99 report.py: print details/general informations 2019-02-11 02:48:53 -08:00
hardtobelieve
bc6f24b52a Merge branch 'master' of https://github.com/HarDToBelieve/capstone 2019-02-10 03:41:40 -08:00
hardtobelieve
cb0bf48e7d fix usage 2019-02-10 03:41:24 -08:00
Đỗ Minh Tuấn
0a337034f9 Update README.md 2019-02-10 18:01:19 +07:00
hardtobelieve
b51ff1d02b fix README 2019-02-10 02:59:48 -08:00
hardtobelieve
faae6fc903 fix getopt warning 2019-02-10 02:54:58 -08:00
hardtobelieve
8ea2417bf3 fix issue 2019-02-10 02:48:43 -08:00
hardtobelieve
c8a696302b done fix 2019-02-09 22:41:56 -08:00
hardtobelieve
48032d773b fixing 2019-02-09 22:38:02 -08:00
hardtobelieve
48410eeb11 fix detail 2019-02-09 20:27:20 -08:00
hardtobelieve
656b16a811 fixing 2019-02-09 20:06:20 -08:00
hardtobelieve
0626c30797 fix Makefile 2019-02-09 07:23:44 -08:00
hardtobelieve
3124556c09 re-construct project 2019-02-09 06:52:38 -08:00
hardtobelieve
d0b839e2c2 Merge remote-tracking branch 'upstream/master' 2019-02-08 20:58:11 -08:00
hardtobelieve
27a80547c5 Done test system 2019-02-08 20:51:55 -08:00
hardtobelieve
fdd7411666 done 2019-02-07 08:40:41 -08:00
Catena cyber
1d62f11544 Fuzzing the new architectures (#1371)
Using only flags from capstone.h
2019-02-07 08:52:14 +08:00
Catena cyber
ff1c0e145b Bash logical or for travis failure (#1364)
* Bash logical or for travis failure

* Still return false after printing last line of log

* Flushing stdout after rinting file name
2019-02-04 17:07:03 +08:00
Catena cyber
61b7e60d9c Outputs in travis the offending case from corpus (#1363) 2019-02-03 22:34:35 +08:00
Nguyen Anh Quynh
ed618f8e8c suite/fuzz/fuzz_disasm.c: prototype for LLVMFuzzerTestOneInput() 2019-02-03 15:11:29 +08:00
Nguyen Anh Quynh
9b2e973d83 suite/fuzz/fuzz_disasm.c: make platform.comment const char * to fix compiler warning on discards qualifiers 2019-02-03 15:11:13 +08:00
Nguyen Anh Quynh
7da45ef5ab suite/fuzz/fuzz_disasm.c: prototype for LLVMFuzzerTestOneInput() 2019-02-03 15:02:10 +08:00
Nguyen Anh Quynh
5c0e4d71cb suite/fuzz/fuzz_disasm.c: make platform.comment const char * to fix compiler warning on discards qualifiers 2019-02-03 14:55:38 +08:00
Catena cyber
064ae66bf4 Fuzzing new wasm architecture (#1360) 2019-02-02 07:22:16 +08:00
Spike
55f242d498 Add webassembly arch (#1359)
* add wasm arch

* fix bug

* delete todo & add wasm into readme
2019-02-01 23:03:47 +08:00
Tuan
27ffc7aca9 fixing 2019-02-01 16:48:33 +07:00
Tuan
4497c07915 Merge remote-tracking branch 'upstream/master' 2019-02-01 15:27:20 +07:00
HarDToBelieve
fd462e3956 updating issue dispatcher 2019-01-31 23:20:10 +07:00
HarDToBelieve
4a802bc5b2 test suite 2019-01-25 09:54:11 +07:00
Nguyen Anh Quynh
04ecd4829b suite/capstone_get_setup.c: add MOS65XX support 2019-01-09 18:32:34 +08:00
Nguyen Anh Quynh
827fc30e7f suite/capstone_get_setup.c: add MOS65XX support 2019-01-09 18:31:17 +08:00
Nguyen Anh Quynh
3d38617f89 add suite/capstone_get_setup.c to retrive Capstone build setup. see #1326 2019-01-09 13:49:21 +08:00
Nguyen Anh Quynh
8597ab29af add suite/capstone_get_setup.c to retrive Capstone build setup. see #1326 2019-01-09 13:49:03 +08:00
Nguyen Anh Quynh
21cec81052 add suite/capstone_get_setup.c to retrive Capstone build setup. see #1326 2019-01-09 13:45:29 +08:00
Catena cyber
0027a27f89 MOS65XX fuzzing (#1307) 2018-12-18 09:24:10 +08:00
Catena cyber
5a671cd756 Use whole corpus for regression testing (#1302)
* Use whole corpus for regression testing

* differetial fuzzing against llvm-mc

* Download corpus from another repo
2018-12-11 09:33:31 +07:00
Catena cyber
8ffcff1114 Continuous integration for fuzzing (#1297)
* Continuous integration for fuzzing

* Simplify fuzz testing output

* Makefile for suite fuzz

* fixup

* Code review taken into acount

* More readable fuzz harness

Inputs specify only on first line the mode
2018-12-04 15:02:16 +07:00
Catena cyber
26aae877dc Avoids memory leak with fuzz driver (#1233) 2018-08-27 07:57:27 +07:00
Nguyen Anh Quynh
76c1c3c4e9 merge next to master 2018-07-20 12:36:50 +08:00
Catena cyber
b22f425799 Builds a test corpus for fuzzing (#1184)
* Limit size of inputs for fuzz targets

* Build a test corpus for fuzzing
2018-06-19 09:31:50 +08:00
Catena cyber
d2e82d0c44 Builds a test corpus for fuzzing (#1174)
Modifies the list of architectures and modes fuzzed
2018-06-13 22:58:40 +01:00
Catena cyber
41da47b213 Adds a size limit for inputs to fuzz target (#1167) 2018-06-07 01:40:47 +08:00
Catena cyber
e42083410b Fuzz next branch (#1152) 2018-06-01 22:30:53 +08:00
Catena cyber
883b2042bf Integrate capstone with oss-fuzz (#1150)
Compile the fuzz target with the rest of the tests
2018-06-01 20:47:19 +08:00
Catena cyber
61b6ce5fad Integrate capstone with oss-fuzz (#1150)
Compile the fuzz target with the rest of the tests
2018-06-01 20:46:20 +08:00
Wolfgang Schwotzer
e8d1f1d4d2 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
semihalf-oleksy-michalina
de6666c531 arm64: handling of system registers added in ARMv8.1/2 (#960)
* arm64: handling of system registers added in ARMv8.2

This commit adds handling of system registers added in ARMv8.2.
Those registers are accessed by mrs and msr instructions.
Changes based on https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, chapters D7.2-5.

List of added registers:
id_mmfr4_el1
id_aa64mmfr2_el1
sctlr_el12
cpacr_el12
ttbr0_el12
ttbr1_el12
ttbr1_el2
tcr_el12
spsr_el12
elr_el12
afsr0_el12
afsr1_el12
esr_el12
far_el12
mair_el12
amair_el12
vbar_el12
cntkctl_el12
cnthv_ctl_el2
cnthv_cval_el2
cnthv_tval_el2
cntp_tval_el02
cntp_cval_el02
cntv_ctl_el02
ntv_cval_el02
cntv_tval_el02
lorid_el1
lorc_el1
lorea_el1
lorn_el1
lorsa_el1
contextidr_el12

sign-of: Michalina Oleksy (https://github.com/layika)

* arm64: handling of system registers added in ARMv8.1/2

v8.1:
PAN (https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, page 358)
PAN (as pstate field)
contextdir_el2

v8.2:
UAO (https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, page 403)
UAO (as pstate field)

* arm64: handling of system registers for statistical profiling

Added handling of system registers for statistical profiling extension based on https://static.docs.arm.com/ddi0586/a/DDI0586A_Statistical_Profiling_Extension.pdf

* Update AArch64BaseInfo.h

* arm64: An attempt to fix indentation
2017-07-29 18:27:32 +08:00
Nguyen Anh Quynh
58c7e68ee5 suite: add disasm_mc.{py,sh} 2017-05-16 18:15:02 +07:00
Ruslan Kabatsayev
6c002ed998 Test suite update (#926)
* Add 66-prefixed versions of GDT/IDT-related instructions to tests

* Make tests suite for string instructions complete, i.e. have all the combinations of prefixes
2017-05-12 07:05:11 +07:00
mrexodia
9e478e56ab added regression test for issue #702 2016-12-16 18:43:51 +01:00
mrexodia
7a0b6374fe fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 23:30:24 +07:00
mrexodia
b3e1f351cc fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 15:58:05 +02:00
Nguyen Anh Quynh
e3f94ac4ab fix merging conflict 2016-05-22 08:58:33 +08:00
tandasat
d4ef430b33 port Windows driver support 2016-05-11 21:48:32 -07:00
Zach Riggle
1b3f07ad12 Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Nguyen Anh Quynh
3f461adae3 remove myinttypes.h 2016-04-26 09:47:30 +08:00
Nguyen Anh Quynh
8d48487df3 suite: add regress/ 2016-03-10 12:37:25 +08:00
Nguyen Anh Quynh
6b3a1f4e7d fix a MSVC 2015 warning 2016-03-08 11:38:00 +08:00
Nguyen Anh Quynh
7654a68fa2 fix the last fix 2016-03-08 11:11:20 +08:00
Nguyen Anh Quynh
017267e0ea fix some MSVC warnings 2016-03-08 11:08:20 +08:00
practicalswift
cdc8d5e4de Add Makefile to suite/regress/ directory. 2015-11-18 21:36:39 +01:00
practicalswift
beb585960d Add crash case: "Invalid read of size 4" in printOperand(…) 2015-11-17 23:44:29 +01:00
Daniel Collin
2ee675c10a This adds M68K support to Capstone 2015-10-02 20:47:00 +02:00
Nguyen Anh Quynh
caf8ddaae8 fix conflicts 2015-09-30 11:07:22 +08:00
bughoho
fe19541d7e test cs_disasm_iter benchmark 2015-09-30 11:05:41 +08:00
Nguyen Anh Quynh
fee75fc3b9 fix an warning in test_iter_benchmark.c 2015-09-30 10:51:22 +08:00
bughoho
570f13d3a9 test cs_disasm_iter benchmark 2015-09-29 15:07:48 +08:00
Nguyen Anh Quynh
4337a77064 x86: fix issue #470 & #471 reported by Ruslan Kabatsayev 2015-09-08 22:14:35 +08:00
Ruslan Kabatsayev
f86a8d58cc Add GDT/IDT handling instructions to tests 2015-09-08 16:06:48 +03:00
Nguyen Anh Quynh
850dcdb539 suite: add verbose output mode to regress.py 2015-08-24 20:53:43 +08:00
Nguyen Anh Quynh
87b71edf4d suite: add verbose output mode to regress.py 2015-08-24 20:53:26 +08:00
Ruslan Kabatsayev
53181677f5 Add tests for x86 string instructions 2015-08-24 20:34:59 +08:00
Ruslan Kabatsayev
47fa5972f9 Add tests for x86 string instructions 2015-08-23 19:50:52 +03:00
Nguyen Anh Quynh
343a98d8a4 suite: add regress.py 2015-08-19 09:35:27 +08:00
Nguyen Anh Quynh
46e7a68428 suite: add regress.py 2015-08-19 09:34:33 +08:00
learn_more
07a7f6c8aa Add missing const for arm64
update suite/test_group_name
2015-08-02 14:21:55 +02:00
Nguyen Anh Quynh
fec23ae531 fix autogen_x86imm.py to handle some special instructions. this fixed issue #411 reported by @pancake 2015-06-30 20:49:55 +08:00
Nguyen Anh Quynh
de6fa911b5 skip _LOCK_ instructions for augoten_x86.imm.py 2015-06-28 13:14:36 +08:00
Nguyen Anh Quynh
de8dd26780 x86: handle operand size properly for immediate operands 2015-06-28 12:18:13 +08:00
Nguyen Anh Quynh
7bb3508ccb suite: move fuzz_hardness.c to suite/fuzz/ 2015-06-16 17:37:48 +08:00
Nguyen Anh Quynh
0dbf1b9636 suite: move fuzz_hardness.c to suite/fuzz/ 2015-06-16 17:32:03 +08:00
Nguyen Anh Quynh
7574ed9802 suite: add python_capstone_setup.py 2015-06-07 15:55:05 +08:00
Nguyen Anh Quynh
67304f36a3 suite: add python_capstone_setup.py 2015-05-10 10:23:27 +08:00
Nguyen Anh Quynh
5a6007b0f1 suite: correct authors of patch_major_os_version.py 2015-05-06 10:40:20 +08:00
Nguyen Tan Cong
fd1af772e2 add script to MajorOperatingSystemVersion and MajorSubsystemVersion in PE header from 6 to 5 2015-05-06 10:40:10 +08:00
Nguyen Anh Quynh
e23ac8f4fb suite: correct authors of patch_major_os_version.py 2015-05-06 10:39:28 +08:00
Nguyen Tan Cong
dc384ad139 add script to MajorOperatingSystemVersion and MajorSubsystemVersion in PE header from 6 to 5 2015-05-06 07:53:04 +07:00
learn_more
3e915db782 give reg_name, insn_name, group_name a customizable default instead of returning something else for id 0
remove the check for self._raw.id on reg_name and group_name (in CsInsn, since the to_name functions don't operate on the current instruction)
Add reg_name, insn_name and group_name to Cs.
update test_group_name.py with the new api.
2015-04-28 19:29:51 +02:00
learn_more
a1a3132d31 add new group names from next to the test. 2015-04-28 19:25:55 +02:00
Nguyen Anh Quynh
1182d25759 simplify ARCH_group_name() by using lookup table as suggested by @learn_more. also added the missing group name for GRP_PRIVILEGE 2015-04-27 12:13:34 +08:00
Nguyen Anh Quynh
0924747508 suite: better support for Python3 for test_group_name.py 2015-04-26 17:00:51 +08:00
Nguyen Anh Quynh
2f263f58d8 suite: better support for Python3 for test_group_name.py 2015-04-26 16:59:11 +08:00
learn_more
653696e287 Validate group names against a hardcoded list per arch.
Also test out-of range values (by overshooting the current max for all arches).

This relies on a small hack (directly importing the ctypes from capstone), because the Cs object does not expose the cs_group_name function directly.
2015-04-26 16:49:04 +08:00
learn_more
1ebc5e3f40 Validate group names against a hardcoded list per arch.
Also test out-of range values (by overshooting the current max for all arches).

This relies on a small hack (directly importing the ctypes from capstone), because the Cs object does not expose the cs_group_name function directly.
2015-04-25 18:04:37 +02:00
learn_more
04f9c32eb4 use the correct include location 2015-04-21 19:27:42 +02:00
Cr4sh
19ee2d10b3 inttypes.h fix 2015-03-29 21:16:38 +08:00
Cr4sh
9d60607645 inttypes.h fix 2015-03-29 18:29:06 +08:00
Nguyen Anh Quynh
967e98786a suite: fix a MSVC warning 2015-02-25 18:12:10 +08:00
Nguyen Anh Quynh
78f9a678af suite: fix a MSVC warning 2015-02-25 18:12:02 +08:00
Nguyen Anh Quynh
4b68d9505e arm: fix some warnings reported by MSVC 2015-02-25 18:02:19 +08:00
Nguyen Anh Quynh
b756aed7b2 arm: fix some warnings reported by MSVC 2015-02-25 18:01:55 +08:00
Nguyen Anh Quynh
ea39692786 suite: fix an compilation warning reported by MSVC on test_arm_regression.c 2015-01-13 14:43:37 +08:00
Nguyen Anh Quynh
9a1238d353 suite: fix an compilation warning reported by MSVC on test_arm_regression.c 2015-01-13 14:21:15 +08:00
Nguyen Anh Quynh
499f0ca7cb suite: add some tools to verify X86 machine code 2015-01-06 13:11:04 +07:00
Nguyen Anh Quynh
d83c8c7d44 suite: change CS_MODE_32 -> CS_MODE_MIPS32, CS_MODE_64 -> CS_MODE_MIPS64 for fuzz.py & benchmark.py 2014-11-17 17:38:18 +08:00
Nguyen Anh Quynh
57a902d045 suite: add crc32 instruction to x86odd.py 2014-11-16 19:48:41 +08:00
Nguyen Anh Quynh
b0082295a1 suite: add some tricky x86 code to x86odd.py 2014-11-16 19:08:25 +08:00
Nguyen Anh Quynh
02cafeb8bd suite: update Mips modes of MC input to CS_MODE_MIPS32 & CS_MODE_MIPS64 2014-11-13 12:46:48 +08:00
Nguyen Anh Quynh
952da90e5b suite: add missing tests to test_c.sh 2014-11-13 11:39:58 +08:00
Nguyen Anh Quynh
435b9137bf suite: delete duplicate MC input in ppc64-encoding-bookIII.s.cs 2014-11-11 13:56:37 +08:00
Nguyen Anh Quynh
4c36374e2d suite: normalize PPC's branch instructions having immediate operand 2014-11-11 12:51:57 +08:00
Nguyen Anh Quynh
df7dde26c9 suite: update test_mc.py to better handle output of different formats of MC & CS 2014-11-10 21:50:54 +08:00
Nguyen Anh Quynh
6999d22892 suite: fix inputs in MC/ 2014-11-10 21:49:53 +08:00
Nguyen Anh Quynh
d5e63414b1 suite: indentation for test_mc.py 2014-11-08 14:01:18 +08:00
Nguyen Anh Quynh
9025e92fe2 suite: cleaning up test_mc.py 2014-11-07 17:28:39 +08:00
Nguyen Anh Quynh
8ba7250a14 suite: add testsuite tool 'test_mc.sh' to compare output of Capstone & LLVM 2014-11-07 17:24:01 +08:00
Nguyen Anh Quynh
278afa3380 suite: delete a broken MC input in intel-syntax-encoding.s.cs 2014-11-07 16:37:17 +08:00
Nguyen Anh Quynh
9c9ca1290c suite: add missing arch in heading info for micromips-alu-instructions-EB.s.cs 2014-11-07 16:14:58 +08:00
Nguyen Anh Quynh
4016695162 suite: fix MC test for 'prefetch' in 3DNow.s.cs 2014-11-07 12:27:31 +08:00
Nguyen Anh Quynh
90d42bced8 suite: add decoding info for 3DNow.s.cs 2014-11-06 15:28:50 +08:00
Nguyen Anh Quynh
c352897bac suite: more tests added to x86odd.py 2014-11-04 11:04:32 +08:00
Nguyen Anh Quynh
ff7bba3d6d x86: print out immediate as positive number for logic arithmetic operations: AND, OR, XOR. only works for x86 Intel syntax so far. issue reported by Pancake 2014-11-03 16:32:06 +08:00
Nguyen Anh Quynh
b87f855281 x86: print negative number in memory reference address (more friendly). issue reported by @pancake 2014-11-02 23:38:35 +08:00
Nguyen Anh Quynh
ed0fbce85e suite: more test for memref (x86) 2014-11-02 23:32:39 +08:00
Nguyen Anh Quynh
668b96c0b9 suite: make x86odd.py to test ATT syntax & some memref code 2014-11-02 23:15:18 +08:00
Nguyen Anh Quynh
ad449b59cb suite: compile test_arm_regression.c with proper include & change cs_disasm_ex() to cs_disasm() 2014-10-24 00:36:48 +08:00
flyingsymbols
d91f964d40 * Fixed bug in Thumb2 pop caused by me incorrectly assuming that
ARM_SP == 13, ARM_LR == 14, and ARM_PC == 15, which is not the case
* updated CMakeLists to include building arm regression test
* added explicit casts for 64 bit visual studio 2012 build to get around
  truncation warnings from size_t conversion
2014-10-23 12:04:23 -04:00
Jay Oster
79e253c516 Remove CS_MODE_N64
- This mode is for the so-called MIPS "N64" ABI; it has nothing to do with the Nintendo 64 game platform.
- N64, O64, et al. are just different ABIs for the 64-bit MIPS architecture, so we replace CS_MODE_N64 with the existing CS_MODE_64
2014-10-12 16:03:12 -07:00
Nguyen Anh Quynh
147035ed62 suite: chmod +x ppcbranch.py 2014-10-01 18:17:37 +08:00
kratolp
a3f0aef79a PPC: Fix absolute/relative offset for branch instruction
PPC: Fix non handling of bc instruction that uses the CTR
2014-10-01 11:39:15 +02:00
kratolp
39a65299bd Add ppc branch test suite 2014-09-29 10:59:42 +02:00
Nguyen Anh Quynh
0b702b892d suite: add input files for systematic testing assembly instructions across all archs (MC) 2014-09-29 15:28:34 +08:00
Yegor Derevenets
ced9d24e35 Workaround missing <inttypes.h> on MSVC 2010 2014-09-21 17:27:11 +02:00
Nguyen Anh Quynh
3edc30d61b suite: correct author of test_arm_regression.c 2014-08-15 13:53:03 +08:00
Nguyen Anh Quynh
26dfbc6677 fix indentation introduced by the latest merge. also move test_arm_regression.c into suite/arm/ and add Makefile for it 2014-07-31 18:24:51 +08:00
flyingsymbols
298d413bbc * added a test file to suite for testing invalid and valid instruction sequences
* fixed and added a test for a thumb-2 invalid sequence that was incorrectly allowed before these changes (pop.w with sp argument included)
* fixed and added a test for a blx from thumb to ARM that had its immediate argument incorrect (misaligned)

* eliminated some warnings by explicitly casting so I could turn on
  treat warnings as errors locally

General notes:
*  probably worth turning on treat all warnings as errors in the msvc project files, had a subtle bug that resulted from a missing declaration causing differences in dll and static compilation modes

( code was working incorrectly in dll form because of missing declaration in arch/ARM/ARMMapping.h for new function ARM_blx_to_arm_mode. Something about the linking was confusing ld when making the dll, and the resulting offsets were wonky (e.g. the added ble test would show up as #0x1fc instead of #0x1fe like it should have )

* the invalid pop was being treated as a soft fail which then gets coerced
  to a success because it is != MCDisassembler_Fail in Thumb_getInstruction
  what are the semantics of a soft fail? Maybe we should be able to set up
  whether or not we want a soft fail to be a real fail in the csh struct?
2014-07-15 04:33:40 -04:00
Nguyen Anh Quynh
7ae389ede8 suite: support XCore in fuzz.py 2014-06-17 18:17:59 +08:00
Nguyen Anh Quynh
6a5cc570cc suite: support XCore in benchmark.py 2014-06-17 18:17:26 +08:00
Nguyen Anh Quynh
191c070cac suite: update x86odd.py 2014-04-24 22:50:54 +08:00
Nguyen Anh Quynh
d71106047d suite: add some new instructions to x86odd.py 2014-04-23 12:40:58 +08:00
Nguyen Anh Quynh
4cc304096c suite: add 'hint nop' instruction to x86odd.py 2014-04-22 19:59:20 +08:00
Nguyen Anh Quynh
33e16362d6 x86: support 0x82 opcode for Arithmetic instructions 2014-04-20 11:32:00 +08:00
Nguyen Anh Quynh
4171e487cb suite: make x86odd support python3 2014-04-16 20:44:10 +08:00
Nguyen Anh Quynh
a6519b08eb suite: add x86odd.py 2014-04-16 20:03:55 +08:00
Nguyen Anh Quynh
61aaabbba0 suite: add SystemZ support to benchmark.py & fuzz.py 2014-03-23 22:56:38 +08:00
Nguyen Anh Quynh
61b7a722c1 suite: add Sparc support 2014-03-10 15:44:48 +08:00
Nguyen Anh Quynh
0586a74bdd suite: minor fix for fuzz.py 2014-03-04 16:27:23 +08:00
Nguyen Anh Quynh
d9ee9b114f suite: more throughout fuzzing 2014-03-04 15:32:28 +08:00
Nguyen Anh Quynh
1cf70fe174 suite: minor fixes for fuzz.py 2014-03-04 14:23:41 +08:00
Nguyen Anh Quynh
3a614830f5 suite: add comments for fuzz.py 2014-03-04 12:41:01 +08:00
Nguyen Anh Quynh
07ceab8560 suite: update README for fuzz.py 2014-03-04 12:32:05 +08:00
Nguyen Anh Quynh
5feee401ca suite: fix usage instructions for fuzz.py 2014-03-04 12:26:51 +08:00
Nguyen Anh Quynh
301e831e13 suite: add fuzz.py tool 2014-03-04 12:20:25 +08:00
Nguyen Anh Quynh
07b2037816 suite: cosmetic fixes for benchmark.py 2014-03-04 12:19:49 +08:00
Nguyen Anh Quynh
1ad3723214 suite: remove some irrelevant comments in benchmark.py 2014-02-20 23:39:27 +08:00
Nguyen Anh Quynh
d53c1651a0 python: implement disasm_lite() method which only return tuples of some critical info. this improves performance by 15% 2014-02-20 12:10:52 +08:00
Nguyen Anh Quynh
321163bf34 suite: turn off detail for benchmark.py 2014-02-19 10:51:10 +08:00
Nguyen Anh Quynh
94020d8478 x86: fix the issue with prefix instruction declared in 2.0's RELEASE_NOTES 2014-01-25 14:22:15 +08:00
Nguyen Anh Quynh
9389947d0d x86: fix a mem leaking issue in X86_insn_combine() 2014-01-25 13:58:58 +08:00
Nguyen Anh Quynh
11b05193ec reset prev_prefix at the entry of cs_disasm_ex(). this fixes a nasty segfault bug 2014-01-22 11:06:34 +08:00
Nguyen Anh Quynh
9162aa1756 suite: cleanup benchmark.py 2014-01-22 11:06:22 +08:00
Nguyen Anh Quynh
66c8d5d7fc suite: add test_all.sh 2014-01-21 12:02:30 +08:00
Nguyen Anh Quynh
d80cede9a3 last change to support BSD broke cross-comple. fix Makefile so cross-compile work again 2014-01-16 21:07:59 +08:00
Nguyen Anh Quynh
d8029aed83 suite: make all tests consistenly run from inside suite/ 2014-01-15 12:44:12 +08:00
Nguyen Anh Quynh
f48a879e31 suite: benchmark.py can benchmark specific archs, rather than all archs like before 2014-01-13 16:25:36 +08:00
Nguyen Anh Quynh
783e6c006c suite: benchmark.py now exercises all archs 2014-01-13 15:55:12 +08:00
Nguyen Anh Quynh
ff93d75879 suite: excercise benchmark.py 5 times more 2014-01-13 15:10:42 +08:00
Nguyen Anh Quynh
34474f8989 suite: benchmark.py get disasm code from binary file (python itself) rather than randomize data - this stablizes results, and can be compared with other bindings 2014-01-13 14:49:55 +08:00
Nguyen Anh Quynh
3079ed61cb suite: cleaning benchmark.py 2014-01-09 08:20:38 +08:00
Nguyen Anh Quynh
79654d11c7 suite: add test_ppc and some other minor changes 2014-01-08 10:36:59 +08:00
Nguyen Anh Quynh
2258f0948c suite: chmod+x compile_all.sh 2014-01-08 10:00:48 +08:00
Nguyen Anh Quynh
ea807fba62 suite: add compile_all.sh. by Daniel Godas-Lopez 2014-01-08 08:54:26 +08:00
Nguyen Anh Quynh
52b1754f94 suite: add README 2014-01-07 22:29:26 +08:00
Nguyen Anh Quynh
7fcf723526 add some test tools into suite/ 2014-01-07 21:54:55 +08:00
Nguyen Anh Quynh
6d50dc3c26 add benchmark.py 2014-01-07 11:32:40 +08:00