Nguyen Anh Quynh
fc83a439e5
add diet compile option (CAPSTONE_DIET option in config.mk). This reduces binary size by around 40%
2014-02-22 23:26:27 +08:00
Nguyen Anh Quynh
6b804dacb1
arm: update core
2014-02-19 12:52:50 +08:00
Nguyen Anh Quynh
585018f831
ppc & arm: remove functions *_get_insn_id2()
2014-02-18 00:13:34 +08:00
Nguyen Anh Quynh
a82a0890a6
more more fixes on C coding style
2014-01-23 23:42:40 +08:00
Nguyen Anh Quynh
aa078a1c4a
more fixes on C coding style
2014-01-23 22:29:04 +08:00
Alex Ionescu
b8a57fe285
Additional MSVC fixes, including to fixed tables (temporary so Quynh can see what to do).
2014-01-22 18:12:01 -08:00
Alex Ionescu
46018db884
Initial set of changes to support building with MSVC 2013. Right now there's a bunch fo assumptions in the .vcxproj file and some things are not as clean as they should be, but it does build a full build and works (at least the x86 side). The point of this initial checkpoint is to make sure that nothing breaks on the GCC side, that everyone is ok with the changes to the source (or if better fixes/typing can be done).
2014-01-22 09:45:00 -08:00
Nguyen Anh Quynh
53fc5c103a
cs_open() should return error on invalid mode
2014-01-21 15:26:02 +08:00
Nguyen Anh Quynh
3732725342
rename mapping.c, mapping.h, module.c to have arch prefix. suggested by Alex Ionescu
2014-01-20 09:52:05 +08:00
Nguyen Anh Quynh
c272e9d000
do not use constructor to enable archs, so code is more portable. suggested by Alex Ionescu
2014-01-19 12:03:22 +08:00
Nguyen Anh Quynh
a9ffb440f8
replace strdup() with our cs_strdup(), which call cs_mem_malloc() internally
2014-01-15 18:27:01 +08:00
Nguyen Anh Quynh
9cc56a3322
arm: update core
2014-01-15 16:01:55 +08:00
Nguyen Anh Quynh
a8eb7a5ca5
rename memory function pointer types to have cs_ prefix. also rename internal function pointers my_* to have cs_mem_ prefix - suggested by Pancake
2014-01-11 12:55:31 +08:00
danghvu
701b850af9
Fix: bug that static link does not know constructor
2014-01-09 11:14:40 +07:00
Nguyen Anh Quynh
a768c9eb2c
arm: support big-endian. issue reported by Pancake
2014-01-09 09:05:27 +08:00
Nguyen Anh Quynh
9fac512efc
no longer need to free insn_cache for each arch: simply do it from cs_close()
2014-01-07 10:56:04 +08:00
Nguyen Anh Quynh
1acfd0b883
move insn_cache into cs_struct to gurantee thread-safe
2014-01-06 10:56:59 +08:00
Nguyen Anh Quynh
c7404075ff
move internal memory management declarations from utils.h to cs_priv.h
2014-01-05 11:35:47 +08:00
Nguyen Anh Quynh
24bf0d9079
add new option CS_OPT_MEM for cs_option(): this enable user-defined dynamic memory management. idea proposed by Pancake
2014-01-05 11:19:04 +08:00
Nguyen Anh Quynh
f1d489b949
ppc: support details information
2014-01-05 00:00:05 +08:00
Nguyen Anh Quynh
5ef633ce91
arm64 & arm: do not update details when detail option is off. bug reported by Pancake.
2014-01-04 10:41:17 +08:00
Nguyen Anh Quynh
b265406960
cache insns for fast lookup in mapping.c. based on the idea of Dang Hoang Vu
2014-01-03 17:08:58 +08:00
Nguyen Anh Quynh
19b0de3c8d
moving static doing_mem variable into cs_struct to guarantee thread-safe when handling memory operands
2013-12-31 22:40:04 +08:00
Nguyen Anh Quynh
04ac9c3725
arm,arm64,mips,x86: rename PPC_getFeatureBits() to getFeatureBits()
2013-12-31 18:15:12 +08:00
Nguyen Anh Quynh
42c6b1acc7
initial support for PPC
2013-12-30 00:15:25 +08:00
Nguyen Anh Quynh
ec4ead2c02
function pointers in arch_init[] should be able to report errors
2013-12-28 14:34:21 +08:00
Nguyen Anh Quynh
4fe224b1ed
change API cs_disasm_dyn(): break cs_insn into 2 structures, and put all details into new structure cs_detail. this break API compatibility
2013-12-24 16:49:36 +08:00
Nguyen Anh Quynh
f954f871e8
initialize all_arch in constructors
2013-12-22 18:49:22 +08:00
Nguyen Anh Quynh
d345839bce
support cs_option() for arm64 module
2013-12-22 11:10:56 +08:00
Nguyen Anh Quynh
39a42eddfb
Change the way of supporting arch modularization
...
- Always use libapstone.so as library name, no matter which archs are compiled in.
- Add new API cs_support() to check if a particular arch is supported.
- Change cs_version(): return hexical version which encodes both major & minor version.
the return value can be comparable.
- Bump API version to 1.1
2013-12-22 10:40:58 +08:00
Nguyen Anh Quynh
13a7d95763
add missing arch/*/module.c
2013-12-21 12:19:44 +08:00
Nguyen Anh Quynh
f185180436
cleaner implementation for arch modularization
2013-12-21 12:16:47 +08:00
Nguyen Anh Quynh
abc02059e3
make all module code static
2013-12-21 10:06:59 +08:00
danghvu
7711858da6
Minor fix credit
2013-12-20 01:23:17 -06:00
danghvu
29e01a6895
arch/*/include.h -> arch/*/module.h
2013-12-20 00:20:57 -06:00
danghvu
a2e7ef1b73
Fix coding style
2013-12-19 23:12:30 -06:00
danghvu
0b6ea044ff
Move cs_option dispatch into arch specific
2013-12-19 23:07:26 -06:00
danghvu
34d49d935b
Support compilation of individual arch
2013-12-19 12:10:24 -06:00
Nguyen Anh Quynh
e832bd8996
arm: support alias registers SB, SL, FP & IP
2013-12-19 16:43:32 +08:00
Nguyen Anh Quynh
3d5930f39e
arm: fix some int types and string specifiers
2013-12-15 21:12:19 +08:00
Nguyen Anh Quynh
d14d3973f4
coding style for C code
2013-12-15 21:11:17 +08:00
Nguyen Anh Quynh
4d3e852fbb
detail option: provide instruction id even when detail option is OFF
2013-12-14 10:45:09 +08:00
Nguyen Anh Quynh
a209e67f8a
support to turn on/off building instruction details
2013-12-14 00:23:41 +08:00
Nguyen Anh Quynh
a01d1546d6
x86: handle outs instruction in 16bit mode
2013-12-12 15:54:30 +08:00
pancake
f0e4eed89d
Use const on all read-only buffers
2013-12-11 22:14:42 +01:00
Nguyen Anh Quynh
10fd59eacf
cleanup & remove dead code in arm, arm64 & mips. dead code was reported by Pancake
2013-12-11 20:37:42 +08:00
Nguyen Anh Quynh
462f291b9f
ARM: Fix bunch of issues
...
- Bugs
- start switching to more friendly asm: for number under 10, print without hex in front
2013-12-11 17:35:27 +08:00
Nguyen Anh Quynh
ff771f6c84
arm: fix a typo in calling DecodeT2CPSInstruction()
2013-12-11 16:39:37 +08:00
Nguyen Anh Quynh
723fa80890
arm: some hardware features must be mutually exclusive
2013-12-10 12:13:05 +08:00
Nguyen Anh Quynh
a253c7a8e8
x86: map EFLAGS to string of 'flags', 'eflags' or 'rflags' depending on current CS_MODE
2013-12-09 10:26:18 +08:00