capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, 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

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

TIHan opened this issue · comments

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, .,