How to read/write FPSCR on Cortex-A9?
I'm working on a ARM Cortex-A9 based system running software that uses
nested interrupts; however, the method for implementing nested interrupts
seems to be flawed as floating-point values and operations can get
corrupted.
To mitigate this I'm trying to save the states of the floating-point
registers when entering an interrupting routine. The method I'm trying for
FPSCR is this:
asm ("VMRS %0, FPSCR " : "=r" ( savedReg)); //Save
asm ("VMSR FPSCR, %0 " : "=r" ( savedReg)); //Restore
The read seems to work but not the write, it causes the A9 to reboot.
Is it possible to access the FPSCR in this way? What other method is
recomended?
No comments:
Post a Comment