Commit Graph

29 Commits

Author SHA1 Message Date
flyingsymbols
298d413bbc * added a test file to suite for testing invalid and valid instruction sequences
* fixed and added a test for a thumb-2 invalid sequence that was incorrectly allowed before these changes (pop.w with sp argument included)
* fixed and added a test for a blx from thumb to ARM that had its immediate argument incorrect (misaligned)

* eliminated some warnings by explicitly casting so I could turn on
  treat warnings as errors locally

General notes:
*  probably worth turning on treat all warnings as errors in the msvc project files, had a subtle bug that resulted from a missing declaration causing differences in dll and static compilation modes

( code was working incorrectly in dll form because of missing declaration in arch/ARM/ARMMapping.h for new function ARM_blx_to_arm_mode. Something about the linking was confusing ld when making the dll, and the resulting offsets were wonky (e.g. the added ble test would show up as #0x1fc instead of #0x1fe like it should have )

* the invalid pop was being treated as a soft fail which then gets coerced
  to a success because it is != MCDisassembler_Fail in Thumb_getInstruction
  what are the semantics of a soft fail? Maybe we should be able to set up
  whether or not we want a soft fail to be a real fail in the csh struct?
2014-07-15 04:33:40 -04:00
Nguyen Anh Quynh
55cd996add sparc: initialize detail->sparc in Sparc_getInstruction. bug reported by Ben Nagy 2014-07-09 13:08:17 +08:00
Nguyen Anh Quynh
cae09bf543 replace offset_of with offsetof from stddef.h 2014-06-17 14:58:39 +08:00
Nguyen Anh Quynh
3d3b6cec01 sparc: use CreateImm0() & CreateReg0() to create MCOperand* to avoid using malloc/free 2014-06-16 12:57:02 +08:00
Nguyen Anh Quynh
9b91de0ae3 sparc: use SStream_concat0() instead of SStream_concat() for simple string processing whenever possible 2014-06-16 12:51:07 +08:00
Nguyen Anh Quynh
69582d71ae initialize cs_insn.detail by properly zero-out right members for each arch 2014-06-09 17:50:01 +07:00
Nguyen Anh Quynh
29fd0f6405 fix all the code in other non-X86 archs after the change made by commit 5329a6ffd4 2014-06-09 08:00:18 +07:00
Nguyen Anh Quynh
04f2ec6d0f cleanup redundant headers included 2014-05-27 10:39:04 +08:00
Nguyen Anh Quynh
5d6383e335 sparc: SPARC_CC_ICC_N should not have the same value as SPARC_CC_INVALID. bug reported by Jason Oster 2014-05-25 13:48:06 +08:00
Nguyen Anh Quynh
6456481508 x86: add immediate operand (1) for SHL/SHR/ROR/ROL/SAR/SAL in detail mode & Intel syntax 2014-05-19 16:46:31 +08:00
Nguyen Anh Quynh
c5cad6cab3 avoid using stdbool.h to support compilers without C99 support 2014-05-15 21:40:24 +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
805fed5162 make checkDecoderPredicate() handle boolean casting for MSVC 2014-05-12 21:29:04 +08:00
Nguyen Anh Quynh
043702e9ef more fixes for warnings reported by MSVC 2014-05-12 16:17:00 +08:00
Nguyen Anh Quynh
6893ec535e more warnings fixed reported by MSVC 2014-05-12 15:36:38 +08:00
Nguyen Anh Quynh
abffe02a46 sparc: recover autogen code in arch/Sparc/SparcGenDisassemblerTables.inc 2014-05-12 13:48:22 +08:00
Nguyen Anh Quynh
bb0744df5d do not initialize some local vars unnecessarily. this problem was introduced when we fixed C89 issues for MSVC 2014-05-12 13:41:49 +08:00
Axel 0vercl0k Souchet
779d4c75d9 first changes to get a successfully compiled version of capstone on VS2012 2014-05-08 23:44:49 +01:00
Nguyen Anh Quynh
958927eb56 clean up after the last removal of SubtargetFeature.h 2014-05-08 22:59:28 +08:00
Nguyen Anh Quynh
a5ffdc3a80 x86: properly handle LOCK/REP in the core, so remove buch of hacks 2014-05-07 08:25:24 +08:00
Nguyen Anh Quynh
2cff6f61fc x86: handle instructions with LOCK/REP/REPNE prefix after other prefixes. bear with this until we have a better approach 2014-04-28 11:19:44 +08:00
Nguyen Anh Quynh
a3c9bd678f sparc: more fix to print negative numbers in more friendly way 2014-03-26 16:22:16 +08:00
Nguyen Anh Quynh
88b2833760 sparc: cleanup 2014-03-22 13:41:04 +08:00
Nguyen Anh Quynh
f6c7cbc972 core: fix some warnings 2014-03-12 12:50:54 +08:00
Nguyen Anh Quynh
65c7a01d4f sparc: fix warning on unused variable 2014-03-11 10:31:53 +08:00
Nguyen Anh Quynh
641be49c2f sparc: fix mnemnonic for some alias instructions 2014-03-10 17:57:04 +08:00
Nguyen Anh Quynh
78153f59bb sparc: add SWAP instruction 2014-03-10 15:29:33 +08:00
Nguyen Anh Quynh
1055a2e22a python: support Sparc 2014-03-10 14:37:08 +08:00
Nguyen Anh Quynh
05e27138ae core: add Sparc arch 2014-03-10 11:58:57 +08:00