Commit graph

592 commits

Author SHA1 Message Date
Denys Melnyk
4eb90672f3
Xtensa: gate ESP32-S3 and HIFI3 ops behind CS_MODE_XTENSA_ESP32S3 (#2979)
The Xtensa disassembler enabled the ESP32-S3 SIMD/AI (ee.*) and HiFi3 ops for
every target because the subtarget feature gates were stubbed to return true
(Xtensa_getFeatureBits and hasDensity/hasESP32S3Ops/hasHIFI3). As a result, on a
non-ESP32-S3 Xtensa config any instruction with op0=0xE/0xF was matched as a
4-byte ee.* op, so a base-ISA byte stream desynced.

Make Xtensa_getFeatureBits map the mode to a feature set (mirroring the SystemZ
precedent), thread MI->csh->mode into the three has*Ops gates, and add an opt-in
CS_MODE_XTENSA_ESP32S3. Base/esp32/esp32s2/esp8266 no longer emit ESP32-S3 ops;
CS_MODE_XTENSA_ESP32S3 preserves them. Concrete instance of issue #1992.

The saved auto-sync patch hashes are updated so the fix survives the next LLVM
re-sync. Adds tests/MC/Xtensa/esp32s3.s.yaml.

Co-authored-by: Denys Melnyk <denys@com2cloud.com>
2026-07-22 16:13:28 +00:00
Rot127
a0b10fee51
Bump header PRE_RELEASE to Alpha11 (#3001) 2026-07-22 14:53:22 +00:00
Rot127
6ef3f48566
v6.0.0 Alpha10 (#2998)
* Update Python bindings

* Increment version number

* Replace all lowercase letters from ALPHA_INS_ enums with upper case.

* Update changelog
2026-07-21 15:50:52 +00:00
Amaan Mujawar
44ca257811
AArch64: prevent literal displacement truncation (#2984)
Widen AArch64 memory displacements to 64 bits (int64_t) and update cstool,
cstest, regression coverage, and release documentation accordingly.

Signed-off-by: Amaan Mujawar <amaansmujawar@gmail.com>
2026-07-18 17:02:29 +00:00
مصطفي محمود كمال الدين
032f79993d
RISC-V: Add v5 compatibility behaviour for CS_MODE_RISCVC/RISCV_C (#2996)
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2026-07-18 16:58:01 +00:00
Amaan Mujawar
54fcf14f05
AArch64: Add option for explicit shifted wide immediates (#2995)
Add CS_OPT_SYNTAX_AARCH64_EXPLICIT_WIDE_IMM to print shifted
MOVN and MOVZ instructions in their explicit forms instead of using
the equivalent MOV aliases.

Keep the existing LLVM-compatible alias output as the default, and
retain MOV aliases for unshifted instructions when the option is
enabled.

Expose the option through cstool and the Python bindings, and add
regression tests for MOVN, MOVZ, 32-bit and 64-bit forms.

Fixes #2890

Signed-off-by: Amaan Mujawar <amaansmujawar@gmail.com>
2026-07-16 15:24:18 +00:00
billow
d55666155e
M68K: Handle EA decoding error case and add ColdFire EMAC_B dual-acc MAC (#2987)
* Add ColdFire EMAC_B dual-acc MAC support

* Fix M68K reserved EA decoding in Capstone

---------

Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2026-07-08 11:29:39 +00:00
مصطفي محمود كمال الدين
19243483f6
Add frm operands to float/double instructions (#2972)
---------

Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2026-06-23 13:28:28 +00:00
Rot127
faffeec2dc
Fix naming convention of Alpha enums. (#2971)
All the enum names were prefixed with `Alpha` instead of `ALPHA`.
That happened because of an old Auto-Sync bug.
Sadly, I just recognized that Alpha was generated with it.
No idea why it got through in the PR in the first place.

I really would like that to have fixed before Beta.
And while it is super annoying for everyone to fix,
it is better to do as early as possible.

A simple command to replace all these occurrences in your code base is:
```
find . -type f -regex ".*\.\(c\|h\)$" -exec sed -i -E "s|Alpha_([A-Z0-9_]+)|ALPHA_\1|g" {} +
```

Please excuse the inconvenience!
2026-06-20 15:50:33 +00:00
Matt Turner
8926770711
Alpha: fix decoder bugs and add test coverage (#2967)
* Alpha: fix integer register class decoding order

GPRC[] is LLVM's register allocation order, not the architectural
register number order. Using it to map hardware register fields 0-31
scrambled r9-r29 (e.g. field 9 → \$16, field 23 → \$9).

Alpha_R0 through Alpha_R31 are contiguous in the enum (33-64), so
Alpha_R0 + RegNo gives the correct architectural mapping directly.

Update existing tests that encoded the wrong register names, and add
new MC tests covering the previously scrambled r9-r29 range.

* Alpha: fix BR/BSR to accept any Ra register

The LLVM decoder table constrained BR to Ra=31 and BSR to Ra=26,
rejecting all other encodings as illegal. The Alpha ISA defines Ra
as the return address destination for BSR (any writable register
is valid) and as an unused hint field for BR (any register field
is legal in existing binaries).

Remove both CheckField constraints by zeroing the skip bytes to a
no-op, and change the decode format from 25 (disp-only) to 27
(Ra + disp21) so the Ra operand is visible to callers.

Override BR/BSR in the instruction printer, since the generated
AsmWriter hardcodes "\$31" for BR and ignores Ra entirely for BSR.

Update the placeholder BSR test (which had a malformed expected
string) and add new tests for BR/BSR with non-default Ra values.

Refs: https://github.com/capstone-engine/capstone/issues/2582

* Alpha: fix CALL_PAL to decode full 26-bit function code

The LLVM decoder mapped opcode 0x00 to COND_BRANCH_I (format 0),
which tried to interpret bits[20:0] as a register number. This
failed for any PAL function code > 31 (e.g. 0x83 gentrap, 0x1020b).

Add decode format 31 that extracts bits[25:0] as a single immediate,
switch opcode 0x00 to use it, map COND_BRANCH_I to the new public
Alpha_INS_CALL_PAL, and override the printer to emit "call_pal <imm>".

* Alpha: fix JMP/JSR to accept any Ra, Rb, and hint

The LLVM decoder required JMP to have Ra=31 and hint=0, and JSR to
have specific Ra/Rb pairs (26/27 or 23/27) with hint=0. Real-world
code uses arbitrary combinations: JMP with Ra!=31 to save return
addresses, JSR with Ra=26 and Rb!=27, or non-zero hint fields for
branch prediction.

Remove all Ra, Rb, and hint constraints for JMP and JSR. Switch both
from decode format 17 (Rb only) and 14 (no operands) to format 18
(Ra + Rb + hint14). Add printer override to emit the three-operand
form: "jmp/jsr \$ra,(\$rb),hint".

Closes: https://github.com/capstone-engine/capstone/issues/2582

* Alpha: fix TRAPB/EXCB/MB/WMB to decode with any Ra/Rb field

The LLVM assembler emits these barrier instructions with Ra=Rb=31,
but the decoder required Ra=Rb=0 (bits[25:16]=0), causing all
canonical encodings to fail.

Remove the CheckField constraint so any Ra/Rb combination is accepted.
The instructions carry no register operands in their decode format,
so the field values do not affect the output.

Closes: https://github.com/capstone-engine/capstone/issues/2795

* Alpha: add missing test coverage for s4addq and cvt FP variants

s4addq (register and literal forms), cvttq/svc, cvtts/sui, cvtqs/sui,
and cvtqt/sui had no MC tests despite being reachable instructions.

* Alpha: fix RET/RC/RS to decode with any register fields

RET (opcode 0x1a, bits[15:14]=10) shares identical operation semantics
with JMP/JSR/JSR_COROUTINE — all four differ only in branch-prediction
hints. The decoder incorrectly required Ra=31, Rb=26, hint=1 exactly;
any other encoding failed to decode.

RC and RS (opcode 0x18) have an unused Rb field. The decoder checked
Rb==0 (R0), but convention is to set unused fields to R31 (=31), so
any real-world encoding produced by a compiler would fail to decode.

Remove the restrictive CheckField constraints on RET, RC, and RS.
Update RETDAG's operand table to carry Ra+Rb+hint (format 18), and
add a ret printer in Alpha_LLVM_printInstruction matching the existing
jmp/jsr handling.

Tests added: ret $0,($1),3 (non-canonical RET); rc/rs $1 with Rb=R31.
2026-06-20 13:28:47 +00:00
Rot127
bc79ce54f8
Increment PRE_RELEASE version (#2940) 2026-05-29 17:01:21 +00:00
Rot127
10f4003b43
Add pre-release version to as macro (#2935)
* Add post fix version

* Ensure CS_VERSION_PRE_RELEASE can be used in comparisons.

Alpha < Beta < Stable
2026-05-28 09:19:43 +00:00
billow
4eeceba201
Add M68K ColdFire ISA support (#2927)
* regenerate arch/M68K/M68KInstructionTable.inc

* Add M68K ColdFire ISA support

* Apply suggestions from code review

Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>

* Clarify M68K EA validation and detail checks

* Normalize M68K memory operand details

* Update docs/cs_v6_release_guide.md

---------

Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2026-05-22 15:04:35 +00:00
Petar Andrić
d650f67eb2
RISCV: the Ventana vendor is missing in the API (#2917)
* RISCV: the Ventana vendor was missing in the API

* Update docs
2026-05-13 16:33:27 +00:00
Naren Sirigere
808aee0d22
Extend M680X support to HCS12X (#2898)
Signed-off-by: Naren Sirigere <sirigere.naren@gmail.com>
2026-05-02 09:04:08 +00:00
Naren Sirigere
d4e5fa0162
Change comment placements to not break const_generator.py (#2906)
Signed-off-by: Naren Sirigere <sirigere.naren@gmail.com>
2026-04-28 12:41:26 +00:00
billow
55d1eef5b2
Update m68k (#2880)
* Add support for M68060 architecture in M68K disassembler and tests

Add disassembly support for CAS instruction in M68060 and update tests

Add support for M68K CPU32 mode and new instructions

- Introduced CS_MODE_M68K_CPU32 to support the M68K CPU32 architecture in the Python bindings and C headers.
- Updated the instruction table generator to include new CPU32-specific instructions: `bgnd`, `tbls`, `tblu`, `tblsn`, and `tblun`.
- Enhanced the instruction decoding logic in `cs.c` to account for CPU32 mode.
- Added test cases for new instructions and ensured compatibility with existing M68K modes.
- Updated YAML test files to validate the behavior of new instructions under different M68K modes.

fix(M68K): fix cross-arch bugs in cpush/cinv and dc.w printing

build_cpush_cinv: use op1->reg instead of op1->imm for address
register operand. Writing to imm (uint64_t) when reg (m68k_reg,
uint32_t) is read back causes garbage values on big-endian targets
(PPC64, s390x) due to union byte order mismatch.

M68K_printInst: cast imm to uint32_t before passing to PRIx32
format. Passing uint64_t to a PRIx32 format specifier is UB; on
32-bit big-endian MIPS the high word (0) is read instead of the
low word containing the instruction bytes.

Fixes cstest details failures on QEMU Linux PPC64, s390x, Mips32.

run clang-format

fix[m68k]: ori build_imm_ea

fix[m68k]: btst

fix[m68k]: cast immediate values to unsigned int in build_imm_ea functions

* fix get_with_index_address_mode

* - Replaced specific assembly instructions with `dc.w` for invalid cases.
- Added new test cases for SBCD, PACK, UNPK, CHK.L, and coprocessor instructions to ensure correct behavior across different CPU models.
- Ensured that invalid instructions for CPU32 and 68000 are correctly identified.
- Updated expected outputs for fsdiv and PMMU related instructions to reflect their validity on specific architectures.

* Fix CMake test command to use target file reference for integration tests

* Refactor PMOVE instruction comments for clarity and accuracy in m68k.yaml

* Add tests for bitfield instructions and PC-relative addressing in m68k.yaml

* Refactor M68K instruction printing and enhance bitfield support

- Improved the M68K instruction printer by refactoring the handling of register bits and addressing modes.
- Introduced new functions for printing scale factors, index registers, and immediate values.
- Enhanced bitfield handling in the `m68k_op_mem` structure to support both static and register-encoded values.
- Updated tests to reflect changes in instruction formatting, particularly for `cinvl`, `cpushl`, and `cas2` instructions.
- Added new test cases for bitfield instructions to ensure correct parsing and output.
- Add details to tests/m68k.yaml

* Fix type casting for immediate values in addressing modes and enhance m68k architecture support in cstool

* Refactor type usage for immediate values and enhance switch handling in M68K disassembler

- Replace int with uint32_t for immediate values, register lists, and related parameters to ensure correct type handling and consistency.
- Add default cases to switch statements for improved robustness.
- Update bitfield printing to use explicit PRId8 formatting for clarity.
- Refactor detail handling in M68KInstPrinter to use helper functions for detail access.
- Minor code cleanups and improved type safety throughout disassembler logic.

* m68k: update v6 guide
2026-04-28 12:39:36 +00:00
مصطفي محمود كمال الدين
1084d365b9
Fix sysreg registers in RISC-V and modify the header patcher to not crash if a header doesn't include all tags of a generated .inc file (#2894)
* fix sysreg registers in RISC-V and modify the header patcher to not crash if a header doesn't include all tags of a generated .inc file

* add tests
2026-04-15 09:25:46 +00:00
billow
08e655c2b7
update clang-format to 20 (#2883) 2026-03-24 11:40:59 +00:00
مصطفي محمود كمال الدين
b4c39410ab
Introduce a +noaliascompressed option to selectively enable none-aliasing for compressed instrcution only but leave aliasing for the rest of instructions (#2869)
* introduce a +noaliascompressed option to selectively enable none-aliasing for compressed instrcution only but leave aliasing for the rest of instructions

* add tests and documentation comments

* fix python bindings and formatting

* add docs
2026-03-04 12:43:39 +00:00
Naren Sirigere
bb89ad7f74
Extend M680X support to RS08 (#2872)
* Extend M680X support to RS08

* Format bindings/python/capstone/__init__.py

---------

Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
2026-02-28 19:21:07 +00:00
مصطفي محمود كمال الدين
ec6428f92d
Refactoring the RISCV architecture to Auto-Sync on LLVM (#2756)
- Updated to LLVM-18
- Operands have now read/write access information
- Previously only the basic extensions and the compressed ISA was supported, now every extension supported by LLVM-18 also available (e.g. vector, crypto, ...)
- Changed register names
  * FP Regs: Instead of `RISCV_REG_F<n>_32` and `RISCV_REG_F<n>_64`, they're named `RISCV_REG_F<n>_F`
  and `RISCV_REG_F<n>_D` for n in `0..31`
- Added register names
  * Vector registes and combinations thereof `RISCV_REG_V<n>[_V<n_i>]*`, examples
    * `RISCV_REG_V21`
    * `RISCV_REG_V9_V10`
    * `RISCV_REG_V3_V4_V5`
    * etc... up to 8-register combinations
  * Half-percision (16-bit) FP registers `RISCV_REG_F<n>_H` for n in `0..31`
- Changed instruction names
  * Instructions ending in `_AQ_RL` now end in `_AQRL`
- Added instruction names: massive amount, see `include/capstone/riscv.h`
- Added `dimm` and `csr` fields inside the union data of `cs_riscv_op`, with corresponding `riscv_op_type`
  * `dimm` is used for instructions with FP immediates
  * `csr` is used for instructions with CSR systrem registes
- Added ISA flags to turn ISA extensions on and off
2026-02-01 11:53:24 +00:00
kingiler
42225ea024
fix: use uintptr_t to maintain pointer provenance (#2845)
* Use uintptr_t to maintain pointer provenance.

* Move include to proper place.
2026-01-12 12:53:34 +00:00
Carsten Elton Sørensen
630f1ae92b
M68K: add displacement size fields to disassembler (#2842) 2026-01-11 13:37:45 +00:00
Carsten Elton Sørensen
1bc76ead22
M68K: fix displacement, register naming and suppressed registers in indexed addressing modes (#2839) 2026-01-04 15:16:25 +00:00
Giovanni
198cd49dd9
Fix imm to be 64bit wide (#2840) 2025-12-30 15:55:48 +00:00
مصطفي محمود كمال الدين
9d4fb1ac5a
Minor formatting changes (#2804) 2025-10-20 12:36:39 +00:00
Rot127
40f54ce821
Add workflow to check for C code formatting and format all code with clang-format-17 (#2744)
* Add workflow to check for C formatting

Rename run-clang-tidy.sh for consistency with clang-format script

Don't align trailing comments.

It leads to unreproducable formatting.

Reformat some comments leading in-compilable up code after clang-format

Format generated compatibility header.

Add clang-format script

Be more verbose with clean-up scripts and fail early.

Pass clang-format via command line

Install clang-format for the HeaderPatcher

* Format code with clang-format-17
2025-08-27 08:50:50 +00:00
Rot127
9539045d67
Apply other VIS instruction fixes from llvm/#130967 (#2777) 2025-08-20 15:28:10 +00:00
Rot127
a4cb247c18
Fix duplication of memory operand (#2761)
* Fix invalid bounds check and return NULL in case of OOB.

* Prevent duplication of memory operands.

* Increase maximum op count for Sparc

* Fix Mips instructions with more than 10 operands.
2025-07-23 17:58:47 +00:00
R3v0LT
52329bcca1
HPPA fix mem operands access and instruction printing (#2746)
* Remove base_access

* Add spaces into instrtuction mnemonics

* Fix hppa test

* Fix common details test

* Add hppa access tests
2025-07-06 11:21:22 +00:00
Rot127
a07baf83dd
Auto-Sync update Sparc LLVM-18 (#2704)
* Add Sparc inc fils, delete old files and update AS with Sparc config.

* AS: Refuse to run differ if an old file is missing.

* AS: Refer to the RefactorGuide.md

* Add first translated Sparc files.

* Fixup SparcMCTargetDesc.h

* Fixup SparcDisassembler.h

* Fixup instruction printer.

* Fixup SparcInstPrinter

* Basic functions of Capstone module

* Fix SP sparc namespace prefix.

* Fix build script and linking

* Fix disassembler not actually reading bytes.

* Match \!encoding in llvm-mc output (Sparc has this).

* Add Sparc LE and and make v9 a feature to enable.

* Update test files for Sparc

* Fix tests.

* Add assembly tests

* AS: Add settings to use assembly tests.

* Test fixes

* Fix typos

* Add reg and imm details.

* Add mem details and instruction formats.

* Handle condition codes.

* Formatting

* Add hints.

* Add membar and asi tags

* Update Python bindings

* Add asi and membar to cstest

* Restructure test file

* Capstone fix for llvm-project/#139284.

* Fix branch detail tests

* Handle faulty mem operand defintions.

* Add membar and asi tests

* Add one more branch instruction test.

* Add missing call alias

* Fix tests.

Updated after fixing branch disponents.
Issues with the generated assembly tests. The assembly tests don't check the feature flags enabled. And hence V9 tests are added to the none V9 test file.

* Fix alias lookup with , in the asm_text

* Fix common detail tests.

* Fix issue.yaml

* Add Sparc changelog

* Add changelog for Sparc to v6 guide

* Fix incorrect translated array size check.

* Reading the ISA and thinking would help...
This is not how alignment is calculated -.-

* Fix call targets

* Remove 'real' BA instruction (which is only an alias).

* Add missing property getters.

* Add missing format details

* Set correct detail struct

* Support access detail testing for Sparc.

* Add hard-coded special registers tbr, wim, psr

* Add alias tests for call and ba.

* Fix copy paste mistake.

* Add note about big/little endian into guide.

* Add implied flag for SparcV9

* Format

* Store CC field consistently in an extra field.

The CC field used was sometimes stored as register,
sometimes as not at all.
Now it is consistently stored in a separated field.

* Add an invalid ASI tag.

* Fix LDSTUB/A memory access and incorrect operand details.

* Handle condition codes more elegantly.

Also fixes bugs with wrong cc fields, or missing fields.

* Add separation ; character for assembly tests.

* Apply fix from llvm-project/#143232

* Use enum types for memory operands

* Update Pythyon constants
2025-06-24 12:45:34 +00:00
Chen
21ce362438
Use cs_ac_type for operand access mode in all arches and use cs_xtensa_op_type for Xtensa operand type (#2721)
* Xtensa: use cs_xtensa_op_type for operand type, and use cs_ac_type for operand access mode

To explicitly tell the user the possible values of the operand
type/access mode.

Also drop the unused XTENSA_OP_MEM_REG and XTENSA_OP_MEM_IMM.

* Use cs_ac_type for operand access mode in all arches

Currently, some arches use uint8_t for operand access mode, while others
use cs_ac_type. Use cs_ac_type uniformly.

* M680X: use cs_ac_type directly, instead of adding another e_access type

* Change access type to c_uint to follow c-side changes to cs_ac_type

* Document operand access type change to enum
2025-06-05 11:49:20 +08:00
Rot127
87908ece5b
Add flag for the SoftFail case of the LLVM disassembler. (#2707) 2025-05-26 21:39:17 +08:00
Chen
146122727e
ARM: fix typo, cspr -> cpsr (#2716) 2025-05-26 10:58:41 +08:00
Rot127
fc525c7326
Apple AArch64 proprietary (#2692)
* Fix: In case of combat header AArhc64 should be defined by ARM64

* Add Apple proprietary AMX extension.

* Refine docs about Auto-Sync update

* Add Mul53 instructions.

* Fix accidentially removed memory information.

* Add gexit, genter, wkdmd, wkdmc instructions.

* Add sdsb and at_as1elx

* Update Python bindings.

* Fix typo.
2025-05-06 12:14:13 +08:00
Tim Haines
98a393e34d
Stringify BH fields when printing ppc details (#2663)
* Stringify BH fields when printing ppc details

This extends #2662.

* Add clarification for 'at' bits in BO field

* Fix Doxygen comment
2025-04-04 13:39:09 +08:00
Leon Hwang
2607d0f39a
Remove undefined constants in riscv_const.py (#2660) (#2661)
The following constants are undefined in `capstone/include/capstone/riscv.h`.

So, remove them as those were commented in `riscv.h`.

Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
2025-04-02 19:20:35 +08:00
Rot127
bb2f657973
Enhance shift value and types of shift instructions. (#2638)
* Enhance shift value and types of shift instructions.

Shifts via registers now save the register id in cs_arch64_op.shift.value
and set the shift type accordingly.

* Sort table
2025-03-09 22:11:53 +08:00
Rot127
cd282ef593
Update operand type enums of all arch modules to the one in capstone.h (#2633)
* Set all operand types to the main CS_OP_ types from capstone.h.

* Add test cases from issue.
2025-03-03 11:59:24 +08:00
Giovanni
ace8056ca8
Add aliases mapping for MIPS & test for id, alias_id (#2635) 2025-02-26 23:42:31 +08:00
Rot127
d7ef910bc6
Rebased #2570 (#2614)
* Add ARC files

* Added ARC files for successful compilation

* Refactor ARC files

* Add ARC c/cs tests

* Add ARC python test/bindings

* Add ARC to CI/CD

* Avoid omitting parameter names

* Update cs files

* Fix ARC bugs

* Update ARC python bindings

* Refactor and update ARC test files

* Add detail flag to arc test

* Fix ARC test problems

* Fix ARCMapping compile error

* Replace __CHAR_BIT__ to CHAR_BIT

* Add credits and ARC info

* Update ARC to match the latest next

* Python formatting

* Remove asserts on 'Unknown condition code passed'

* Add ARC to some more documentation

* Add ARC to Targets constants

* Add ARC support to llvm-tblgen

* Replace asserts & add Expr handling

* Check DecodeGPR32RegisterClass return value

* Fix fieldFromInstruction patch

* Refactor ARC

* Reformat python files

* Fix incorrect import

* Update inc files and insn names

* Update python files

* Disable AArch64 Linux wheel build due to https://github.com/capstone-engine/capstone/issues/2615.

---------

Co-authored-by: R33v0LT <sibirtsevdl@gmail.com>
2025-01-28 22:34:24 +08:00
Andelf
3060117630
Apply new EVM opcode updates (#2602)
* evm: apply new opcode updates and add test cases

* evm: use predefined invalid opcode 0xfe

* python: add CsInsn.is_invalid_insn to bypass evm issue
2025-01-28 20:51:43 +08:00
Changqing Jing
3c4d7fc8d6
Add tricore tc1.8 instructions (#2595)
* Add tricore tc1.8 instructions:
add.df
sub.df
madd.df
msub.df
mul.df
div.df
cmp.df
max.df
min.df
min.f
max.f
dftoi
dftoiz
dftoin
ftoin
dftou
dftouz
dftol
dftoul
dftoulz
abs.f
abs.df
dftolz
neg.df
neg.f
qseed.df
itodf
utodf
ltodf
ultodf
dftof
ftodf

* Fix python binding

* Fix python binding

* add tricore tc1.8 instructions
div64
div64.u
rem64
rem64.u

* add tricore tc1.8 instruction to tests/details

* Fix review
2025-01-28 20:50:43 +08:00
Giovanni
8629313600
Fix LoongArch aliases and CS_OPT_SYNTAX_NO_DOLLAR support (#2594)
* Fix CS_OPT_DETAIL_REAL & CS_OPT_SYNTAX_NO_DOLLAR support in LoongArch

* Fix comment
2025-01-06 18:12:44 +08:00
Roee Toledano
812e654c85
Update BPF arch (#2568) 2024-12-15 20:46:45 +08:00
Rot127
b25aa84142
PPC regressions (#2575) 2024-12-15 14:05:26 +08:00
Adam Satko
0a29bf8001
Small arm64 compat header fixes (#2563)
* Small compat header fixes

* Add ARM64_CC_NV to header patcher
2024-12-05 18:16:36 +00:00
Rot127
ef74d44908
Arm regressions (#2556)
* Fix: Set writeback for AddrMode5 operands with W=1

* Fix memory acccess of vector load instructions.

* Remove unused files.

* Fix operands of RFED instructions

They have now memory operand and
the writeback flag is set accordingly.

* Fix: Remove invalid mnemonic enum adr_

* Add missing NULL check
2024-12-05 19:27:41 +08:00
Rot127
93a104c009
PPC LLVM 18 (#2540)
* Update PPC module to LLVM 18.

**New**

(According to LLVM changelog)

- Added DFP instruction.
- Added the SCV instruction.

**Changes**

- Memory decoder were simplified by decoding disponent and base reg separately.
- `DFORM` -> `DFORM_BASE`
- Use inverted `MCInstDesc` table.
- Replace the many declared printer in PPCInstPrinter with `static inlines`.
- Renamed groups to upper case.
- Switched to `ARCH_add_cs_detail_X()` function names.
- Remove `PPCInstPrinter.h` because it is no longer used.

* Fix: Use correct directory name.

* Fix segfaults and add asserts for these NULL cases.

* Allow to map a single LLVM option to multiple CS options

* Add default endian option to the MCUpdater

* Fix setter for Little endian

* Add SPE option to cstool

* Fix QPX instructions.

Due to 4b43ef3e5c
the names of the operands were matched.
Because FRT dosn't exist in the XForm_1 class,
the generated tables didn't decoded them.

* Fix: AbsAddr should be printed as unsigned.

* Fix S12 immediate printing for PC memory operands

* Fix MCUpdater tests

* Update PPCRegisterInfo_stripRegisterPrefix

* Add support for selection of Power versions

* Run clang-format

* Fix feature check

* Allow to overwrite in multi-mode

* Add some more flags

* Fix order and map name

* Add new test files.

* Fix checks for features.

Only enables PowerX feature checks of a Power architecture is enabled
and the feature is in the list of it.

* Print byte sequence with space between comma.

This helps with copy and search of the byte string in the test files.

* Fix tests broken due to feature toggles

* Shorten generated names.

* Update bindings
2024-12-05 19:26:33 +08:00