-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Illegal opcodes #17
Illegal opcodes #17
Conversation
src/execute.rs
Outdated
self.registers.sr.set_nz(self.registers.a); | ||
|
||
Ok(cycles) | ||
} /* @breqdev change to unreachable or entirely omit? |
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.
@breqdev also hey ;)
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.
Let's just remove this entirely, since we match all of the available opcodes!
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.
A few things to clear up, but overall looks pretty good!
We should probably get a test suite written that covers these instructions -- I tested my implementation for the official instructions with these functional tests I found, but it doesn't seem like there's an equivalent for the unofficial opcodes.
Writing unit tests for this is probably outside the scope of this PR, but a short assembly program that runs through each of these opcodes would be nice for reassurance. If you're feeling ambitious, you could totally give this a try; if not, I'm happy to take care of it.
src/execute.rs
Outdated
self.registers.sr.set_nz(self.registers.a); | ||
|
||
Ok(cycles) | ||
} /* @breqdev change to unreachable or entirely omit? |
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.
Let's just remove this entirely, since we match all of the available opcodes!
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
==========================================
- Coverage 20.47% 19.98% -0.50%
==========================================
Files 40 40
Lines 8517 8717 +200
==========================================
- Hits 1744 1742 -2
- Misses 6773 6975 +202
☔ View full report in Codecov by Sentry. |
e3f2e47
to
ae61ef1
Compare
👀 |
Add unofficial opcodes, implementations taken from a few different sources:
Todo: