Skip to content

exception/interrupt handlers optimizations #1013

@algrobman

Description

@algrobman

Hi the tool creates very long interrupt handlers, significantly reducing the tests efficiency. Having often interrupts or exceptions (testing illegals)
more than 90% of time the same exception/interrupt handlers code will be executed.
I see few areas where these can be optimized:

  1. the handlers save/restore all GPRs, although only very few (in most cases just only 2 GPRs are used in the handlers) - so only these two to be saved/restored
  2. most often exception is illegal instruction one, but its check is placed as last in the mcause checks chain. Move the illegal to the beginning of the chain saves a lot of simulation cycles (time),
  3. not sure what the kernal SP exchange with reserved sp register at the beginning and the end of the handler is for, why can't the kernal SP be used as a base register directly for saving GPRs?

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