Commit Graph

2942 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 589585ecc1 cstool: some cleanup 2017-07-04 16:04:53 +08:00
Sergi Àlvarez i Capilla 8561f15d66 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 a2948cca80 Fixes DATA REX_W CALL_PC_REL IMM32 issue (decoded as IMM16) (#883) 2017-06-28 07:07:26 +08:00
Francesco Tamagni b8342f9b90 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 7a4567612c Honor CS_OPT_UNSIGNED on x86 and add cstool -u (#945) 2017-06-16 02:13:28 +08:00
Adrian Herrera 42b3ef0233 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 bd66403357 x86: fix FPU flags so const_generator.py can generate proper Python symbols 2017-05-31 21:42:02 +08:00
Nguyen Anh Quynh f9fabed4d2 bindings: update FPU flags & FPU group for x86 after the last merge 2017-05-31 21:19:50 +08:00
echotyh 572d864b2f 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 8ab50e80a3688eb8cc3c9e256b1e0809c712a132.

* 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 158646b843 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 e8bd91b8c5 Merge branch 'next' of https://github.com/aquynh/capstone into next 2017-05-25 23:10:26 +08:00
Nguyen Anh Quynh 2af5fce099 rebuild cstool when the core changes. fix #932 2017-05-25 23:10:19 +08:00
vit9696 1c0f3d887c Merge #929 with some changes to get things compile (#930) 2017-05-25 16:01:48 +08:00
Nguyen Anh Quynh b7bd162539 x86: indentation 2017-05-22 21:36:48 +08:00
Nguyen Anh Quynh 5fab04ecc6 fix nmake-x86.bat 2017-05-21 21:33:47 -07:00
Quang Nguyễn cf773252a1 Compile cstool on Windows using Microsoft Visual Studio (VS) (#928) 2017-05-17 08:33:12 +07:00
Nguyen Anh Quynh 58c7e68ee5 suite: add disasm_mc.{py,sh} 2017-05-16 18:15:02 +07:00
Ruslan Kabatsayev 6c002ed998 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 d8251ae250 Merge branch 'test3' into next 2017-05-11 01:12:04 +08:00
Nguyen Anh Quynh 1318d58435 add nmake-x86.bat 2017-05-09 22:58:23 +08:00
Nguyen Anh Quynh d1a71d4974 x86: attempt to fix uninitialized memory, probably by introduction of UD0 2017-05-09 20:22:48 +08:00
Nguyen Anh Quynh ea6bca1524 cmake: build static MSVCRT by default 2017-05-09 00:35:05 -07:00
Nguyen Anh Quynh ebc012f54f x86: LDS is invalid in x64. see #904 2017-05-08 10:49:16 +08:00
Nguyen Anh Quynh b7f9e75c3b x86: handle f2/f3 prefix for 16bit. see issue #452 2017-05-07 14:30:06 +08:00
Nguyen Anh Quynh fcaf7d9a6f x86: add UD0 instruction 2017-05-07 11:17:23 +08:00
Nguyen Anh Quynh 093ebf0646 x86: LES is invalid in x64. see #904 2017-05-06 14:29:40 +08:00
Nguyen Anh Quynh f958e5fca4 x86: AT&T syntax bug with zero offset segment register. see #884 2017-05-06 10:37:44 +08:00
Nguyen Anh Quynh 663b210cb7 arm: another fix for #913 2017-05-05 09:53:29 +08:00
Nguyen Anh Quynh fdca2f7cf8 Makefile: do not delete capstone.pc.in 2017-05-05 09:47:19 +08:00
Nguyen Anh Quynh a71f763b09 arm: POP {reg} read/write SP register. this fixes #913 2017-05-04 17:20:01 +08:00
Nguyen Anh Quynh 27eb3b2c3a x86: lock nop is a valid instruction. #915 2017-05-03 20:06:15 +08:00
Gabor Buella b86e4b98dc cmake - fix SOVERSION property used for libcapstone.so (#914)
It was set as a global property before, but cmake appears to ignore that,
even after the following fix:
-set_property(GLOBAL PROPERTY SOVERSION SOVERSION ${VERSION_MAJOR})
+set_property(GLOBAL PROPERTY SOVERSION ${VERSION_MAJOR})

So this patch removes the global property, and SOVERSION is now specified as
a target specific property. The result of the cmake install target seems better:

Before:

$ ls -la lib
4375834 May  1 16:05 libcapstone.a
3510040 May  1 16:05 libcapstone.so

After:

$ ls -la lib
4375834 May  1 16:05 libcapstone.a
     16 May  1 16:08 libcapstone.so -> libcapstone.so.4
     20 May  1 16:08 libcapstone.so.4 -> libcapstone.so.4.0.0
3510040 May  1 16:08 libcapstone.so.4.0.0

The SOVERSION property triggers symlink creation in cmake, see:
https://cmake.org/cmake/help/v3.0/prop_tgt/SOVERSION.html
2017-05-02 09:24:45 +08:00
Nguyen Anh Quynh a9612944d8 CMake: fix pkgconfig file 2017-04-30 23:18:53 +08:00
Gabor Buella 98a0d39fd3 cmake: install pkg config file 2017-04-30 11:50:03 +02:00
noword 8d5436b4e3 fix compiling error in MS VS2015 (#869)
for issue #868
2017-04-26 05:52:28 +08:00
Nguyen Anh Quynh c768fa919f cstool: support arm64be 2017-04-25 21:33:26 +08:00
Simorfo ec28cd5e8f Bugfix : setting all fields to insns cache (#899)
* Bugfix : setting all fields to insns cache

* Bugfix
Fixing root cause, not setting opcode to 0 in default case

* Not resetting opcode to 0 in this case as well

* Finalizing bugfix
2017-04-21 21:21:20 +08:00
radare e7a441a7f6 Fix undefined behaviour produced by disassembling 6662dcbc615a (#898) 2017-04-20 23:04:52 +08:00
radare 42c865862f Fix assigned value with undefined (#893) 2017-04-18 06:45:03 +08:00
Nguyen Anh Quynh 5bbf913fda add TMS320C64X to README 2017-04-17 21:31:11 +08:00
Nguyen Anh Quynh 1745553d50 Merge branch 'next2' into next 2017-04-17 21:27:26 +08:00
Nguyen Anh Quynh cfc4152305 binding: add Ocaml & Java const files for TMS320C64x 2017-04-17 21:24:06 +08:00
Nguyen Anh Quynh 282ce28126 Merge branch 'next' of https://github.com/fotisl/capstone into fotisl-next 2017-04-17 21:19:10 +08:00
Fotis Loukos e963a1e17c Added cstool support for tms320c64x 2017-04-17 11:58:29 +03:00
Fotis Loukos e3723f206d Fixed group name getting function 2017-04-17 11:57:16 +03:00
Nguyen Anh Quynh c8f0322a30 cleanup 2017-04-17 10:02:37 +08:00
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
Nguyen Anh Quynh 58546aa2fd Merge branch 'next' of https://github.com/fotisl/capstone into fotisl-next 2017-04-15 09:53:05 +08:00
Fotis Loukos 357828b858 Corrected a bug
Corrected a bug that would cause capstone to crash under certain invalid
instructions.
2017-04-14 22:39:40 +03:00