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.61k stars 1.56k forks source link

ARM64: Invalid decoding of constant for predicated instructions `fadd`, `fsub`, `fsubr`, `fmul`, `fmax`, `fmaxnm`, `fmin`, `fminnm` #2268

Closed TIHan closed 4 months ago

TIHan commented 9 months ago

ARM64 Example hex: 00805865

When using cstool, the output is: fadd z0.h, p0/m, z0.h, #0.0

when it should be: fadd z0.h, p0/m, z0.h, #0.5

There are more instructions (listed below) that have the incorrect interpretation of the i1 field. The decoder doesn't produce valid constants for those instructions.

FADD ., /M, ., FMAX ., /M, ., FMAXNM ., /M, ., FMIN ., /M, ., FMINNM ., /M, ., FMUL ., /M, ., FSUB ., /M, ., FSUBR ., /M, .,