Commit Graph

1546 Commits

Author SHA1 Message Date
Finn Wilkinson
483f14a920 Fixed SME index alias printing issue. 2022-10-11 15:37:34 +01:00
Wu ChenXu
215822fde7 Merge pull request #1921 from huth/fixes
m68k: Add support for the FNOP instruction
2022-10-07 13:57:15 +08:00
Wu ChenXu
c0e1839d5c Merge pull request #1907 from FinnWilkinson/AArch64-Armv9.2-update 2022-10-06 17:27:20 +08:00
Thomas Huth
15286490fb m68k: Add support for the FNOP instruction (fixes #1916)
The FNOP instruction has the same encoding as FBF with zero displacement,
but according to the manual, it has some additional synchronization
functions, so it would be good if Capstone disassembles this with the
FNOP mnemonic instead of the FBF mnemonic.

Before this change:

$ cstool m68k40 0xf2800000
 0  f2 80 00 00  fbf.w	$2

After this change:

$ cstool m68k40 0xf2800000
 0  f2 80 00 00  fnop
2022-10-02 08:07:33 +02:00
Thomas Huth
55dd90c50a m68k: Remove duplicated LIMIT_CPU_TYPES statement
The second one is unnecessary and was likely a copy-n-paste error.
2022-10-02 08:06:12 +02:00
Finn Wilkinson
6d5a3b1a44 Updated AArch64 Instruction Printer to support new Armv9.2 instructions.
Implemented new functions present in LLVM 14.0.5 for any new instruction
type in Armv9.2; mainly SME / Matrix printing functions.

New set_sme_index function added (called from AArch64GenAsmWriter.inc)
to correctly add operands to new sme_index operand type. Doing_SME_Index
bool added to cs_struct to indicate when operands should be added to
sme_index type.

Functionality added to support SMSTART/SMSTOP aliases.
2022-09-30 16:34:09 +01:00
Finn Wilkinson
222a8b4278 Updated AArch64 BaseInfo.h and Mapping.c to refelct Armv9.2 architectural changes and .inc file changes. 2022-09-30 16:14:37 +01:00
Finn Wilkinson
b60d0df0d8 Updated AArch64 Disassembler.
Added new decode functions, mainly for SME matrix operands and SVCR sys
register, as well as updating existing decode functions which have seen
changes in LLVM 14.0.5.

The _getInstruction function has also been updated to its LLVM 14.0.5
counterpart; with a new switch case for adding implicit operands to the
relevant SME instructions.
2022-09-30 16:07:07 +01:00
Finn Wilkinson
4a5e69f69e Generated new Armv9.2 AArch64 .inc files from LLVM 14.0.5 2022-09-30 15:51:03 +01:00
Mario Haustein
3f8a6e8537 PPC: fix out of bound memory access
closes #1912
2022-09-07 17:27:54 +02:00
pancake
23a4475cec Fix -Werror build 2022-07-31 15:24:52 +02:00
Richard Patel
4af02db7bc Avoid setting PowerPC branch hint on signed disp 2022-07-23 16:44:12 +02:00
Richard Patel
f1a2281f03 Fix PPC insn names and psq displacement 2022-07-23 16:44:12 +02:00
Richard Patel
6a13a78d21 Run synctools (PPC PS support) 2022-07-23 08:50:47 +02:00
pancake
f477dd4f70 One semicolon is enough in C (#1892)
Co-authored-by: pancake <pancake@nopcode.org>
2022-07-08 07:06:38 +08:00
Wu ChenXu
3fd4712b0b Merge pull request #1886 from terorie/ebpf-callx 2022-06-09 21:37:40 +08:00
Richard Patel
fb34475a1f Add eBPF callx instruction 2022-06-06 11:56:40 +02:00
Richard Patel
26999b6df5 Fix eBPF lddw opcode 2022-06-06 10:51:48 +02:00
Adam Seitz
b27f3df27e Comprehensively add vas specifiers to ARM aliases 2022-04-29 13:49:52 -04:00
Adam Seitz
9998268b93 Fix AArch64InstPrinter indentation 2022-04-28 17:41:14 -04:00
Wu ChenXu
2bd6f00b53 Merge branch 'next' into aarch64-alias-vas-specifiers 2022-03-22 22:58:06 +08:00
Adam Seitz
ee689c4512 Set .vas for aliased AArch64 instructions 2022-03-21 13:24:57 -04:00
Adam Seitz
d729d88e87 Combine aarch64 sys operand enums 2022-03-18 14:15:46 -04:00
Adam Seitz
6687276cad Build SYS operand for AArch64 sys operations 2022-03-18 09:43:13 -04:00
Wu ChenXu
524e863ad1 Merge pull request #1840 from stevielavern/fix_ldr
Fix AArch64 ldapr detailed information #1839
2022-02-28 14:23:55 +08:00
kabeor
cdce5c8190 fixed incorrect MI->ac_idx leading to wrong AArch64 InsnOp access printing 2022-02-28 13:26:08 +08:00
stevielavern
6751c53aec Fix ldapr detailed information #1839 2022-02-22 15:22:41 +01: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
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