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.
http://www.capstone-engine.org
7.18k stars 1.52k forks source link

Add documentation about LLVM imported `FEATURE` groups. #2359

Open Rot127 opened 1 month ago

Rot127 commented 1 month ago

Feature

Describe the feature you'd like

We should document somehow the feature groups which are copied from LLVM. This is important because the naming can lead to confusion as in https://github.com/capstone-engine/capstone/issues/2343.

LLVM uses the feature flags to decide if it can assemble a certain instruction or not. Flags like HasSMEorSME means "if either of the features is enabled, use the instruction". While in the Capstone disassembly context, it might get casually interpreted as "is defined in both extensions", which doesn't need to be the case.

Also it is useful in general.

Additional context none