capstone/suite/MC
R3v0LT 9daa1ffbac
Add HPPA(PA-RISC) architecture (#2265)
* Refactor HPPA

* Add full HPPA 1.1 instructions support

* Add HPPA 1.1 cs tests

* Fix HPPA dissassembler

* Add HPPA 2.0 instructions

* Add HPPA tests

* Fix HPPA disasm & printer

* Update HPPA tests

* Remove unused code

* Add implicit register access info & Refactor HPPA main files

* Add python bindings/tests and cstests

* Fix HPPA disasm wrong decoding

* Rewrite invalid test cases

* Update HPPA python constants

* Make HPPA python test executable

* Change HPPA python tests sequence to match c tests

* Refactor HPPA main files

* Write target instead of offset in details

* Add HPPA detail function support in cstest

* Rewrite targets in branch tests

* Make correct string modifier addition

* Add hppa test calls

* Add zero operands check

* Remove MCOperand array

* Change immediate values printing

* Add HPPA 2.0 wide support

* Fix invalid break instruction decode

Remove unused code

* Add HPPA to fuzzing tests

* Add HPPA to options

* Add HPPA to docs

* Refactor HPPA

* Fix invalid branch insn decoding

* Add HPPA to labeler

* clang-format hppa files

* Document internal structures and minor refactoring

* Add missing default statements

* Fix invalid default statement
2024-03-26 13:58:56 +08:00
..
AArch64 Architecture updater (auto-sync) - Updating AArch64 (#2026) 2023-11-15 12:12:14 +08:00
Alpha add Alpha big-endian (#2227) 2024-01-02 13:02:38 +09:00
ARM Fix running cstest in CI (#2126) 2023-08-06 18:28:52 +08:00
BPF Merge pull request #1886 from terorie/ebpf-callx 2022-06-09 21:37:40 +08:00
HPPA Add HPPA(PA-RISC) architecture (#2265) 2024-03-26 13:58:56 +08:00
Mips fix MC 2019-02-26 15:41:04 +08:00
PowerPC Add regression tests for QPX (#2169) 2023-09-24 11:09:53 +08:00
RISCV RISCV support ISRV32/ISRV64 (#1401) 2019-03-09 08:41:12 +08:00
Sparc fix MC 2019-02-26 15:41:04 +08:00
SystemZ fix MC 2019-02-26 15:41:04 +08:00
TriCore [TriCore] Replace one- and sign-extend with MathExtra.h functions. (#2212) 2023-12-03 19:15:17 +08:00
X86 x86: fix testcase of MOVSD 2020-05-07 21:51:54 +08:00
README Architecture updater (auto-sync) - Updating ARM (#1949) 2023-07-19 17:56:27 +08:00
Update.py Architecture updater (auto-sync) - Updating ARM (#1949) 2023-07-19 17:56:27 +08:00

## Input files for testing Capstone engine.

Input files used to test instructions of architectures and modes.

The test cases are taken from `llvm/test/MC`. Note that the LLVM tests
are for **encoding** of instructions (`asm_string -> bytes`).

We test the decoding (`bytes -> asm_string`).
A few tests might decode to a different asm string than
used to encode the instruction (because the behavior
of instructions can be equivalent).

Fix the obvious broken tests first and test the rest
against `llvm-objdump`.

### Update test files

Run the update script with the paths to LLVM's `MC` test directories

```
cd capstone/suite/MC
./Update.py -a <ARCH> -d llvm-project/llvm/test/MC
./Update.py -a <ARCH> -d llvm-project/llvm/test/MC/Disassembler
```

You can update more fine grained. Check the help to get the possible options.

### Test file formatting

**Format of input files:**
```
# ARCH, MODE, OPTION
hexcode = assembly
```

**Example**
```
# CS_ARCH_ARM, CS_MODE_ARM+CS_MODE_V8, None
0xa0,0x0b,0x71,0xee = vadd.f64 d16, d17, d16
...
```

**Format of issue file:**

```
!# ARCH, MODE, OPTION
hexcode = assembly | regs_read | regs_read_count | regs_write | regs_write_count | groups | groups_count
```

**Example**
```
!# CS_ARCH_ARM64, CS_MODE_ARM, CS_OPT_DETAIL
0xc0,0x1e,0x0c,0x4e == mov v0.s[1], w22 ; operands[0].vas: 0xb ; operands[0].vector_index: 1
...
```