Commit Graph

2968 Commits

Author SHA1 Message Date
Stephen
572a4ae56a cleanup makefile (#1038)
use wildcards
2017-10-20 23:17:30 +08:00
Daniel Collin
4b2b160ef0 [M68K] Fixed invalid base reg (#1028)
This is one of those “how did this ever work?” changes. Problem was that as m68k_op was aliased with the imm value so when changing that to something big it would trash the values in the mem struct which would make things go really bad.

Now m68k_op_mem has been moved out of the union so this will not happen again. Also fixed instruction printing bug related to this (just happend to “work” due to the old union layout)
2017-10-13 09:06:01 +08:00
obs1dium
33f39e1632 Fix undefined behavior when disassembling ud0 x86 instructions (#1032)
* fix undefined behavior due to uninitialized memory

* fix bad calloc call
2017-10-13 09:04:16 +08:00
Nguyen Anh Quynh
f5ee69e42b Mips64: fix the last cherry-pick on selecting getInstruction() 2017-10-09 09:26:41 +08:00
Nguyen Anh Quynh
99e303bdd4 Revert "cleanup travis and use environment variables"
This reverts commit 63913ef3f6.
2017-10-09 08:53:16 +08:00
Travis Finkenauer
c1dbc8a42e Mips: Fix selection of disasm handler (#1022) 2017-10-09 08:52:53 +08:00
Stephen
63913ef3f6 cleanup travis and use environment variables 2017-10-08 00:01:53 +08:00
Fernie
c745e64573 fixed hardcoded paths with variables. (#1018)
* fixed hardcoded paths with variables.

cmake pkg-config file fixed hardcoded paths with variables. CMakeLists.txt line 394 needs to be modified
> configure_file("capstone.pc.in" "capstone.pc" @ONLY)

* forgot to add 64bit support variable.
2017-09-27 09:32:54 +08:00
Richard Henderson
629ae6653b Fix pp field in readPrefix for VEX3 and EVEX (#1015) (#1016) 2017-09-19 08:46:59 +08:00
smart-rabbit
881f9201d9 retrieve and print "status register updates" info (#995)
is equal to the code in https://github.com/aquynh/capstone/blob/next/tests/test_x86.c
2017-09-06 20:37:21 +07:00
Ruslan Kabatsayev
4aec4de0c1 cstool: Separate instruction bytes by spaces (#1009) 2017-09-06 20:35:19 +07:00
Matt Suiche
394cdfc11e Resolve some casting issues with Visual Studio. 2017-09-05 22:20:57 +07:00
Jonas
7a274e24fb Add posibility to disable universal build for osx 2017-09-05 21:51:07 +07:00
Zach Riggle
596d31659c Fix the include path for Android builds when building cstool 2017-08-29 07:35:02 +07:00
Nguyen Anh Quynh
c10a631e1e x86: fix an warning on unintialized vars 2017-08-16 09:01:58 +08:00
Andrew Calvano
eeceed2cbe Bug fix for incorrect operand type in certain load/store instructions on AArch64. (#952) 2017-08-03 23:01:47 +07:00
Alfredo Beaumont
9f6b28cc0b Add name to relative branch group in supported architectures. (#982) 2017-08-01 16:49:43 +08:00
Fotis Loukos
27f03c1b5d Fixed bug in memory operand decoding. (#981)
Fixed bug #979. Decoding a memory operand with a register offset from
the B file would return an incorrect register.
2017-07-31 20:56:29 +08:00
Nguyen Anh Quynh
26cb22a0ff arm: UADD8 updates flags. fix #980 2017-07-31 01:05:28 +07:00
Nguyen Anh Quynh
0652e62cd8 binding: update following addition of GRP_BRANCH_RELATIVE 2017-07-30 19:06:29 +08:00
Alfredo Beaumont
a09a81813c Relative branch group (#964)
* Add a new group for relative branching instructions

* x86: Add relative branch group to appropiate instructions

* Rename RELATIVE_BRANCH to BRANCH_RELATIVE

* aarch64: Add relative branch group to appropiate instructions

* arm: Add relative branch group to appropiate instructions

* m68k: Add relative branch group to appropiate instructions

* mips: Add relative branch group to appropiate instructions
2017-07-30 19:05:03 +08:00
Nguyen Anh Quynh
fef1c2920a cstool: fix #975 2017-07-26 23:22:46 +08:00
Nguyen Anh Quynh
e12e2de2cf cstool: cs_op_count() can return -1. fix #978 2017-07-26 23:16:00 +08:00
Nguyen Anh Quynh
cbf274c94c cmake: do not set libsuffix=64 on MacOS. fix issue #963 2017-07-19 22:46:38 +08:00
Fernie
4be19c3cbb detect 64bit library location. compatibility for 64bit systems. (#963)
credit goes to Theo. (Theodore Papadopoulo Theodore.Papadopoulo at inria.fr https://cmake.org/pipermail/cmake/2013-July/055374.html)
2017-07-18 08:27:29 +08:00
Nguyen Anh Quynh
13e06987cd cstool: some cleanup 2017-07-04 16:04:53 +08:00
Sergi Àlvarez i Capilla
cff66503aa Refactor cstool to use getopt -100LOC (#953)
* Refactor cstool to use getopt -100LOC

* Add getopt.h for portability

* Do not use os-specific separators in include paths
2017-07-04 15:55:46 +08:00
Snarpix
532bc3f328 Fixes DATA REX_W CALL_PC_REL IMM32 issue (decoded as IMM16) (#883) 2017-06-28 07:07:26 +08:00
Francesco Tamagni
1fb2b53620 Add CS_MODE_MIPS2 to opt-in for COP3 instructions (#939)
* Add CS_MODE_MIPS2 to opt-in for COP3 instructions

* Fix indentation

* Get rid of `+`
2017-06-27 20:56:54 +08:00
radare
9af9742706 Honor CS_OPT_UNSIGNED on x86 and add cstool -u (#945) 2017-06-16 02:13:28 +08:00
Adrian Herrera
1910fd5635 mingw build: cstool fails to build with mingw (#941)
The correct compiler was not being passed to cstool/Makefile. The expected name
for the capstone lib was also incorrect - there is no "lib" prefix when
compiling with mingw.
2017-06-02 21:49:59 +08:00
Nguyen Anh Quynh
bde76ebb40 x86: fix FPU flags so const_generator.py can generate proper Python symbols 2017-05-31 21:42:02 +08:00
Nguyen Anh Quynh
640bf3814e bindings: update FPU flags & FPU group for x86 after the last merge 2017-05-31 21:19:50 +08:00
echotyh
7982670984 Next (#918)
* Add FPUFLAGS information.

* Change the structure insn_op: from uint64_t eflags to union{ uint64_t eflags, uint64_t fpuflags; }.

* Adjust the  modified structure insn_op.

* Add missing flags.

* Change flags information acorrding to xed files and instruction manual.

* Rename fpuflags to fpu_flags.

* Updating flags information accoring to manual and xed files.

* Changing the name eflags to flags.

* Printing the FPU_FLAGS information when it belongs to group X86_GRP_FPU.

* Defining new flags.

* Updating flags information according to manual and xed files.

* Adding X86_GRP_FPU to all the instructions which have modified fpu_flags.

* Solving the conflict problem when do git commit.

* Rectify the annotation within the structure insn_op.

* Supplement fpu flags information for floating-point instructions which missed fpu flags before.

* Print fpu group information when an instructure belongs to X86_GRP_FPU.

* Add two new groups ARM64_GRP_BASE(base instructions) and ARM64_GRP_FPSIMD(SIMD&FP instructions).

* Revert "Add two new groups ARM64_GRP_BASE(base instructions) and ARM64_GRP_FPSIMD(SIMD&FP instructions)."

This reverts commit 8ab50e80a3.

* X86 clean up.

* Clean up arch/X86/X86MappingInsn.inc.

* Double check.

* Delete files.

* Clean up x86.

* Clean up reduce file

* Fix btr

* fix x86
2017-05-29 22:43:47 +08:00
vit9696
4cd08570d1 Added qsort implementation for OS X kernel mode (#934)
* Added qsort implementation for OS X kernel mode

* Added qsort source reference
2017-05-26 09:27:01 +08:00
Nguyen Anh Quynh
73acde0b72 Merge branch 'next' of https://github.com/aquynh/capstone into next 2017-05-25 23:10:26 +08:00
Nguyen Anh Quynh
1be2ed8b24 rebuild cstool when the core changes. fix #932 2017-05-25 23:10:19 +08:00
vit9696
a8c7e4a537 Merge #929 with some changes to get things compile (#930) 2017-05-25 16:01:48 +08:00
Nguyen Anh Quynh
79194cc63a x86: indentation 2017-05-22 21:36:48 +08:00
Nguyen Anh Quynh
2266e67160 fix nmake-x86.bat 2017-05-21 21:33:47 -07:00
Quang Nguyễn
3e7dae8a24 Compile cstool on Windows using Microsoft Visual Studio (VS) (#928) 2017-05-17 08:33:12 +07: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
Nguyen Anh Quynh
1010db4624 Merge branch 'test3' into next 2017-05-11 01:12:04 +08:00
Nguyen Anh Quynh
c62fe10d7b add nmake-x86.bat 2017-05-09 22:58:23 +08:00
Nguyen Anh Quynh
d4345d955b x86: attempt to fix uninitialized memory, probably by introduction of UD0 2017-05-09 20:22:48 +08:00
Nguyen Anh Quynh
7917523c96 cmake: build static MSVCRT by default 2017-05-09 00:35:05 -07:00
Nguyen Anh Quynh
7ee4581160 x86: LDS is invalid in x64. see #904 2017-05-08 10:49:16 +08:00
Nguyen Anh Quynh
2b84c0cf2c x86: handle f2/f3 prefix for 16bit. see issue #452 2017-05-07 14:30:06 +08:00
Nguyen Anh Quynh
64328e3f56 x86: add UD0 instruction 2017-05-07 11:17:23 +08:00