-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Propertly Truncate Paired Single Move Instructions #13059
base: master
Are you sure you want to change the base?
Conversation
Matches hardware in rounding paired singles after move operations!! Move operations consist of operations which only transfer direct bits This also accounts for ps_rsqrte, because it has a similar quirk Specifically in hardware they're rounded in accordance to their slot: - PS0 rounds *only the mantissa* in accordance to the set rounding mode - PS1 truncates the mantissa ps_rsqrte also truncates for PS0 for some reason ^^; This has all been tested on hardware, along with a few edge case tests
I don't know why but it decided to just cut out a huge chunk of code for some reason
Can you add a unit test matching the tests you ran on hardware? That would help show what has been tested and prevent any future regressions. Also, the second commit should be squashed into the first one. |
I can probably commit to the hwtests repo if I can figure out how to get it set up ^^; |
While it would definitely be good to have that in the hwtests repo, I was primarily thinking about here which gets run on every PR. |
I'm mildly afraid to try that bc this is interpreter-only and would require an entire thing somehow setting that up :,D |
I would very much like a hwtest. And if we have that, I don't think there's any need to require a unit test on top. Yes, being able to automatically test stuff is nice, but:
|
Co-authored-by: JosJuice <[email protected]>
Co-authored-by: JosJuice <[email protected]>
Co-authored-by: JosJuice <[email protected]>
This passes every test case I could think of which computes each part using bitwise operations rather than any floats I'll try getting hwtests working soon and if I can't I'll see if anyone else can ^^
I've confirmed with your hwtest (dolphin-emu/hwtests#56) plus isync that the ps_merge*/ps_mr/ps_neg/ps_abs/ps_nabs changes match hardware. If you move the changes for those opcodes (and the shared code) into a separate PR, we can get that merged now and leave ps_sel/ps_rsqrte/ps_sum0/ps_sum1 verification for later. |
Oh right I forgot about sum0 and sum1, ty for reminding me ^^ -- I was planning try to figure out what in the world is failing the 3 specific tests with ps_rsqrte first though :O |
Based on some limited testing, I think ps_sel doesn't have the NaN/infinity special case. |
Matches hardware in rounding paired singles after move operations!!
Move operations consist of operations which only transfer direct bits (including absolute values and merges)
This also accounts for
ps_rsqrte
because it has a similar quirkSpecifically in hardware they're rounded in accordance to their slot:
ps_rsqrte
also only truncates for PS0 for some reason ^^;This has all been tested on hardware, along with a few edge case tests to ensure this implementation works