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

Prefetch one more word #141

Open
larsbrinkhoff opened this issue Apr 20, 2016 · 4 comments
Open

Prefetch one more word #141

larsbrinkhoff opened this issue Apr 20, 2016 · 4 comments

Comments

@larsbrinkhoff
Copy link
Member

More completely model the IRC/IR/IRD prefetch queue.

@stefanberndtsson
Copy link
Member

Can this be done in a way compatible with the old cpu code?

@larsbrinkhoff
Copy link
Member Author

Yes, I think so. I started doing that a week ago, but ran into a dead end.

But there's a great advantage in having the old instructions work more correctly, because they're mixed with the new instructions.

@larsbrinkhoff
Copy link
Member Author

Basically, all instructions that do a bus_read_<byte/word/long> from cpu->pc, have to be changed to use fetch_instr instead.

Also, there's some trickery going on with cpu->pc being incremented or not. I'm guessing that the old ea_read functions can be part of a read-modify-write operation, in which case the PC should be left untouched until the ea_write is done?

@larsbrinkhoff
Copy link
Member Author

One possible shortcut would be to have all old instructions clear out the prefetch queue at the beginning, and fill it at the end according to the value of cpu->pc.

This quick-and-dirty hack would only be to provide an execution environment for the new clocked instructions.

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