capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.

Home Page:http://www.capstone-engine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Auto-Sync] Smarter MC test generator

Rot127 opened this issue · comments

Feature

  • New architecture module
  • Support for processor extension
  • Add more instruction details (elaborated below)
  • Binding support for: language
  • Other (elaborated below)

Describe the feature you'd like

The MC regression tests from LLVM are our basis of testing. But generating them is a not simple task. Because we either copy them with grep or some scripts which do the same.

This misses test cases though. And because there are so many it is easy to miss new ones.
The test files are difficult to parse, because they don't follow a well defined format.

It would be good to have a different approach to copy the test cases. It should not involve grep or regex with Python. It should guarantee that every regression test from LLVM is in our repo.

Additional context

A possible solution is to run all test cases. Because they are passed to llvm-mc we could add the show-encoding option and parse the output from there (which is easier).