#instructions #hexagon #version #yaxpeax-hexagon #earlier #extenders

no-std yaxpeax-hexagon

Qualcomm Hexagon decoder for the yaxpeax project

1 unstable release

new 0.1.0 Apr 14, 2025

#407 in Testing

0BSD license

390KB
7.5K SLoC

yaxpeax-hexagon

crate documentation

Qualcomm Hexagon decoder implemented as part of the yaxpeax project, implementing traits provided by yaxpeax-arch.

support is good enough to make sense of many programs, but not complete:

  • instructions mentioned in the V62 and V73 manuals.
  • system instructions documented in V62 and earlier
  • undocumented system instructions in V73 and later
  • non-HVX vector instructions
  • constant extenders
  • duplex instructions
    • implemented, but poorly tested
  • HVX (in any version)

between V67 and V73, Qualcomm decided to remove most mentions of the Hexagon supervisor mode from their manuals. the LLVM target has had support for these instructions since late 2023, so LLVM-derived disassemblers should support them. it is not immediately clear to me that system instructions have the same encodings or semantic on later architectures - i largely lack programs known to target newer versions to validate that disassembly still looks reasonable.

Hexagon in real use seems to rely on a hypervisor (probably Qualcomm-maintained? similar to their minivm?) which system instructions are intended to support, then "User" and "Guest" modes which are more openly documented in public manuals. none the less, hexagonMVM uses these now-undocumented system instructions for system register management, TLB management later on, traps, and so on. these system instructions are also important to process to make sense of the entrypoints of in-the-wild Hexagon firmware images.

features

  • #[no_std]
  • exists (this is not the only Hexagon disassembler by any means)

mirrors

the canonical copy of yaxpeax-hexagon is at https://git.iximeow.net/yaxpeax-hexagon/.

yaxpeax-hexagon is also mirrored on GitHub at https://www.github.com/iximeow/yaxpeax-hexagon.

see also

  • idp_hexagon: IDA pro module for Hexagon. heavily derived from LLVM.
  • llvm
  • r2hexagon: radare2's Hexagon disassembler. generated from manuals.
  • hexag00n: python-based Hexagon disassembler with IDA plugin
  • hexagon: another IDA pro processor module. wrapper for Sourcery CodeBench.
  • nogaxeh: another IDA pro processor module
  • rz-hexagon: Hexagon disassembler for rizin. generated from LLVM.

changelog

a changelog across crate versions is maintained in the CHANGELOG file located in the repo, as well as online.

Dependencies

~290KB