rustual-boy icon indicating copy to clipboard operation
rustual-boy copied to clipboard

Account for cpu cycles that occur when entering an exception

Open jwestfall69 opened this issue 8 years ago • 2 comments

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.

jwestfall69 avatar Mar 18 '17 21:03 jwestfall69

CI checks look like a fluke; restarted both builds.

yupferris avatar May 04 '17 17:05 yupferris

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?

yupferris avatar May 04 '17 17:05 yupferris