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

Jit64: boolx - Eliminate read dependency #9451

Merged
merged 1 commit into from Jan 19, 2021

Conversation

Sintendo
Copy link
Member

For certain occurrences of nandx/norx, we declare a ReadWrite constraint on the destination register, even though the value of the destination register is irrelevant. This false dependency would force the RegCache to generate a redundant MOV when the destination register wasn't already assigned to a host register.

Example 1:

BF 00 00 00 00       mov         edi,0
8B FE                mov         edi,esi
F7 D7                not         edi

Example 2:

8B 7D 80             mov         edi,dword ptr [rbp-80h]
8B FE                mov         edi,esi
F7 D7                not         edi

For certain occurrences of nandx/norx, we declare a ReadWrite constraint
on the destination register, even though the value of the destination
register is irrelevant. This false dependency would force the RegCache
to generate a redundant MOV when the destination register wasn't already
assigned to a host register.

Example 1:
BF 00 00 00 00       mov         edi,0
8B FE                mov         edi,esi
F7 D7                not         edi

Example 2:
8B 7D 80             mov         edi,dword ptr [rbp-80h]
8B FE                mov         edi,esi
F7 D7                not         edi
Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

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

I noticed the same mistake when creating PR #9351. (With that PR, this ReadWrite leads to a failed assert.)

@Sintendo
Copy link
Member Author

Oh whoops, I didn't realize. Feel free to close this PR.

@JosJuice
Copy link
Member

Nah, that PR will take longer to merge. Let's merge this PR.

@JosJuice JosJuice merged commit ebf3b5f into dolphin-emu:master Jan 19, 2021
10 checks passed
@Sintendo Sintendo deleted the jit64boolxrw branch January 19, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants