Showing changes from revision #0 to #1:
Added | Removed | Changed
Entry | |
---|---|
R0 | Context pointer (-2 for current context) |
R1 | R12 value associated with context (only relevant if R2 indicates a PC value inside the floating point undefined instruction handlers) |
R2 | PC value associated with the context (e.g. the PC value the IRQ handler would normally return to) |
Exit | |
---|---|
R0 | Pointer to frame associated with original non-recursive entry to the floating point system if R2 indicated a PC value inside the floating point undefined instruction handlers, otherwise zero |
The purpose of this call is to handle a FPE Abort.
It is important in some cases that it should be possible to abort some partially complete floating point processing.
Some examples:
When floating point processing is to be abandoned, three important things may be required:
Finally, note that when a context is deactivated, any pending exception for it is stored away without causing the undefined instruction vector to be entered at the time: the actual processing will occur later. So it is possible for inactive contexts to contain pending exceptions, and not just for the currently active context.
This call cancels any pending exception and aborts any incomplete floating point processing associated with a given floating point context. It returns the frame pointer associated with the original non-recursive entry to the floating point undefined instruction handler, and restores any floating point registers that have been used for internal calculations. It does not restore contents of this original frame, of other mode registers or of floating point registers that have been updated as a result of the partial processing of the original non-recursive floating point instruction.
If register values are required, the stack frame has the following format:
[R0, -8]: (on RISC OS 4 or later) Value of SPSR_undef immediately after entry to the undefined instruction handler – i.e. value of CPSR before entry to the undefined instruction handler;
[R0, -4]: (on RISC OS 4 or later) Value of CPSR immediately after entry to the undefined instruction handler;
[R0, 0]: Value of user R0 immediately after entry to the undefined instruction handler;
[R0, 4]: Value of user R1 immediately after entry to the undefined instruction handler;
[R0, 8]: Value of user R2 immediately after entry to the undefined instruction handler;
[R0, 12]: Value of user R3 immediately after entry to the undefined instruction handler;
: :
: :
: :
[R0, 52]: Value of user R13 immediately before entry to the undefined instruction handler;
[R0, 56]: Value of user R14 immediately before entry to the undefined instruction handler;
[R0, 60]: The return link from this undefined instruction call, including the PSR bits for RISC OS 3;
[R0, 64]: This is the location pointed to by the stack pointer (R13_svc in RISC OS 3, R13_undef in RISC OS 4 or later) before entry to the undefined instruction handler.
Contexts are only available from FPEmulator 4.12 and later.