4745 Commits

Author SHA1 Message Date
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
dfa8c60c91 Updated arm64.h to refelct changes to architecture in Armv9.2 and LLVM
14.0.5, and introduced new arm64 operand types.

New operand type for svcr MSR/MRS/SMSTART/SMSTOP instructions to
facilitate easier cstool printing.

New operand type for SME instructions with a matrix register that is
indexed.
2022-09-30 16:21:58 +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
Finn Wilkinson
3ef5bb6b79 Updated synctool scripts to extract new functions and match type/formatting changes in LLVM 14.0.5 tablegen files.
- asmwriter.py : As well as new functions, recognition of new SME index printing was added. The printAliasInstr function also required a re-write to match its counter-part and changes in logic in LLVM 14.0.5
 - disassemblertables-arch.py : Minor type changes for some functions, as well as adding support for new SME decode functions.
 - mapping_insn-arch.py : Minor change to correct incorrect instruction aliasing in generated AArch64MappingInsn.inc etc.
 - registerinfo.py : minor change to reflect change in LLVM 14.0.5
 - systemoperand.py : corrected minor type changes made in LLVM 14.0.5 and added extraction of SVCR, BTI, DBnXS lists and encoding functions.
2022-09-30 15:34:50 +01:00
Finn Wilkinson
437a7fc469 Updated suite/synctools/.gitignore to ignore generated insn_list.txt file. 2022-09-30 15:27:36 +01:00
Finn Wilkinson
ed175c8b72 Changed AArch64 filegen order to resepct inter-file dependancies.
make arm64 needs to be performed before AArch64GenRegisterV.inc is generated.
2022-09-30 15:25:36 +01:00
Finn Wilkinson
e385fc5267 Updated synctools/tablegen/AArch64 files to LLVM 14.0.5. 2022-09-30 15:21:50 +01:00
Finn Wilkinson
62fee65c54 Updated include/llvm files in synctools to LLVM 14.0.5. 2022-09-30 13:43:09 +01:00
Wu ChenXu
a55657b9b7 Merge pull request #1913 from hamarituc/ppc-buffer-underrun 2022-09-08 09:02:15 +08:00
Mario Haustein
3f8a6e8537 PPC: fix out of bound memory access
closes #1912
2022-09-07 17:27:54 +02:00
Wu ChenXu
9dd322fdb7 Merge pull request #1919 from hamarituc/memleak 2022-09-04 12:06:45 +08:00
Mario Haustein
a5f67fa3dd Fix memory leak in testsuite 2022-08-29 18:53:18 +02:00
Wu ChenXu
276ff3d994 Merge pull request #1910 from jbott/remove-ctypes-install-requirement
Remove outdated ctypes requirement
2022-08-29 10:48:18 +08:00
John Ott
9f727d495f Remove outdated ctypes requirement
The library ctypes has shipped with the python standard library since
Python 2.5, however this was still added via the `requires` keyword in
setuptools.setup. This results in a spurious requirement being created
in the .whl METADATA file, causing warnings when packaged via tools like
pex:

```
$ python3 -m pex capstone -o capstone.pex
/Users/ott/.venv/lib/python3.9/site-packages/pex/dist_metadata.py:397: PEXWarning: Ignoring 1 `Requires` field in /Users/ott/.pex/installed_wheels/2a4c7a0d4c87aceed3134ae20997a764af1811fee8e151cf5da90e0462822893/capstone-4.0.2-py3-none-macosx_12_arm64.whl metadata:
1.) Requires: ctypes

You may have issues using the 'capstone' distribution as a result.
More information on this workaround can be found here:
  https://github.com/pantsbuild/pex/issues/1201#issuecomment-791715585
```

Since this requirement is outdated, it can just be removed.
2022-08-24 11:29:48 -07:00
Wu ChenXu
51e8079a8c Merge pull request #1906 from trufae/fb 2022-08-01 15:03:07 +08:00
pancake
23a4475cec Fix -Werror build 2022-07-31 15:24:52 +02:00
Wu ChenXu
df734665d4 Merge pull request #1902 from terorie/fix-ppc-psq 2022-07-23 23:53:08 +08:00
Richard Patel
c872a40161 Add regression test for #1902 2022-07-23 17:17:44 +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
Wu ChenXu
2d2eeef7f1 Merge pull request #1900 from terorie/fix-bindings 2022-07-23 17:22:28 +08:00
Richard Patel
2f1c4524eb Add Python test for CS_MODE_PS 2022-07-23 10:49:13 +02:00
Richard Patel
43944edc34 Add OCaml to EditorConfig 2022-07-23 10:46:03 +02:00
Richard Patel
ef560a1afa Sync eBPF and PowerPC bindings 2022-07-23 10:46:03 +02:00
Wu ChenXu
b61e596871 Merge pull request #1863 from junghee/next 2022-07-23 15:13:19 +08:00
Wu ChenXu
be8afe1852 Merge pull request #1898 from terorie/ppc-ps 2022-07-23 15:08:28 +08:00
Richard Patel
6a13a78d21 Run synctools (PPC PS support) 2022-07-23 08:50:47 +02:00
Richard Patel
8507533bab Update bindings (PPC PS support) 2022-07-23 08:50:47 +02:00
Richard Patel
fa58bc1d62 Add PPC paired-singles ext 2022-07-23 08:50:26 +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
b8db7913f3 Merge pull request #1891 from wtdcode/tls-cs-variable 2022-07-04 14:21:47 +08:00
mio
d4a4773ebc Mark cs_* as thread local to avoid race condition in multithreads 2022-07-03 11:54:21 +08:00
Wu ChenXu
3fd4712b0b Merge pull request #1886 from terorie/ebpf-callx 2022-06-09 21:37:40 +08:00
Wu ChenXu
82b2084279 Merge pull request #1885 from terorie/fix-ebpf-ld-class 2022-06-09 21:37:02 +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
Wu ChenXu
efa78c8c8e Merge pull request #1878 from hamarituc/pkgconfig
Fix pkg-config template
2022-05-05 18:56:34 +08:00
Wu ChenXu
845da4b2f4 Merge pull request #1877 from adamjseitz/aarch64-comprehensive-alias-vas 2022-05-02 15:37:33 +08:00
Mario Haustein
8479233b64 Fix pkg-config template 2022-04-30 13:06:30 +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
c52e5ae543 Merge pull request #1870 from theblackunknown/fix-install-pkgconfig 2022-04-16 12:15:21 +08:00
MACHIZAUD Andréa
72e16ccefe Merge branch 'next' into fix-install-pkgconfig 2022-04-15 11:17:20 +02:00
Wu ChenXu
5bdf6a3a76 Merge pull request #1867 from theblackunknown/cmake-config-next
Add `cstool` in CMake Package Config + CMake Github Workflow
2022-04-14 14:39:31 +08:00
MACHIZAUD Andréa
1aec01a715 Fix pkgconfig not installed when CAPSTONE_BUILD_CSTOOL is false 2022-04-13 11:39:30 +02:00
MACHIZAUD Andréa
61ed12c4f2 Merge cmake.yml into CITest.yml 2022-04-11 09:35:10 +02:00
MACHIZAUD Andréa
e16fd004cd CMake presets + simple CMake Workflow 2022-04-03 11:34:00 +02:00
MACHIZAUD Andréa
acb9c24b99 Add cstool to the capstone-targets 2022-04-03 11:33:47 +02:00