To ensure fast interrupt handling, this extension introduces an instruction to accelerate conditional stack pointer swapping.
The motivation is wrong. Fast interrupt handling does not require stack pointer swapping. Reserve stack space for interrupt context on each thread's stack. Handle interrupts on the current stack.
The swapping instruction itself takes cycles. Checking conditions, reading/writing CSRs adds overhead. This makes handling slower, not faster. Stack swapping may be desired for security/isolation (separate privilege level stacks) or stack overflow protection. But these are safety reasons, not performance reasons.
The motivation is wrong. Fast interrupt handling does not require stack pointer swapping. Reserve stack space for interrupt context on each thread's stack. Handle interrupts on the current stack.
The swapping instruction itself takes cycles. Checking conditions, reading/writing CSRs adds overhead. This makes handling slower, not faster. Stack swapping may be desired for security/isolation (separate privilege level stacks) or stack overflow protection. But these are safety reasons, not performance reasons.