340 Commits

Author SHA1 Message Date
Nguyen Anh Quynh
b471e50c74 x86: fix testcase of MOVSD 2020-05-07 21:51:54 +08:00
Richard Henderson
936dca0e2d Constify backends (#1549)
* Constify registerinfo.py output

Remove two conditionals separating identical bits of code.
Add "const" markup to MCRegisterDesc and MCRegisterClass.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify instrinfo-arch.py output

In this case, do not actively strip const.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the AArch64 backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the EVM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify M680X backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify M68K backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the Mips backend

The Mips backend has not been regenerated from LLVM recently,
and there are more fixups required than I'd like.  Just apply
the fixes to the tables by hand for now.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the Sparc backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the TMS320C64x backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the X86 backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the XCore backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify systemregister.py output

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the ARM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the PowerPC backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the MOS65XX backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the SystemZ backend

The mapping of system register to indexes is easy to
generate read-only.  Since we know the indexes are
between 0 and 31, use uint8_t instead of unsigned.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the WASM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify cs.c

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the BPF backend

Signed-off-by: Richard Henderson <rth@twiddle.net>
2019-12-23 20:30:57 +08:00
Vemake
b78a640364 Fixed 47 missing dependencies and 51 excessive dependencies in Makefile (#1522)
* Fix Excessive and Missing Dependencies found by Vemake

* Remove extra spaces at the end of Makefile

* Remove used macro df

* Change "-rf" to "-f" in tests/Makefile

* Change "-rf" to "-f" in suite/fuzz/Makefile

* Remove 'r' from the removal command.

* Remove an extra blank line.
2019-07-29 14:15:05 +08:00
Catena cyber
ba97425584 Fuzzit integration (#1520) 2019-07-25 09:06:52 +08:00
Catena cyber
9c07326388 Updates files from LLVM for PPC64 (#1510)
* Updates files from LLVM for PPC64

* Only fix tbegin, tabort and such
2019-07-01 10:35:02 +08:00
naq
c602427ca3 cstest: fix xmmword ptr case in intel-syntax-encoding.s.cs 2019-06-09 02:05:31 +08:00
naq
2c015c75b3 x86: printf64m should print qword ptr by default. TODO: fix related cases in tablegen instead 2019-06-09 01:58:03 +08:00
naq
1f823126b2 cstest: add issue 1505 2019-06-09 01:06:09 +08:00
naq
99837f0572 cstest: fix issues.cs 2019-06-08 12:36:57 +08:00
ksherlock
41e5f629ce 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
d169f3fff5 ppc: mnemonic with dot postfix should update CR0. issue #1478 2019-05-17 11:50:11 +08:00
Nguyen Anh Quynh
afc8550d2a ppc: add missing condition registers of BDNZT. fixes issue #970 2019-05-17 11:36:55 +08:00
Nguyen Anh Quynh
cf6d808274 ppc: fix bdnzflr operand 2 missing. issue #969 2019-05-17 09:56:03 +08:00
Nguyen Anh Quynh
94aa224272 arm64: LDR operands[1] is memory operand. fix issue #1481 2019-05-16 21:29:51 +08:00
Nguyen Anh Quynh
baf70c9755 ppc: BDZLA is absolute branch. fix issue #968 2019-05-16 11:06:24 +08:00
Nguyen Anh Quynh
c12f4e4118 cstest: add tests for xacquire/xrelease xchg 2019-05-14 10:59:07 +08:00
Nguyen Anh Quynh
f3ca9a28b9 x86: recognize xrelease lock 2019-05-14 09:59:23 +08:00
Nguyen Anh Quynh
a1796341cb x86: recognize xacquire prefix. issue #1477 2019-05-13 22:27:05 +08:00
Nguyen Anh Quynh
709aba4789 ppc: add JUMP group for some branch instructions 2019-05-11 11:52:43 +08:00
Nguyen Anh Quynh
287987a8a1 ppc: fix target address of bdnz. issue #1468 2019-05-11 10:18:36 +08:00
Nguyen Anh Quynh
991c0c25bb synctools: udpate somes scripts 2019-05-10 16:51:23 +08:00
Nguyen Anh Quynh
946d55b781 synctools: fix genall-arch.sh for Arm & Arm64 2019-05-10 16:39:36 +08:00
Nguyen Anh Quynh
bb6b2c137e ppc: fix target address for bdnzt 2019-05-10 14:38:51 +08:00
Nguyen Anh Quynh
735d20db06 cstest: do not use CS_OPT_SYNTAX_NOREGNAME in ppc64-encoding.s.cs 2019-05-09 00:39:37 +08:00
Nguyen Anh Quynh
40cec60f5f ppc: fix suite/MC/PowerPC/ppc64-encoding.s.cs 2019-05-08 14:38:11 +08:00
Nguyen Anh Quynh
2a9e171e3c ppc: print condition register bits. issue #1469 2019-05-08 13:56:40 +08:00
Nguyen Anh Quynh
73eaa79974 Merge branch 'next' of github.com:aquynh/capstone into next 2019-05-07 16:31:48 +08:00
Nguyen Anh Quynh
d650028a63 ppc: add issue #1456 for B to issues.cs 2019-05-07 16:31:25 +08:00
Catena cyber
028054c569 Right endianness for ppc platforms (#1473)
* Right endianness for ppc platforms

* Right mode CS_MODE_64 for ppc
2019-05-07 15:12:23 +07:00
Nguyen Anh Quynh
2888e50d45 add suite/synctools 2019-05-07 12:26:19 +08:00
Nguyen Anh Quynh
d0f65d9756 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
f2f3829f27 x86: handle MOV CRx/DRx & LOCK prefix in issues #1456 & #1472 2019-05-06 16:18:45 +08:00
Nguyen Anh Quynh
055b02dbd9 x86: lock adc is valid. issue #1472 2019-05-06 12:44:09 +08:00
Nguyen Anh Quynh
b543c345ca ppc: sync with llvm 7.0.1 2019-04-30 13:50:42 +08:00
Nguyen Anh Quynh
3613aa37d9 MC: fix intel-syntax-encoding.s.cs 2019-04-17 23:01:07 +08:00
Nguyen Anh Quynh
59c9de846d MC: fix intel-syntax-encoding.s.cs 2019-04-17 22:52:02 +08:00
Nguyen Anh Quynh
663e5fcee9 x86: fix xmmword ptr issue in #1456 (TODO: better fix) 2019-04-17 20:39:21 +08:00
Nguyen Anh Quynh
0b6e474a79 cstest: Thub mode for pkhtb test 2019-04-17 01:51:17 +08:00
Nguyen Anh Quynh
a259e427c3 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
aea9c3ea89 MC: remove EIZ in x86-32-avx.s.cs 2019-04-17 00:00:42 +08:00
Nguyen Anh Quynh
6202c7e13c cstest: add EIZ test in #1456 2019-04-16 23:39:52 +08:00
Nguyen Anh Quynh
55b149f60a arm: alias LDR [sp], 4 to POP 2019-04-16 00:01:54 +08:00
Nguyen Anh Quynh
88d5c390eb arm: fix the missing third operand of LSR - issue #1456 2019-04-15 07:47:04 +08:00
Nguyen Anh Quynh
d7a74bbbeb fuzz: refactor platforms.inc to platform.c 2019-04-13 15:22:20 +08:00
Nguyen Anh Quynh
d95736bc9d fuzz: add fuzz_decode_platform.c 2019-04-13 11:11:58 +08:00
Nguyen Anh Quynh
c2261ee7fd fuzz: add platform.h 2019-04-13 10:54:09 +08:00
Nguyen Anh Quynh
2b24d9a8ea fuzz: put platforms[] in fuzz_disasm.c to platforms.inc, to be shared later 2019-04-13 10:51:17 +08:00
Nguyen Anh Quynh
8cbf967f67 arm64: fix imm of MOV instruction. issue 1456 2019-04-12 23:33:49 +08:00
Nguyen Anh Quynh
99d00fee14 x86: fix ATT syntax print immediate < 9 for MOV - issue #1456 2019-04-12 23:15:20 +08:00
radare
9fe37bba5c Add missing comma (#1458) 2019-04-12 01:15:11 +08:00