-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add CMP Opcode #109
Add CMP Opcode #109
Conversation
So I was looking through PR #86 and I noticed that @AdamuKaapan has already implemented the CMP OPCODE in that PR. Is this the same implementation? If not, then how should we go about merging everyone's work? |
I had forgotten about that branch, since it had been failing the build for a while. Also, since PR #104 changed a lot of the way that opcodes are written, it may just be easier to re-do some of that work. |
To be honest, that sounds like more effort than it's worth. A lot of it would have to be rewritten anyways. |
Then would it be best to close PR #86 for now? |
To be honest, that sounds like more effort than it's worth. A lot of it would have to be rewritten anyways. |
…t_cmp tests to the list of all tests to run
Adds the CMPI Opcode and related tests
…ll incorrect however
easier68k/core/opcodes/cmp.py
Outdated
if src_val.get_msb(self.size) is True: | ||
if dest_val.get_msb(self.size) is False: | ||
if raw_total > 0 and raw_total & 0x80000000 > 0: | ||
overflow = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic was taken from CMPI, which was taken from SUB and SUBQ. However, I used new logic to identify the overflow bit for SUB and SUBQ. I would recommend checking it out and seeing if it might work better than this implementation.
Is there anything else that should be done for this PR? |
Mentioned in #121
Looks good! Sorry for the delay in PR review. |
Adds the CMP Opcode which is responsible for setting all of the CCR bits.
Fixes #25 .