Commit Graph

12 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 0b874b2fca cleanup 2018-06-22 01:03:26 +08:00
Travis Finkenauer 853a2870ce Declare global arch arrays with contents (#1171)
This eliminates the need for archs_enable() and eliminates the racey
initialization.

This makes the architecture-specific init, option, and destroy functions
non-static so that they may be called from a different file.
2018-06-21 14:52:35 +08:00
Alberto Garcia Illera 5f173b0562 prefix cs_ to global variables to avoid link problems (#1102) 2018-03-19 22:23:09 +08:00
Travis Finkenauer 8998a3a1d5 ppc: fix endian check (#1029)
* Remove `big_endian` field of `cs_struct`

Added a helper macro `MODE_IS_BIG_ENDIAN()` to check if
`CS_MODE_BIG_ENDIAN` is set.

Refactored `cs_open()` check for valid mode out of arch-specific code
into arch-independent code. Also added a valid mode check to
`cs_option()`.  The checks use a new global array
`arch_disallowed_mode_mask[]`, which is initialized in the arch-specific
`*_enable()` functions.

Fixes bug where endianness could not be set for ppc.

* Fix Mac OS brew for Travis CI
2017-10-20 23:33:24 +08:00
Nguyen Anh Quynh 0f456b3379 switch endian mode with cs_option() for Arm/Arm64/Mips/Sparc. fix issue #849 2017-02-01 11:17:13 +08:00
Nguyen Anh Quynh 650f96ce43 add new API cs_group_name() to return group name in string, given the group id 2014-07-08 08:59:27 +08:00
Nguyen Anh Quynh 8598a219f3 enable arch code from source with CAPSTONE_HAS_* for MSVC to pick up 2014-05-14 11:26:41 +08:00
Nguyen Anh Quynh 1c68ab9293 cleaning up unused code 2014-03-06 12:41:28 +08:00
Nguyen Anh Quynh aa078a1c4a more fixes on C coding style 2014-01-23 22:29:04 +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