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
JIT: avoid saving the PC on every store #807
Conversation
|
@JMC47 can we get some estimates of impact on some games, like VC titles which are usually CPU bound? |
|
Also, LGTM, nice change. Almost 0 overhead for unpredicted RAM writes now. |
|
NICE BENCHMARK STATS |
| @@ -220,6 +222,14 @@ const u8 *Jitx86Base::BackPatch(u8 *codePtr, u32 emAddress, void *ctx_void) | |||
| else | |||
| { | |||
| // TODO: special case FIFO writes. Also, support 32-bit mode. | |||
| it = pcAtLoc.find(codePtr); | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
It would be slightly faster to use one map containing both PC and registersInUse, rather than a map for each. |
|
I was thinking of that, but wasn't sure it was the best idea, because PCs are only needed for stores, not loads, I think. |
|
Looking through the code, I found only one place were the program counter is actually read during a write. It's a single debug message inside AudioInterface.when you write to the AI_INTERRUPT_TIMING io address. |
|
Isn't it read in the case of a DSI exception on write? |
|
Oh right. Someone did a |
|
Increases F-Zero X from 182fps to 184fps on my computer. Most other VC N64 games that I have aren't as fast as this one, and end up seeing a 1 fps increase or no noticeable increase. |
| @@ -110,6 +110,8 @@ const u8 *TrampolineCache::GetWriteTrampoline(const InstructionInfo &info, u32 r | |||
| // Don't treat FIFO writes specially for now because they require a burst | |||
| // check anyway. | |||
|
|
|||
| MOV(32, M(&PC), Imm32(pc)); // for exception handling | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Fix up those comments and it LGTM. |
Modify the backpatcher to store the PC in the trampolines. Should be ~3.5% faster overall (measured on POV-RAY benchmark).
|
@FioraAeterna: This comment grants you the permission to merge this pull request whenever you think it is ready. After addressing the remaining comments, click this link to merge. @dolphin-emu-bot allowmerge |
JIT: avoid saving the PC on every store
Modify the backpatcher to store the PC in the trampolines.
Should be ~3.5% faster overall (measured on POV-RAY benchmark).