Features
Utilized GNU FR60 cross compiler to generate ghidra p-code test suite and validate decompilation logic. Identified following issues:
LDM
Byte order reversed fromSDM
, not reflected in decomp - [FIXED]- Branch instruction delay slot ordering not accurate to runtime. Branch flag read before delay slot, but delay slot still executes before branch. - [FIXED]
- Few off by one errors with
ENTRY
andLEAVE
- [FIXED] DIV
instructions not accurate - [TODO]
These changes allow emulating of FR60 processor code within ghidra (with the exception of the DIV instructions). The few fixes identified, especially the one around delay slots, greatly improve readability of -O3
code with large number of branches.