mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-30 08:50:42 +00:00
9daa1ffbac
* 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 |
||
---|---|---|
.. | ||
AArch64 | ||
Alpha | ||
ARM | ||
BPF | ||
HPPA | ||
Mips | ||
PowerPC | ||
RISCV | ||
Sparc | ||
SystemZ | ||
TriCore | ||
X86 | ||
README | ||
Update.py |
## 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 ... ```