Commit Graph

113 Commits

Author SHA1 Message Date
naq
46c6aab052 x86: printf64m should print qword ptr by default. TODO: fix related cases in tablegen instead 2019-06-09 01:58:03 +08:00
naq
550a598058 cstest: add issue 1505 2019-06-09 01:06:09 +08:00
naq
9785281f7d cstest: fix issues.cs 2019-06-08 12:36:57 +08:00
ksherlock
05b3fbf2d7 updated 6502 support. (#1498)
* updated 6502 support. some improvements to the base 6502 support but also adds support for 65c02, w65c02, and 65816.

* add CS_OPT_SYNTAX_MOTOROLA.

This will use "$" as a hex prefix instead of "0x"

* remove excess blank lines
2019-06-03 23:20:51 +08:00
Nguyen Anh Quynh
a095f344ce ppc: mnemonic with dot postfix should update CR0. issue #1478 2019-05-17 11:50:11 +08:00
Nguyen Anh Quynh
72e70daeb7 ppc: add missing condition registers of BDNZT. fixes issue #970 2019-05-17 11:36:55 +08:00
Nguyen Anh Quynh
942e5eb8a1 ppc: fix bdnzflr operand 2 missing. issue #969 2019-05-17 09:56:03 +08:00
Nguyen Anh Quynh
832180d695 arm64: LDR operands[1] is memory operand. fix issue #1481 2019-05-16 21:29:51 +08:00
Nguyen Anh Quynh
e3edf79e7e ppc: BDZLA is absolute branch. fix issue #968 2019-05-16 11:06:24 +08:00
Nguyen Anh Quynh
1ede71254d cstest: add tests for xacquire/xrelease xchg 2019-05-14 10:59:07 +08:00
Nguyen Anh Quynh
eb25f46d6a x86: recognize xrelease lock 2019-05-14 09:59:23 +08:00
Nguyen Anh Quynh
d5dd80e979 x86: recognize xacquire prefix. issue #1477 2019-05-13 22:27:05 +08:00
Nguyen Anh Quynh
9e2912899a ppc: add JUMP group for some branch instructions 2019-05-11 11:52:43 +08:00
Nguyen Anh Quynh
7ce9c792b1 ppc: fix target address of bdnz. issue #1468 2019-05-11 10:18:36 +08:00
Nguyen Anh Quynh
c40e2fa375 ppc: fix target address for bdnzt 2019-05-10 14:38:51 +08:00
Nguyen Anh Quynh
0c31f14db1 ppc: print condition register bits. issue #1469 2019-05-08 13:56:40 +08:00
Nguyen Anh Quynh
ac63e2b80c ppc: add issue #1456 for B to issues.cs 2019-05-07 16:31:25 +08:00
Nguyen Anh Quynh
a27da62b0d x86: update tablegen to fix MOV CRx/DRx, TEST & LOCK prefix in #1456 & #1472 2019-05-06 17:28:37 +08:00
Nguyen Anh Quynh
49e383d4fd x86: handle MOV CRx/DRx & LOCK prefix in issues #1456 & #1472 2019-05-06 16:18:45 +08:00
Nguyen Anh Quynh
02e63faac5 x86: lock adc is valid. issue #1472 2019-05-06 12:44:09 +08:00
Nguyen Anh Quynh
a740af902b x86: fix xmmword ptr issue in #1456 (TODO: better fix) 2019-04-17 20:39:21 +08:00
Nguyen Anh Quynh
d7b4e936a6 cstest: Thub mode for pkhtb test 2019-04-17 01:51:17 +08:00
Nguyen Anh Quynh
931ee9d871 cstest: fix wfi.ww, wfe.ww, yield.ww & nop.ww in basic-thumb2-instructions.s.cs 2019-04-17 01:14:00 +08:00
Nguyen Anh Quynh
f9da22b59e cstest: add EIZ test in #1456 2019-04-16 23:39:52 +08:00
Nguyen Anh Quynh
40405afffe arm: alias LDR [sp], 4 to POP 2019-04-16 00:01:54 +08:00
Nguyen Anh Quynh
4dabe798b0 arm: fix the missing third operand of LSR - issue #1456 2019-04-15 07:47:04 +08:00
Nguyen Anh Quynh
063cf90a87 arm64: fix imm of MOV instruction. issue 1456 2019-04-12 23:33:49 +08:00
Nguyen Anh Quynh
58022575d7 x86: fix ATT syntax print immediate < 9 for MOV - issue #1456 2019-04-12 23:15:20 +08:00
Nguyen Anh Quynh
a16c74a14b cstest: add RCR issue to issues.cs 2019-04-12 00:41:43 +08:00
Nguyen Anh Quynh
071a970e8f cstest: add issue #1454 2019-04-11 01:32:14 +08:00
Nguyen Anh Quynh
77abf6a211 x86: fix BOUND instruction in issue #1456 2019-04-11 01:24:43 +08:00
Nguyen Anh Quynh
25b6704978 merge next-arm64 to next 2019-04-10 17:46:07 +08:00
Nguyen Anh Quynh
9d292268a9 arm64: sync with LLVM 7.0.1 2019-04-10 14:17:08 +08:00
Wolfgang Schwotzer
5607c03df9 M680X: Use same output style as other archs (#1439)
- Lowercase hex numbers.
- Use comma + space between instruction parameters.
2019-03-22 11:07:15 +08:00
Yudi Zheng
850f52e721 Add test cases related to issue #1211. (#1438) 2019-03-21 22:54:11 +08:00
Nguyen Anh Quynh
f09f9414cb cstest: temporarily disable issue 913 2019-03-16 17:11:39 +08:00
z
a012f75754 RISCV support ISRV32/ISRV64 (#1401)
* Added RISCV dir to contain the RISCV architecture engine code. Adding the TableGen files generated from llvm-tblgen. Add Disassembler.h

* Started working on RISCVDisassembler.c - RISCV_init(), RISCVDisassembler_getInstruction, and RISCV_getInstruction

* Added all functions to RISCVDisassembler.c and needed modifications to RISCVGenDisassemblerTables.inc. Add and modified RISCVGenSubtargetInfo.inc. Start creation of RISCVInstPrinter.h

* Finished RISCVGenAsmWriter.inc. Finished RISCVGenRegisterInfo.inc. Minor fixes to RISCVDisassembler.c. Working on RISCVInstPrinter

* Finished RISCVInstPrinter, RISCVMapping, RISCVBaseInfo, RISCVGenInstrInfo.inc, RISCVModule.c. Working on riscv.h

* Backport it from: 0db412ce3b

* All RISCV files added. Compiled correctly and initial test for ADD, ADDI, AND works properly.

* Add refactored cs.c for RISCV

* Testing all I instructions in test_riscv.c

* Modify the orignal backport for RISCVGenRegisterInfo.inc, capstone.h and test_iter to work w/ the current code strcuture

* Fix issue with RISCVGenRegisterInfo.inc - RISCVRegDesc[] (Excess elements in struct initializer). Added RISCV tests to test_iter.c

* fixed bug related to incorrect initialization of memory after malloc

* fix compile bug

* Fix compile errors.

* move riscv.h to include/capstone

* fix indentation issues

* fix coding style issues

* Fix indentation issues

* fix coding style

* Move variable declaration to the top of the block

* Fix coding indentation

* Move some stuff into RISCVMappingInsn.inc

* Fix code sytle

* remove cs_mode support for RISCV

* update asmwriter-inc to LLVM upstream

* update the .inc files to riscv upstream

* update riscv disassembler function for suport 16bit instructions

* update printer & tablegen inc files which have fixed arguments mismatch

* update headers and mapping source

* add riscv architecture specific test code

* fix all RISCV tons of compiler errors

* pass final tests

* add riscv tablegen patchs

* merge with upstream/next

* fix cstool missing riscv file

* fix root Makefile

* add new TableGen patchs for riscv

* fix cmakefile.txt of missing one riscv file

* fix declaration conflict

* fix incompatible declaration type

* change riscvc from arch to mode

* fix test_riscv warnning

* fix code style and add riscv part of test_basic

* add RISCV64 mode

* add suite for riscv

* crack fuzz test

* fix getfeaturebits test add riscvc

* fix test missing const qualifier warnning

* fix testcase type mismatch

* fix return value missing

* change getfeaturebits test

* add test cs files

* using a winder type contain the decode string

* fix a copy typo

* remove useless mode for riscv

* change cs file blank type

* add repo for update_riscv & fix cstool missing riscv mode

* fix typo

* add riscv for cstool useage

* add TableGen patch for riscv asmwriter

* clean ctags file

* remove black comment line

* fix fuzz related something

* fix missing RISCV string of fuzz

* update readme, etc..

* add riscv *.s.cs file

* add riscv *.s.cs file & clear ctags

* clear useless array declarations at capstone_test

* update to 5e4069f

* update readme change name more formal

* change position of riscv after bpf and modify copyright more uniform

* clear useless ctags file

* change blank with tab in riscv.h

* add riscv python bindings

* add riscv in __init__.py

* fix riscv define value for python binding

* fix test_riscv.py typo

* add missing riscvc in __init__.py of python bindings

* fix alias-insn printer bug, remove useless newline

* change inst print delimter from tab to bankspace for travis

* add riscv tablegen patch

* fix inst output more consistency

* add TableGen patch which fix inst output formal

* crack the effective address output for detail and change register print function

* fix not detail crash bug

* change item declaration position at cs_riscv

* update riscv.py

* change function name more meaningfull

* update python binding makefile

* fix register enum sequence according to riscvgenreginfo.inc

* test function name

* add enum s0/fp in riscv.h & update riscv_const.py

* add register name enum
2019-03-09 08:41:12 +08:00
Nguyen Anh Quynh
63396f8f95 cstest: build with local libcapstone 2019-03-08 13:24:36 +08:00
Đỗ Minh Tuấn
b2e1c0b986 normalize in issue mode (#1414)
* normalize tab character in cs

* normalize in issue mode
2019-03-03 19:10:55 +08:00
Đỗ Minh Tuấn
e4167260f0 normalize tab character in cs (#1413)
* normalize tab character in cs
2019-03-03 18:09:20 +08:00
Nguyen Anh Quynh
da152c7918 x86: add BND registers. this fixes OSS-fuzz issue 13467 2019-03-02 14:58:29 +08:00
Alexey Nurmukhametov
927772b13e cstest: add issue #1263 (#1407) 2019-03-01 18:08:21 +08:00
Nguyen Anh Quynh
5e870271e9 Merge branch 'next-x86' into next 2019-03-01 01:12:32 +08:00
Nguyen Anh Quynh
7d8d50d63f cstest: add 1 more test for #1335 2019-02-28 08:03:12 +08:00
Nguyen Anh Quynh
c13997b671 cstest: add issue #1335 2019-02-28 08:01:23 +08:00
Nguyen Anh Quynh
71e7ac9a27 cstest: add issue #1259 2019-02-28 07:57:58 +08:00
Nguyen Anh Quynh
9c71ceec0f x86: fix issue #1304 2019-02-26 22:16:39 +08:00
Đỗ Minh Tuấn
6bdc66c066 fix mode "c" in report_cstest (#1398)
* fix mode "c" in report_cstest
2019-02-26 21:45:48 +08:00
Nguyen Anh Quynh
5a99624074 sync with LLVM 7.0.1. X86 is first 2019-02-26 15:19:51 +08:00
Nguyen Anh Quynh
fe7b41f039 cstest: add issue #1129 2019-02-19 10:49:07 +08:00