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

Interpreter: Simplify mcrfs implementation #10040

Merged
merged 1 commit into from Aug 31, 2021

Conversation

JosJuice
Copy link
Member

No description provided.

Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if that implementation is really considered simpler than before. It is shorter though. 😅

const u32 fpflags = (FPSCR.Hex >> shift) & 0xF;

// If any exception bits were read, clear them
FPSCR.Hex &= ~((0xF << shift) & (FPSCR_FX | FPSCR_ANY_X));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why the mask is AND'd with FPSCR_FX | FPSCR_ANY_X?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we read a bit that represents whether a certain exception has happened, we need to clear that bit. But if we read some other bit, like the rounding mode, FPSCR, or whether a certain exception should be enabled, that bit shouldn't be cleared.

@leoetlino leoetlino merged commit c5becb4 into dolphin-emu:master Aug 31, 2021
11 checks passed
@JosJuice JosJuice deleted the simplify-mcrfs branch August 31, 2021 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants