3 ms·
Ghidra uses an intermediate language called p-code. When defining the CPU opcodes (and how to parse them), you also write a small snippet of p-code that represe
by pd0wm 5y ago
Ghidra uses an intermediate language called p-code. When defining the CPU opcodes (and how to parse them), you also write a small snippet of p-code that represent that instruction. This makes the decompiler architecture agnostic.
Example: https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Processors/V850/data/languages/Instructions/Arithmetic.sinc https://github.com/NationalSecurityAgency/ghidra/blob/master...
- markus_zhang 5y agoThanks, I see. So it means anyone can add any architecture to Ghidra.