You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To correctly handle the X prefix, the SWI handler (in tube-swi.c) would need to install a temporary error handler. This would restore the original error handler, unwind the call and return to the caller with the V bit set. A non-error would also need to restore the original error handler and return with the V bit clear.
See #200 for how this was done in the RISC-V ECall Handler
The text was updated successfully, but these errors were encountered:
It's not currently working, because when generating an error the privilege level reduces to user mode . So the SWI handler ends up completing in user mode, and then hits a privileged instruction which causes an exception.
(Setjmp/Longjmp doesn't preserve the current privilege level)
There probably needs to be a way to specify that an error handler is run in supervisor mode.
See discussion here:
https://stardot.org.uk/forums/viewtopic.php?p=424768#p424768
To correctly handle the X prefix, the SWI handler (in tube-swi.c) would need to install a temporary error handler. This would restore the original error handler, unwind the call and return to the caller with the V bit set. A non-error would also need to restore the original error handler and return with the V bit clear.
See #200 for how this was done in the RISC-V ECall Handler
The text was updated successfully, but these errors were encountered: