Nguyen Anh Quynh
885e488a2e
arm64: LDR does not write to second operand
2016-03-01 12:40:11 +08:00
Nguyen Anh Quynh
0c2e8a2d60
arm64: LDR instructions do not read target register
2016-03-01 12:13:38 +08:00
Nguyen Anh Quynh
13ecd5f000
Merge branch 'next' of https://github.com/aquynh/capstone into next
2016-03-01 11:09:41 +08:00
Nguyen Anh Quynh
4b5dc21fa9
arm64: TBX & TBL have up to 4 registers in vector list
2016-03-01 11:05:55 +08:00
Nguyen Anh Quynh
aab7f63b02
arm64: fix some compilation warnings & indentation
2016-01-22 22:25:49 +08:00
Nguyen Anh Quynh
6de6425072
Merge branch 'arm64_reg_access' of https://github.com/pranith/capstone into pranith-arm64_reg_access
2016-01-19 17:22:04 +08:00
reyalpchdk
8b12b71cf5
Align thumb BLX immediate by discarding low bits
2016-01-16 21:32:09 -08:00
Nguyen Anh Quynh
2936bec1ff
x86: fix issue #544 for AT&T syntax
2016-01-11 14:07:30 +08:00
Nguyen Anh Quynh
0b0d62ab0a
x86: fix memory operand size of fbstp/fbld (issue #544 )
2016-01-11 14:04:30 +08:00
Pranith Kumar
653827bf5a
Add register access info for ARM64
...
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
2016-01-06 15:54:10 -05:00
Ammar Ben Khadra
739505a945
Fix classification of ARM jump instructions
...
All jump instructions have been classified based on the direct
and indirect_branch flags.
2015-12-17 14:41:40 +01:00
unknown
369a9cf955
Hope to have done it right.
2015-12-02 16:07:22 +01:00
Nguyen Anh Quynh
7fc5bc3b4b
x86: print immediate of IN/OUT instructions in positive form. this fixes issue #554
2015-11-27 21:28:05 +07:00
Nguyen Anh Quynh
ed88b001f8
x86: XCHG instructions should read|write to both operands. this fixes issue #545
2015-11-16 19:50:26 +08:00
Nguyen Anh Quynh
59e301333b
x86: print immediate operand of MOVABS in positive form. this fixes issue #541
2015-11-14 10:54:01 +08:00
Nguyen Anh Quynh
9d8e39e786
Revert "corrected x86 immediate sizes"
...
This reverts commit df9a2c3ce1
, as discussed in https://github.com/aquynh/capstone/pull/527
2015-11-07 17:36:44 +08:00
Ben Vanik
722aec7800
Fixing a warning of size_t->int in VC++.
2015-11-05 18:42:08 -08:00
obs
df9a2c3ce1
corrected x86 immediate sizes
2015-11-04 13:50:09 +01:00
Nicolas PLANEL
626510c5e5
[M68K] avoid mixed declarations and code
...
Avoid mixed declarations and code reported by the gcc warning flag :
-Wdeclaration-after-statement.
Introduce new m68k_read_safe_16/32/64() method.
2015-10-12 21:31:16 +11:00
Nicolas PLANEL
97aca80830
[M68K] add const helper
...
Add some const aim to help inlining.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-10 22:47:48 +11:00
Nicolas PLANEL
91f3cdb475
[M68K] move peek/read macros to real functions
...
Some compilers don't like statements in macro.
Anyway modern compiler should optimized (read inline)
2015-10-10 19:53:50 +11:00
Daniel Collin
997112d3d2
Removed a big chunk of unused stuff
...
* Cleaned up M68KDisassembler.h with legacy stuff from Musashi which isn't used at all.
* Removed M68KConf.h which isn't needed anymore.
* Made some functions static as they are now only local to the current file.
2015-10-10 19:30:04 +11:00
Nguyen Anh Quynh
cc1e14431c
x86: print -0x8000000000000000 as 0x8000000000000000. this fixes issue #499
2015-10-09 14:38:06 +08:00
Nguyen Anh Quynh
5712440c53
Merge pull request #507 from nplanel/radare
...
fixup for Radare
2015-10-08 23:32:59 +08:00
Nicolas PLANEL
5f9257cfaa
[M68K] use M68K line A for memory data poisoning
...
In case of out of bound access return a poison value to force to point to
d68000_invalid() opcode. This will force instruction_is_valid() to return
false and capstone will do skipdata.
Line A are more M68K standard invalid lines than 0x0808.
2015-10-08 22:27:59 +11:00
Nicolas PLANEL
af1d39d336
cleanup peek/read macros
...
Remove unused m68k_read_disassembler_8(), rework peek/read macros.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 22:22:39 +11:00
Nguyen Anh Quynh
475e04da00
x86: fix the leftover prefixPresent[]
2015-10-08 15:58:52 +08:00
Nguyen Anh Quynh
29ff43fd6b
x86: coding style
2015-10-08 15:53:44 +08:00
bughoho
8a39d79e10
fix comment
2015-10-08 15:53:34 +08:00
bughoho
7138044052
x86: add dedicated variables such as prefix2e, prefix36, prefix66, prefix67, etc
2015-10-08 15:53:17 +08:00
Nicolas PLANEL
8daac3a164
Add boundary checker
...
Avoid reading bytes outside of the code section.
Trick by returning bad data (illegal instruction) to force capstone to skip data.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 16:41:03 +11:00
Nicolas PLANEL
d1b5c3f384
cleanup : move the initialization of m68k_info
...
Simplify the code by moving the initialization of printer_info (m68k_info)
at the right place, in the module.init() function.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 16:40:56 +11:00
Nicolas PLANEL
b9f66d63c9
[M68K] fixup increment pc only if the instruction_is_valid()
...
m68k_disassemble() should return the number of decoded bytes, aim to help
M68K_getInstruction() to return if it was a good instruction or not.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 16:39:02 +11:00
Nicolas PLANEL
ee33bcf967
[M68K] fixup read/peak() address_line_mask
...
The correct implementation : addr = (address - base) & address_line_mask
2015-10-08 15:21:24 +11:00
Nicolas PLANEL
e661bd0cfc
[M68K] Coverity fixup : remove old/dead code.
...
if(info) should be removed as it's an old part of the code that has been forgotten before merging.
Didn't cause any Bug as info is always true.
Related to issue #494
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-07 18:10:43 +11:00
Nguyen Anh Quynh
3e1ecc2368
Merge branch 'm68k' into next
2015-10-06 21:54:43 +08:00
Nicolas PLANEL
7086018410
[M68K] set detail structure fields to default values
...
Avoid undefined behavior as we didn't define yet registers rd/wr/gr.
2015-10-06 15:02:30 +11:00
bughoho
5f600fcb30
fix:prefix 0x67 missed.
2015-10-06 11:49:11 +08:00
Daniel Collin
25d2ea6ac6
Fixed MSVC warnings
2015-10-05 16:31:06 +02:00
Nguyen Anh Quynh
9d28a6b04e
m68k: fix some compiler warnings
2015-10-05 21:54:36 +08:00
Nguyen Anh Quynh
9331ffc517
Merge branch 'print_info' of https://github.com/nplanel/capstone into nplanel-print_info
2015-10-05 21:50:54 +08:00
Nicolas PLANEL
e996c4a3bb
[M68K] we don't need anymore cleaning printer_info is case of error
...
Will not change the behavior, cs_close() we cleanup printer_info for us.
2015-10-05 22:19:28 +11:00
Nicolas PLANEL
78b0722b1d
[M68K] handle->printer_info need to be check
...
handle->printer_info need to be check, not instruction_info.
2015-10-05 22:03:20 +11:00
Nicolas PLANEL
44cc3d0c1e
[M68K] printer_info need to be allocated only once
...
printer_info need to be allocated only once. cs_close() will cleanup for us.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-05 21:57:01 +11:00
Nicolas PLANEL
d529ea0db7
[M68K] Use printer_info to share private info between disassembler and printer
...
Implementation is done by adding cs_m68k extension field in m68k_info.
The private m68k_info structure is allocated in M68K_getInstruction() (disassembly)
and free (if no error) by M68K_printInst() (printer).
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-05 20:19:45 +11:00
Nicolas PLANEL
ee75626661
[M68K] remove global dependency aim to have reentrant code
...
Remove the last global bytes :
static uint8_t* s_disassemblyBuffer;
static uint32_t s_baseAddress;
Introduce private struct m68k_info on the heap for future use.
Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-05 19:26:37 +11:00
Nguyen Anh Quynh
58fe7cd068
m68k: more coding style
2015-10-05 16:05:17 +08:00
Nguyen Anh Quynh
8deb6d9eed
m68k: rename M68Kconf.h to M68KConf.h for consistency
2015-10-04 21:59:03 +08:00
Nguyen Anh Quynh
0c49966482
m68k: code style for M68KInstPrinter.c
2015-10-04 21:51:09 +08:00
Nguyen Anh Quynh
812c3f1b32
Merge branch 'm68k' of https://github.com/emoon/capstone into emoon-m68k
2015-10-04 21:46:20 +08:00