Skip to content

Incorrect motivation for stack pointer swapping #753

@reosdev

Description

@reosdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions