Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Account for cpu cycles that occur when entering an exception #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jwestfall69
Copy link
Contributor

I wasnt able to find any docs that indicate how many cpu cycles it takes
to enter an exception. I ended up going with 10, which is how many it
takes to leave an exception (reti). However I suspect entering an
exception is really going to be a few more then that.

The added cpu cycles are applied to the first instruction executed in
the exception.

I wasnt able to find any docs that indicate how many cpu cycles it takes
to enter an exception.  I ended up going with 10, which is how many it
takes to leave an exception (reti).  However I suspect entering an
exception is really going to be a few more then that.

The added cpu cycles are applied to the first instruction executed in
the exception.
@yupferris
Copy link
Member

CI checks look like a fluke; restarted both builds.

@yupferris
Copy link
Member

I think the logic here is ok, and 10 is sensible given we need to pick something and the docs don't mention this afaik. However I'm not sure I like applying the cycles to the next instruction very much, as it wouldn't look good in traces etc. I'm wondering if instead we should make the next call to step just wait this many cycles and not execute any instructions? I think it'd make the logic a bit more clear, but I'm not sure if that's the best approach. What do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants