-
Notifications
You must be signed in to change notification settings - Fork 4
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
Prefetch Everywhere #123
Prefetch Everywhere #123
Conversation
There was one strange thing I stumbled across: prefetch in the old The clocked |
I think that old MOVEM stuff was just a mistake. Things went a bit quick to stuff cpu_prefetch-lines in there. |
3203df8
to
1698145
Compare
I think we need to find a way to introduce the irc/ir/ird steps of the prefetch (and stop loading yacht-"p":s manually). To make the clocked instructions and a proper generic EA there, the current naive prefetch doesn't really cut it, and trying to make both of them work at once doesn't really seem sensible. |
Yes, my next step was to do the full IRC/IR/IRD thing. This work only applies to the old CPU. |
Ahh... Good.. It'll help a lot in clocked stuff :) |
I keep forgetting to state why I'm making a change. The overall purpose of this work is to:
All instructions with a prefetch cycle last will effectively be synchronised with the MMU. That should take care of the first point. Special attention to the bus accesses in |
5d633fd
to
7d9bb4a
Compare
@stefanberndtsson I added proper prefetch to all clocked instructions. Due to the use of |
This step adds prefetch to all instructions used to boot to the Desktop, and running various programs.
Adds prefetch to untested instructions.
36969f7
to
b718bef
Compare
Even though there is still more prefetch work to do, I consider this useful and complete enough to submit for merging. All instructions now do some prefetching. When running from RAM, this synchronises the CPU with the MMU bus cycles. So wait states can be done properly. Also, the new clocked instructions can now work with the prefetch queue, and do prefetch bus cycles in the right places. |
Level 16 Full Screen Demo now works fully, including the first part with PSG accesses. BIG Demo still loads. Phalanx Demo F1 took a hit. Sometimes the lower border switch to low resolution comes too late. Probably related to exception timing. |
This makes all instructions do one prefetch cycle. So far I have not considered the placement of the prefetch inside the old instructions. The clocked instructions does it right, except some should also have an additional prefetch.
The treatment of instructions using
ea_set_prefetch_before_write
is not very good. Presumably, EA calculation should fetch words from the prefetch queue, and refill it.