xref: /aosp_15_r20/external/capstone/suite/test_mc.sh (revision 9a0e4156d50a75a99ec4f1653a0e9602a5d45c18)
1*9a0e4156SSadaf Ebrahimi#!/bin/sh
2*9a0e4156SSadaf Ebrahimi
3*9a0e4156SSadaf Ebrahimi# This script test all architectures by default.
4*9a0e4156SSadaf Ebrahimi# At the output are all the mismatches between Capstone (CS) & LLVM (MC).
5*9a0e4156SSadaf Ebrahimi# While most differences coming from the fact that Capstone uses more friendly
6*9a0e4156SSadaf Ebrahimi# number format, some mismatches might be because Capstone is based on older
7*9a0e4156SSadaf Ebrahimi# version of LLVM (which should be fixed in the next release)
8*9a0e4156SSadaf Ebrahimi
9*9a0e4156SSadaf Ebrahimifind MC/ -name *.cs | ./test_mc.py
10*9a0e4156SSadaf Ebrahimi
11*9a0e4156SSadaf Ebrahimi# To test just one architecture, specify the corresponsing dir:
12*9a0e4156SSadaf Ebrahimi# $ find MC/X86 -name *.cs | ./test_mc.py
13*9a0e4156SSadaf Ebrahimi
14*9a0e4156SSadaf Ebrahimi# To test just one input file, run test_mc.py with that file:
15*9a0e4156SSadaf Ebrahimi# $ ./test_mc.py MC/X86/x86-32-fma3.s.cs
16