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

Added implementation for aarch64 NEGS instruction #987

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added implementation for aarch64 NEGS instruction #987

wants to merge 1 commit into from

Conversation

su-vikas
Copy link
Contributor

I have added implementation for negs instruction. As per ARM ARM, NEGS is an alias of SUBS instruction.

I have copied the CMP instruction, as CMP is also an alias of SUBS. Let me know if I got it right.

@su-vikas
Copy link
Contributor Author

For your testing purposes, instruction is "FF 03 0A 6B", IDA shows it as CMP WZR, W10, probably aliasing it. The encoding looks to be of NEGS.

@commial
Copy link
Contributor

commial commented Feb 27, 2019

I have copied the CMP instruction, as CMP is also an alias of SUBS

Does CMP also update the destination?

@su-vikas
Copy link
Contributor Author

No, CMP discards the results and just updates the condition flags.

@commial
Copy link
Contributor

commial commented Feb 28, 2019

So it isn't an alias of SUBS, right? Or maybe I misunderstood your sentence

@su-vikas
Copy link
Contributor Author

As per ARM documentation, NEGS and CMP are alias of SUBS - but NEGS and CMP discard the result. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/NEGS_SUBS_addsub_shift.html

If you ask me, I don't think alias is the right word to use. But documentation states so, thus I use it as well.

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