Commit Graph

687 Commits

Author SHA1 Message Date
pancake
f477dd4f70 One semicolon is enough in C (#1892)
Co-authored-by: pancake <pancake@nopcode.org>
2022-07-08 07:06:38 +08:00
pancake
792721b90c Revert "x86: fix lcall seg:off format for x86-16 (#1827)" (#1833)
This reverts commit e4965783cf.

Co-authored-by: pancake <pancake@nopcode.org>
2022-01-28 10:22:00 +08:00
Nguyen Anh Quynh
50b7bc01ab x86: fix lcall seg:off format for x86-16 (#1827) 2022-01-26 11:35:07 +08:00
kabeor
8a3f4df74e Fixed incorrect operand access on x86 instruction vmovdqu 2022-01-18 11:48:18 +08:00
radare
8eb793afec Some performance improvement 2021-12-31 22:20:51 +01:00
pancake
a5259aab30 Dont format sstreams when there's nothing to format 2021-12-10 10:59:16 +01:00
kabeor
ff652fe877 Merge branch 'x86-access' of git://github.com/mxz297/capstone into mxz297-x86-access 2021-12-01 11:52:30 +08:00
oosris
e2cc7fe2a2 fixed eflags effects for adc/sbb 2021-11-22 13:13:20 +08:00
oosris
4914b43cef fix eflags effects for adc/sbb 2021-11-22 09:09:53 +08:00
Wu ChenXu
da759a6071 Revert "Correcting X86 Imm Size" 2021-11-14 08:50:56 +08:00
Wu ChenXu
9963db3952 Merge pull request #1657 from NicolasDerumigny/next
Correcting X86 Imm Size
2021-11-11 08:16:22 +08:00
Joe Ranieri
4e151e66d4 Fix the displacement offset for moffset-encoded operands
This was initially introduced in dce7da9 but lost in the LLVM 7 sync
in 5a99624.
2021-05-19 17:08:46 -04:00
Antonio Flores Montoya
2e06b6db75 x86 Fix AVX-512 k registers (#1689)
* fix bug in displacement offset

* fix k0-k7 registers in X86 table.
2021-03-07 21:57:14 +08:00
keenk
548dabc989 Fix registry access for several versions of pop such as POPDS, POPSS, etc. (#1725)
* Fix a few registry access mode mappings

* Fix rollback of operand access changes

Re-fix operand access of three mov instructions

* Remove binding breaking #if 0

The python script for generating constants in the bindings does not know how to handle the #if 0 statements included in these files.

* Add files via upload

Update registry access mode for several versions of pop such as POPDS, POPSS, etc
2021-03-07 21:51:22 +08:00
keenk
29ad509528 Fix registry access on cmov instructions (#1727)
* Fix a few registry access mode mappings

* Fix rollback of operand access changes

Re-fix operand access of three mov instructions

* Remove binding breaking #if 0

The python script for generating constants in the bindings does not know how to handle the #if 0 statements included in these files.

* Updated registry access on cmov instructions

Registry access for the destination operand of the conditional move (cmov) opcodes were incorrectly listed as READ | WRITE. Although you would expect the two operands to be compared in this opcode, it instead relies on the associated flag in EFLAGS regardless of the value in the destination operand.
2021-03-07 21:50:39 +08:00
Nicolas Derumigny
e46d8c49c7 Correcting X86 Imm Size 2020-07-02 16:39:15 +02:00
Antonio Flores Montoya
78a897ee12 fix bug in displacement offset (#1600) 2020-05-11 02:20:13 +08:00
Xiaozhu Meng
088163d897 Update x86 operand access information 2020-03-18 10:32:51 -05:00
Nicolas Derumigny
d9b9900250 Bug solved: SSE variant of MOVSD incorrectly decoded as REPNE MOVSD (#1540) 2020-02-21 09:58:32 +08:00
Richard Henderson
936dca0e2d Constify backends (#1549)
* Constify registerinfo.py output

Remove two conditionals separating identical bits of code.
Add "const" markup to MCRegisterDesc and MCRegisterClass.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify instrinfo-arch.py output

In this case, do not actively strip const.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the AArch64 backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the EVM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify M680X backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify M68K backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the Mips backend

The Mips backend has not been regenerated from LLVM recently,
and there are more fixups required than I'd like.  Just apply
the fixes to the tables by hand for now.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the Sparc backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the TMS320C64x backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the X86 backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the XCore backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify systemregister.py output

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the ARM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the PowerPC backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the MOS65XX backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the SystemZ backend

The mapping of system register to indexes is easy to
generate read-only.  Since we know the indexes are
between 0 and 31, use uint8_t instead of unsigned.

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the WASM backend

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify cs.c

Signed-off-by: Richard Henderson <rth@twiddle.net>

* Constify the BPF backend

Signed-off-by: Richard Henderson <rth@twiddle.net>
2019-12-23 20:30:57 +08:00
keenk
c609731e38 Undo rollback of 3 movbe instruction's operand access fixes (#1512)
* Fix a few registry access mode mappings

* Fix rollback of operand access changes

Re-fix operand access of three mov instructions
2019-07-01 10:36:51 +08:00
Nguyen Anh Quynh
29c7012025 fix some compilation issues when DIET mode is on 2019-06-24 12:52:38 +08:00
naq
30bffad2d4 x86: fix a race condition made by a static variable initialization. bug reported by Xiaozhu Meng 2019-06-19 10:44:13 +08:00
naq
2c015c75b3 x86: printf64m should print qword ptr by default. TODO: fix related cases in tablegen instead 2019-06-09 01:58:03 +08:00
naq
b1038743c1 x86: checkPrefix() does not set prefix0 in repne case 2019-06-09 01:13:22 +08:00
naq
dcd3e99022 x86: fix missing opcode byte in #1505 2019-06-08 12:21:50 +08:00
Ammar
9382c9ad54 x86: fix call/jmp access mode of mem operand (#1479)
sets CS_AC_READ for memory operand of call and jmp instructions
2019-05-14 23:11:32 +08:00
Nguyen Anh Quynh
c12f4e4118 cstest: add tests for xacquire/xrelease xchg 2019-05-14 10:59:07 +08:00
Nguyen Anh Quynh
ea30457f9e x86: recognize xacquire/xrelease for XCHG 2019-05-14 10:49:27 +08:00
Nguyen Anh Quynh
f3ca9a28b9 x86: recognize xrelease lock 2019-05-14 09:59:23 +08:00
Nguyen Anh Quynh
a1796341cb x86: recognize xacquire prefix. issue #1477 2019-05-13 22:27:05 +08:00
Nguyen Anh Quynh
89251f3c61 x86: LOCK prefix for 16bit case of ADC/ADD/AND/OR/XOR/SUB in issue #1472 2019-05-06 17:39:44 +08:00
Nguyen Anh Quynh
d0f65d9756 x86: update tablegen to fix MOV CRx/DRx, TEST & LOCK prefix in #1456 & #1472 2019-05-06 17:28:37 +08:00
Nguyen Anh Quynh
f2f3829f27 x86: handle MOV CRx/DRx & LOCK prefix in issues #1456 & #1472 2019-05-06 16:18:45 +08:00
Nguyen Anh Quynh
055b02dbd9 x86: lock adc is valid. issue #1472 2019-05-06 12:44:09 +08:00
Nguyen Anh Quynh
663e5fcee9 x86: fix xmmword ptr issue in #1456 (TODO: better fix) 2019-04-17 20:39:21 +08:00
Nguyen Anh Quynh
f9f22b2925 x86: improve EIZ check 2019-04-16 23:55:18 +08:00
Nguyen Anh Quynh
3acc6e9275 x86: do not print EIZ register - issue #1456 2019-04-16 23:36:40 +08:00
Nguyen Anh Quynh
99d00fee14 x86: fix ATT syntax print immediate < 9 for MOV - issue #1456 2019-04-12 23:15:20 +08:00
Nguyen Anh Quynh
38d181d148 x86: quick fix for RCRm1 instruction - issue #1456 2019-04-12 00:38:23 +08:00
Nguyen Anh Quynh
48cd47e4eb x86: fix BOUND instruction in issue #1456 2019-04-11 01:24:43 +08:00
Nguyen Anh Quynh
dea98fa870 x86: CMPXCHG read AL/AX/EAX/RAX registers (issue #1454) 2019-03-29 23:29:35 +08:00
Nguyen Anh Quynh
165a964bb5 x86: operand size of BNDxxx is 16 2019-03-07 09:09:35 +08:00
Catena cyber
c5180bffd3 Fixes uninitialized memory for X86 BND instructions (#1415) 2019-03-07 09:06:45 +08:00
Nguyen Anh Quynh
8c7cbaf415 x86: operand access for BND instructions 2019-03-04 16:12:56 +08:00
Nguyen Anh Quynh
f2233b7f44 x86: new files X86GenRegisterName.inc & X86GenRegisterName1.inc 2019-03-04 00:56:07 +08:00
Nguyen Anh Quynh
7e1efae487 x86: remove PRINT_ALIAS_INSTR 2019-03-02 15:32:07 +08:00
Nguyen Anh Quynh
cb2b1bda53 x86: add BND registers to regsize_map_32 & regsize_map_64 2019-03-02 15:16:48 +08:00
Nguyen Anh Quynh
3dd39b0bc5 x86: add BND registers. this fixes OSS-fuzz issue 13467 2019-03-02 14:58:29 +08:00
Nguyen Anh Quynh
2dc77357e1 x86: update ISA & mapping tables 2019-03-01 01:05:52 +08:00