1520 Commits

Author SHA1 Message Date
kabeor
cdce5c8190 fixed incorrect MI->ac_idx leading to wrong AArch64 InsnOp access printing 2022-02-28 13:26:08 +08:00
pancake
792721b90c Revert "x86: fix lcall seg:off format for x86-16 (#1827)" (#1833)
This reverts commit e4965783cfb30c12ae8f1b7bbce446fef03e2b68.

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
Wu ChenXu
85759d8722 Merge pull request #1804 from bSr43/next
Fixes a few issues
2021-12-10 21:26:41 +08:00
pancake
a5259aab30 Dont format sstreams when there's nothing to format 2021-12-10 10:59:16 +01:00
Vincent Bénony
77606769ff Wrong register mapping 2021-12-09 15:06:53 +01:00
Vincent Bénony
fa9310e63f Missing writeback information on ldraa / ldrab 2021-12-09 15:06:26 +01:00
Vincent Bénony
593c2c5c86 Missing vector arrangement specifiers 2021-12-09 15:05:11 +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
79d897ee87 Merge pull request #1655 from cyanpencil/aarch64_cmp_reg_access_fix2
Fix cmp register access on aarch64
2021-11-13 20:41:30 +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
StalkR
7826376884 ppc: fix registers overflow (#1688)
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22236

Same as https://github.com/aquynh/capstone/pull/1687 for next branch
2021-03-20 07:34:34 +08:00
Jesús A. Álvarez
06662e0d52 mos65xx: use address on mem operands for relative addressing (#1702)
* mos65xx: use imm field for immediate operand value

using the wrong field works on little-endian hosts, but on big-endian the wrong value would be read

* mos65xx: set operand mem field to address also in relative modes

previously the last operand would have an offset, which doesn't match the printed operand

* mos65xx: add bpl instruction to test

this demonstrates an address operand with relative addressing
2021-03-10 08:21:31 +08: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
Richard Henderson
9a29b6afa7 RISC-V CSR output (#1690)
* riscv: Fix printAliasInstr

We do not want to append the entire string, only the
single non-argument character.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

* riscv: Implement printCSRSystemRegister

While upstream LLVM probably has a tablegen thing for these
somewhere, the current import doesn't include them.  Take the
list from riscv-privileged-v1.10.pdf.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-03-07 21:28:43 +08:00
Nguyen Anh Quynh
b059ba4ed0 code style fix 2020-12-03 16:13:00 +08:00
Michal Schulz
8751115a2e Honour direction bit in fmove instruction (#1709)
Co-authored-by: Michal Schulz <michal@Michals-iMac-Pro.local>
2020-12-03 16:12:56 +08:00
Anton Kochkov
6a8406aff6 M680X - remove unused s_cpu_type (#1695) 2020-10-29 12:29:49 +08:00
Richard Henderson
e34cd5475b Two RISC-V fixes (#1682)
* RISCV: Check CS_MODE_RISCVC in getFeatureBits

Enable compressed instruction extension with RISCVC.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

* RISCV: Fix skipdata_size for CS_MODE_RISCVC

RISC-V compressed instructions are 2 bytes, not 1.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2020-09-16 17:04:18 +08:00
Maxim Poliakovski
46e4a405da M68K: fix MOVEC operand transfer direction. (#1663) 2020-07-19 17:06:08 +08:00
Nicolas Derumigny
e46d8c49c7 Correcting X86 Imm Size 2020-07-02 16:39:15 +02:00
cyanpencil
b99a991a9b Fix cmp register access on aarch64 2020-07-01 16:04:06 +02:00
Daniel Collin
83d817339e Fixed incorrect read of 32-bit imm for bsr (#1644) 2020-06-12 23:00:47 +08:00
Antonio Flores Montoya
78a897ee12 fix bug in displacement offset (#1600) 2020-05-11 02:20:13 +08:00
Eric Kilmer
c0d5f4e280 Add more cases for LD1 instruction immediate fixups (#1632) 2020-05-10 10:03:52 +08:00
el poto rico
b818c6bdd0 ARM64: Populate implicitly used/modified registers and map ARM64_GRP_CALL to BL* (#1610)
This commit adds some registers to the list of implicit used registers and
implicit modified registers for several AArch64 instructions.

This commit also maps the `ARM64_GRP_CALL` group to the BL* instruction family.
It should fix issue #1606.
2020-05-10 01:46:55 +08:00
Nguyen Anh Quynh
73bbf84432 arm64: some POST instructions miss IMM operand. this fixes issue #1627 2020-05-10 01:39:57 +08:00
elp0t0r1c0
0e759ed68e Add ARM64_GRP_PAC group for Pointer Authentication (#1607)
* Add ARM64_GRP_PAC group for Pointer Authentication

* Lowercase the group's name
2020-03-30 08:37:11 +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
DarkaMaul
0e90045ddc fix: Remove wrong write in ARM_t2STMDB_UPD instruction (#1588) 2020-02-21 09:56:35 +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
Nguyen Anh Quynh
d3c521e0a5 MOS65XX: C90 compatibility 2019-12-16 00:41:34 +08:00
Jiayi Zhao
b29dca2cf7 systemz: fix base/index printing (#1561)
- In cases where base is 0 but index is not, Capstone doesn't print anything
2019-11-05 11:48:06 +08:00
naq
43040603d7 systemz: fix truncated 64bit imm operand in issue #1515 2019-07-10 17:32:46 +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
Catena cyber
834359fdbf Fixes MOS groups count (#1503) 2019-06-05 10:32:19 +08:00