Commit Graph

692 Commits

Author SHA1 Message Date
52b23b7171 Fix #2079 via the post-printer. (#2329) 2024-04-30 10:36:03 +08:00
6e0725ce4d Fix #2128 by adding missing mapping values. (#2334) 2024-04-26 15:13:21 +08:00
0f305ce4da Fix access bug for TEST op (#1511)
* Fix access bug for TEST op

Results for TEST instructions are discarded hence operands should have
no write access.

* Fix access bug for TEST (reduce)

* trigger new ci test

---------

Co-authored-by: kabeor <1597915586@qq.com>
2023-06-26 09:21:39 -07:00
34aa92d998 Support repz prefix on X86 ret instructions 2023-06-24 09:25:04 -04:00
f3a30182b9 Add handling of prefix NOTRACK 2023-04-19 17:13:39 -04:00
ba0bcda5c5 One semicolon is enough in C (#1892)
Co-authored-by: pancake <pancake@nopcode.org>
2022-07-08 07:06:38 +08:00
0f41307fec 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
e4965783cf x86: fix lcall seg:off format for x86-16 (#1827) 2022-01-26 11:35:07 +08:00
7129ae29b6 Fixed incorrect operand access on x86 instruction vmovdqu 2022-01-18 11:48:18 +08:00
a6b76dff69 Some performance improvement 2021-12-31 22:20:51 +01:00
a9e02802ed Dont format sstreams when there's nothing to format 2021-12-10 10:59:16 +01:00
4cf298a484 Merge branch 'x86-access' of git://github.com/mxz297/capstone into mxz297-x86-access 2021-12-01 11:52:30 +08:00
f3a69915e6 fixed eflags effects for adc/sbb 2021-11-22 13:13:20 +08:00
bee385395d fix eflags effects for adc/sbb 2021-11-22 09:09:53 +08:00
b5c9b0a639 Revert "Correcting X86 Imm Size" 2021-11-14 08:50:56 +08:00
7e886c7201 Merge pull request #1657 from NicolasDerumigny/next
Correcting X86 Imm Size
2021-11-11 08:16:22 +08:00
cd66cb2d5f 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
4afdd97051 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
ff664b031c 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
dba65a6379 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
6a3283bbb2 Correcting X86 Imm Size 2020-07-02 16:39:15 +02:00
387b576cb8 fix bug in displacement offset (#1600) 2020-05-11 02:20:13 +08:00
923a04efc7 Update x86 operand access information 2020-03-18 10:32:51 -05:00
b2544a04c0 Bug solved: SSE variant of MOVSD incorrectly decoded as REPNE MOVSD (#1540) 2020-02-21 09:58:32 +08:00
aaffb38c44 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
626bd6ab8e 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
c3b4ce1901 fix some compilation issues when DIET mode is on 2019-06-24 12:52:38 +08:00
naq
cd59edaa42 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
46c6aab052 x86: printf64m should print qword ptr by default. TODO: fix related cases in tablegen instead 2019-06-09 01:58:03 +08:00
naq
886c535a6e x86: checkPrefix() does not set prefix0 in repne case 2019-06-09 01:13:22 +08:00
naq
a0111dc909 x86: fix missing opcode byte in #1505 2019-06-08 12:21:50 +08:00
69e26b50eb 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
1ede71254d cstest: add tests for xacquire/xrelease xchg 2019-05-14 10:59:07 +08:00
dd9c231698 x86: recognize xacquire/xrelease for XCHG 2019-05-14 10:49:27 +08:00
eb25f46d6a x86: recognize xrelease lock 2019-05-14 09:59:23 +08:00
d5dd80e979 x86: recognize xacquire prefix. issue #1477 2019-05-13 22:27:05 +08:00
bbb8d3d570 x86: LOCK prefix for 16bit case of ADC/ADD/AND/OR/XOR/SUB in issue #1472 2019-05-06 17:39:44 +08:00
a27da62b0d x86: update tablegen to fix MOV CRx/DRx, TEST & LOCK prefix in #1456 & #1472 2019-05-06 17:28:37 +08:00
49e383d4fd x86: handle MOV CRx/DRx & LOCK prefix in issues #1456 & #1472 2019-05-06 16:18:45 +08:00
02e63faac5 x86: lock adc is valid. issue #1472 2019-05-06 12:44:09 +08:00
a740af902b x86: fix xmmword ptr issue in #1456 (TODO: better fix) 2019-04-17 20:39:21 +08:00
cb8e1d14b0 x86: improve EIZ check 2019-04-16 23:55:18 +08:00
7cfa70ffa4 x86: do not print EIZ register - issue #1456 2019-04-16 23:36:40 +08:00
58022575d7 x86: fix ATT syntax print immediate < 9 for MOV - issue #1456 2019-04-12 23:15:20 +08:00
80376bd368 x86: quick fix for RCRm1 instruction - issue #1456 2019-04-12 00:38:23 +08:00
77abf6a211 x86: fix BOUND instruction in issue #1456 2019-04-11 01:24:43 +08:00
5a0c7d7e60 x86: CMPXCHG read AL/AX/EAX/RAX registers (issue #1454) 2019-03-29 23:29:35 +08:00
fd9dbbc14f x86: operand size of BNDxxx is 16 2019-03-07 09:09:35 +08:00
6a769e8159 Fixes uninitialized memory for X86 BND instructions (#1415) 2019-03-07 09:06:45 +08:00
0e8d2f0d08 x86: operand access for BND instructions 2019-03-04 16:12:56 +08:00