Commit Graph

143 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 20159a3abb suite/capstone_get_setup.c: add MOS65XX support 2019-01-09 18:31:17 +08:00
Nguyen Anh Quynh 2c340106cf add suite/capstone_get_setup.c to retrive Capstone build setup. see #1326 2019-01-09 13:49:21 +08:00
Catena cyber b8c20f47a8 MOS65XX fuzzing (#1307) 2018-12-18 09:24:10 +08:00
Catena cyber 3a0467cfea 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 a69f7880a8 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 970df19f6e Avoids memory leak with fuzz driver (#1233) 2018-08-27 07:57:27 +07:00
Nguyen Anh Quynh afffa5d741 merge next to master 2018-07-20 12:36:50 +08:00
Catena cyber bcb1247b10 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 b8c7cd8943 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 04a6d4022c Adds a size limit for inputs to fuzz target (#1167) 2018-06-07 01:40:47 +08:00
Catena cyber 81098c5dfc Fuzz next branch (#1152) 2018-06-01 22:30:53 +08:00
Catena cyber 5315c5b785 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 170904d5f1 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 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
semihalf-oleksy-michalina 85960f9edd 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 f49df92f14 suite: add disasm_mc.{py,sh} 2017-05-16 18:15:02 +07:00
Ruslan Kabatsayev 2eda2a6f3d 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 972a6a67f3
added regression test for issue #702 2016-12-16 18:43:51 +01:00
mrexodia d9f96e7b14 fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 23:30:24 +07:00
mrexodia 1e9efd8581
fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 15:58:05 +02:00
Nguyen Anh Quynh 84c14d177b fix merging conflict 2016-05-22 08:58:33 +08:00
tandasat 45e5eab646 port Windows driver support 2016-05-11 21:48:32 -07:00
Zach Riggle 5cb3fe320e Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Nguyen Anh Quynh b158b93a7d remove myinttypes.h 2016-04-26 09:47:30 +08:00
Nguyen Anh Quynh db0554cfd2 suite: add regress/ 2016-03-10 12:37:25 +08:00
Nguyen Anh Quynh d17fc90767 fix a MSVC 2015 warning 2016-03-08 11:38:00 +08:00
Nguyen Anh Quynh 568718bcab fix the last fix 2016-03-08 11:11:20 +08:00
Nguyen Anh Quynh 918215d7ef fix some MSVC warnings 2016-03-08 11:08:20 +08:00
practicalswift 71f8319cf6 Add Makefile to suite/regress/ directory. 2015-11-18 21:36:39 +01:00
practicalswift d3a0143bab 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 5e94dbabb5 fix an warning in test_iter_benchmark.c 2015-09-30 10:51:22 +08:00
bughoho e742835052 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 24341dcd5a 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 21454c0489 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 50d120530d 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 d8d11edd43 suite: move fuzz_hardness.c to suite/fuzz/ 2015-06-16 17:32:03 +08:00
Nguyen Anh Quynh 6aaa08a48d suite: add python_capstone_setup.py 2015-06-07 15:55:05 +08:00