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

IR: Add handling for ANDN operations #1338

Merged
merged 2 commits into from
Nov 3, 2021
Merged

Conversation

lioncash
Copy link
Contributor

@lioncash lioncash commented Nov 2, 2021

In a few parts of the OpcodeDecoder there's comments about making use of BIC. Given that, we can introduce the Andn IR operation that performs the same behavior as it.

I've named it Andn, since I feel it's more straightforward to read at a glance, but if it's preferable to name it Bic, I'm not opposed to changing it.

First time adding an IR op, so if anything looks wonky, just let me know and I'll fix it.

This is a pretty straightforward operation that can be nicely modeled
by the BIC instruction on ARMv8, which is nice since we can get rid of
the need to manually perform the And and Not operations.
Now that we have the handling in place, we can make use of it to
simplify some operations and resolve some lingering TODO comments.
@Sonicadvance1
Copy link
Member

Both BIC(Binary Clear) and ANDN make sense here. I don't have a preference of one name versus the other.

@Sonicadvance1 Sonicadvance1 merged commit 34b2f93 into FEX-Emu:main Nov 3, 2021
@lioncash lioncash deleted the bic branch November 3, 2021 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants