Commit Graph

2889 Commits

Author SHA1 Message Date
el2ro
0951668a46 fix merged conflicts 2017-04-15 10:39:06 +08:00
szt
20643d4d34 replace if-s in AArch64_AM_decodeAdvSIMDModImmType10 with lookup table (#552)
* replace if-s in AArch64_AM_decodeAdvSIMDModImmType10 with lookup table

Lookup table is much faster than bunch of if-s. If you don't like lookup tables, I have another proposal. See http://goo.gl/RjW1lr and compare generated machine code

* Smaller lookup table and shifting and bit mask used

* Update AArch64AddressingModes.h
2017-04-15 10:36:43 +08:00
radare
a9075dee71 Fix UB when accessing un-initialized array (#890) 2017-04-14 23:21:56 +08:00
Nguyen Anh Quynh
788de6a9ad Makefile install works even when pkg-config is missing 2017-04-14 18:43:06 +08:00
Nguyen Anh Quynh
95a0cefb69 PHP binding 2017-04-12 10:04:20 +08:00
Nguyen Anh Quynh
bd20ee1f75 cstool: fix mips64 mode 2017-04-11 09:45:55 +08:00
Nguyen Anh Quynh
33bacd7b85 x86: support BND prefix. issue #872 2017-03-17 23:44:34 +08:00
Quang Nguyễn
e3b79ca59b provide a validity check to prevent against Integer overflow conditions (#870)
* provide a validity check to prevent against Integer overflow conditions

* fix some style issues.
2017-03-13 23:35:29 +08:00
Nguyen Anh Quynh
4b86d85e50 add nmake.bat 2017-03-13 15:07:28 +08:00
Nguyen Anh Quynh
bb6e792f03 cstool: support armbe mode 2017-03-10 20:30:55 +08:00
Nguyen Anh Quynh
c17b1539c5 Update cs.c
remove a dead code, suggested by @vit9696 on #867
2017-03-08 20:59:16 +08:00
vit9696
a4de7e3257 Fix compilation from within a macOS kernel extension. #867 2017-03-08 20:58:28 +08:00
Nguyen Anh Quynh
f8c82a9b01 fix some warnings on VS2010 on redefining INTxx_MIN, INTxx_MAX 2017-03-06 14:41:06 +08:00
Andrew Dutcher
6e95167865 Add ability to copy prebuilt libraries from prebuilt directory during python build 2017-03-05 06:08:36 +08:00
Nguyen Anh Quynh
f76c4dc090 x86: consistent register names ST0-ST7 with the asm output 2017-02-22 15:54:37 +08:00
Nguyen Anh Quynh
cbadce628b arm64: rename enum arm64_mrs_reg to arm64_sysreg 2017-02-22 15:33:40 +08:00
Nguyen Anh Quynh
695e60be9d arm: add IMM operand for printPostIdxImm8s4Operand(). issue #861 2017-02-22 09:27:16 +08:00
Nguyen Anh Quynh
eebd47d78a ppc: print 0 offset for memory operand. see issue #856 2017-02-19 21:28:05 +08:00
Nguyen Anh Quynh
b4b50fe27f Merge pull request #850 from radare/fix-warns
Silent CC warnings
2017-02-06 20:39:48 +08:00
pancake
b8c84ad01b Silent CC warnings 2017-02-06 13:24:33 +01:00
Nguyen Anh Quynh
617c64fbb5 Python: Automatically conform to PEP440 for version numbers. ported from Unicorn Python binding 2017-02-01 13:23:15 +08:00
Nguyen Anh Quynh
76b94cba23 switch endian mode with cs_option() for Arm/Arm64/Mips/Sparc. fix issue #849 2017-02-01 11:19:00 +08:00
Nguyen Anh Quynh
26e810fca7 Merge pull request #848 from bSr43/next
Fixes truncated immediate value in operand details
2017-01-27 00:24:10 +08:00
Vincent Bénony
ad1d38b582 Fixes truncated immediate value in operand details
The instruction encoded « 00 00 19 B2 » was correctly disassembled « orr x0, x0, #0x8000000080 », but the reported immediate value, in the detail structure, was truncated to 0x80 due to the cast.
2017-01-26 17:10:16 +01:00
Nguyen Anh Quynh
432d08f8f6 Merge pull request #845 from emoon/fix-8-bit-displacement
[M68K] Fixed incorrect 8-bit displacement
2017-01-24 09:23:16 +08:00
Daniel Collin
1510c4f26f Fixed incorrect 8-bit displacement
8-bit displacement was treated as unsigned while it should actually be signed.
2017-01-23 20:11:53 +01:00
Nguyen Anh Quynh
25a6bab761 arm: groups for Thumb SETEND instruction. ported from #843 2017-01-19 09:13:49 +08:00
Nguyen Anh Quynh
c2b8488b66 x86: Fix the operand encoding in the test instruction for reduce set, issue #702 2017-01-03 01:33:21 +08:00
Nguyen Anh Quynh
e985c455d2 Merge branch 'next' of https://github.com/aquynh/capstone into next 2017-01-03 01:06:06 +08:00
Nguyen Anh Quynh
daabe1004d x86: Fix the operand encoding in the test instruction, issue #702 2017-01-03 01:05:52 +08:00
BartmanAbyss
6830660783 (M68k) make displacements signed (#836)
* (M68k) make displacements signed

* (M68k) revert group changes

* (m68k) signed displacement in python bindings
2017-01-01 01:11:48 +08:00
Ben Cheney
19b89432eb 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
5ae852d875 Merge pull request #830 from mrexodia/next
added regression test for #702 + ignore build directories
2016-12-17 10:06:37 +07:00
mrexodia
9e478e56ab added regression test for issue #702 2016-12-16 18:43:51 +01:00
mrexodia
cdb7b699f5 ignore build directories 2016-12-16 18:43:32 +01:00
Nguyen Anh Quynh
6e247def0b arm: fix operand access info for Bcc & BL. see issue #826 2016-12-13 18:20:01 +07:00
Nguyen Anh Quynh
698a4cda57 Merge branch 'next' of https://github.com/aquynh/capstone into next 2016-12-13 18:03:20 +07:00
Nguyen Anh Quynh
e22c6c6100 arm: fix access info for RET. see issue #825 2016-12-13 18:02:51 +07:00
Nguyen Anh Quynh
d3a59600cf Merge pull request #822 from hlein/next
Make sure bindir exists before installing to it.
2016-12-11 16:39:58 +07:00
Hank Leininger
c159015174 Make sure bindir exists before installing to it.
Without this, installing to a temporary directory tree (as done by
some package managers) installs cstool as the file /usr/bin.

This brings next in line with the behavior of master.
2016-12-10 20:52:08 -05:00
Nguyen Anh Quynh
83a3a39bf6 Merge pull request #819 from akirschbaum/next-java-add-binding
Java: Support cs_strerror() and cs_regs_access()
2016-11-27 21:31:57 +08:00
Andreas Kirschbaum
f03176a1e2 Java: Support cs_strerror() and cs_regs_access() 2016-11-27 13:59:12 +01:00
Nguyen Anh Quynh
9d8fbf3ab6 Merge pull request #820 from akirschbaum/next-java-bugfix1
Java: Fix a bug where Arm.OpInfo.memBarrier and Arm.OpInfo.op is wrongly calculated
2016-11-27 18:03:14 +08:00
Andreas Kirschbaum
18300bc0cf Java: Fix a bug where Arm.OpInfo.memBarrier and Arm.OpInfo.op is wrongly calculated 2016-11-27 10:13:57 +01:00
Nguyen Anh Quynh
0d69904312 Merge pull request #821 from akirschbaum/next-java-bugfix2
Java: Fix a bug where Arm.Operand is wrongly calculated for the second and following operands
2016-11-27 04:36:50 +08:00
Andreas Kirschbaum
ae41e2beb5 Java: Fix a bug where Arm.Operand is wrongly calculated for the second and following operands 2016-11-26 13:15:53 +01:00
Gabor Buella
1ae55ce65f x86: fix X86_REL_ADDR macro - handle two-byte jump instructions 2016-11-22 10:22:13 +08:00
Nguyen Anh Quynh
2cdc76b8cd cmake: Add a check of MSVC variable before setting flags that link the library. ported from PR #814 2016-11-16 08:17:02 +08:00
Nguyen Anh Quynh
06a4c383aa arm: fix decoding Thumb big-endian instructions. ported from PR #813 2016-11-14 21:37:23 +09:00
Nguyen Anh Quynh
030e9be4eb x86: fix instruction MOVAPS & MOVAPD. see issue #809 2016-11-11 11:27:34 +09:00