In the disassembly mov.w r0,#0x40000000; vmsr fpexc, r0 is displayed as coprocessor_moveto(10,7,0,0x40000000,in_cr8,in_cr0); which is because the instruction doesn't seem to be implemented.
But mov.w r0,#0x0;vmsr fpscr,r0; is skipped entirely in the disassembly view!
To Reproduce
Disassemble and decompile the bytes:
bf f3 6f 8f
4f f0 80 40
e8 ee 10 0a
4f f0 00 00
e1 ee 10 0a
Expected behavior
In the disassembly view the floating point instructions should be displayed correctly (like in hopper disassembler).
Describe the bug In the following file https://github.com/NationalSecurityAgency/ghidra/blob/7381dd3bd0ffb5949f1fbc685b527b5c0965ce10/Ghidra/Processors/ARM/data/languages/ARMneon.sinc Only FPSCR seems to be handled, but not the other floating point registers. Looking at https://developer.arm.com/documentation/ddi0274/h (DDI0274H_vfp11_r1p5_trm.pdf) For example at 2.4 Loading operands from ARM1136JF-S registers i can see mentioning of several other registers which are not mentioned anywhere in ARMneon.sinc like
FPSID, (FPSCR), FPEXC, FPINST, or FPINST2
. Ghidra only seems to care aboutFPSCR
but ignore everything else.This causes the following (incorrect) disassembly:
Hopper disassembles this to
You can see that
fpexc
isn't handled correctly in ghidra (nor are any other registers except forfpscr
).Furthermore, when decompiling the following segment:
we get
In the disassembly
mov.w r0,#0x40000000; vmsr fpexc, r0
is displayed ascoprocessor_moveto(10,7,0,0x40000000,in_cr8,in_cr0);
which is because the instruction doesn't seem to be implemented. Butmov.w r0,#0x0;vmsr fpscr,r0;
is skipped entirely in the disassembly view!To Reproduce Disassemble and decompile the bytes:
Expected behavior In the disassembly view the floating point instructions should be displayed correctly (like in hopper disassembler).
In the decompilation view the moves to the registers should be visible somehow. For example something like:
Environment (please complete the following information):