ghidra
ghidra copied to clipboard
Add Hexagon Assembly Language Support
Describe the solution you'd like A clear and concise description of what you want to happen.
I'd like the hexagon architecture to be added to ghidra. Currently there is no support for this assembly language.
The programmer's reference manual can be found here: https://developer.qualcomm.com/software/hexagon-dsp-sdk/tools
It gives an overview of the hexagon architecture and provides the instruction set encoding.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Currently this architecture is not supported. There are IDA plugins to support this but I cannot afford to buy IDA and it would be nice to have support in ghidra.
There is a closed issue where someone laid some ground work to add support for this assembly language but it was closed #315. I have implemented a number of ALU operations in SLEIGH and would like additional help in finishing the instruction set.
For what it's worth, the source code (along with prebuilts) for the old gcc releases targeting Hexagon appear to be mirrored under https://mirrors.edge.kernel.org/caf_patches/quic/hexagon/4.0/index.html
Edit: It seems like a more recent version can be found under https://mirrors.edge.kernel.org/caf_patches/quic/hexagon/V5/, which has both hexagon
and qdsp6
targets.
These contain QDSPv6 instruction definitions under source/gcc/gcc-4.4/gcc/config/qdsp6/
(check out qdsp6.md
, builtins.md
etc).
Not sure how useful this would be to anyone, but perhaps these can be converted to SLEIGH definitions or used to further aid in adding Hexagon support to Ghidra.
omega bump
PSA: QEMU version 6.0+ has also received Qualcomm Hexagon DSP support: https://github.com/qemu/qemu/blob/v6.0.0/target/hexagon/README, it seems to be based based on https://github.com/revng/qemu-hexagon