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

JIT: implement timer support in mtspr #840

Merged
merged 2 commits into from Sep 3, 2014

Conversation

FioraAeterna
Copy link
Contributor

Faster, of course, since we avoid the interpreter, but also means we can
get more a more accurate timer in long blocks by adding the offset from the
start of the block to the retrieved timer. I don't know if this will actually
fix any issues, but it's more correct and a nearly-free improvement.

// redundant for the JIT.
u32 registersInUse = RegistersInUse();
u32 offset = js.downcountAmount / SystemTimers::TIMER_RATIO;
ABI_PushRegistersAndAdjustStack(registersInUse, false);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@JMC47
Copy link
Contributor

JMC47 commented Sep 3, 2014

I know there's some coding style stuff, but this makes Nintendo Puzzle Collection much faster.

@comex
Copy link
Contributor

comex commented Sep 3, 2014

LGTM

Faster, of course, since we avoid the interpreter, but also means we can
get more a more accurate timer in long blocks by adding the offset from the
start of the block to the retrieved timer. I don't know if this will actually
fix any issues, but it's more correct and a nearly-free improvement.
Combined with the previous patch, ~1% faster overall on F-Zero GX.
@Sonicadvance1
Copy link
Contributor

@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

dolphin-emu-bot added a commit that referenced this pull request Sep 3, 2014
JIT: implement timer support in mtspr
@dolphin-emu-bot dolphin-emu-bot merged commit fa29b18 into dolphin-emu:master Sep 3, 2014
@skidau
Copy link
Contributor

skidau commented Nov 1, 2014

This PR has broken Karaoke Revolution Party (GK9EA4). From this commit, the game crashes to desktop. The fix in PR #959 causes the game to black screen at the menu. The game works under JITIL and JIT will work if the interpreted version of mfspr is used.

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