Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mstatus should be cached on reads. #1219

Open
en-sc opened this issue Jan 29, 2025 · 1 comment
Open

mstatus should be cached on reads. #1219

en-sc opened this issue Jan 29, 2025 · 1 comment

Comments

@en-sc
Copy link
Collaborator

en-sc commented Jan 29, 2025

There is an issue: mstatus shares fields with other registers. See #1217.
Therefore simply caching mstatus on reads is not possible.
However, caching mstatus on reads allows to greatly reduce the number of register accesses in a typical Debug session.
The task is:

  1. Measure the impact of caching mstatus on reads -- maybe it's actually not that crucial?
  2. Come up with an approach that allows to cache mstatus (e.g. invalidate mstatus when accessing all the registers that mirror an mstatus field).
@JanMatCodasip
Copy link
Collaborator

JanMatCodasip commented Jan 30, 2025

Perhaps some form of "impact list" could be implemented for the cached registers: Invalidate the cached register value if any register on its "impact list" is written to.

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

No branches or pull requests

2 participants