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

PowerPC: Negate m_dec values in frsqrte table #12249

Merged
merged 1 commit into from Oct 28, 2023

Conversation

Sintendo
Copy link
Member

This value is used in a multiplication. The result of this multiplication is then subtracted from m_base. By negating m_dec, we are free to use an addition instead.

On x64, this saves an instruction.

This value is used in a multiplication. The result of this
multiplication is then subtracted from m_base. By negating m_dec, we are
free to use an addition instead.

On x64, this saves an instruction.
@Tilka
Copy link
Member

Tilka commented Oct 23, 2023

Looks good but keep in mind that changing the interpreter and the JITs at the same time makes the unit test meaningless.

@Sintendo
Copy link
Member Author

Indeed, I can confirm my changes produce identical results for the 57 double test values.

Perhaps we should split the unit test in Interpreter/Jit64, with both validating against known expected values rather than each other?

@JosJuice
Copy link
Member

Perhaps we should split the unit test in Interpreter/Jit64, with both validating against known expected values rather than each other?

Either that or having Interpreter validate against known values and having Jit64 validate against Interpreter makes sense to me.

@Tilka Tilka merged commit 9bea807 into dolphin-emu:master Oct 28, 2023
11 checks passed
@Sintendo Sintendo deleted the frsqrte-nit branch October 30, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants