Fix/divider correctness#299
Open
guosran wants to merge 2 commits into
Open
Conversation
tancheng
reviewed
Jun 22, 2026
d5cc795 to
ebf7843
Compare
tancheng
reviewed
Jun 23, 2026
This was referenced Jun 24, 2026
tancheng
reviewed
Jun 24, 2026
64516aa to
3f35760
Compare
Owner
|
Hi @guosran, "draft" means this is not yet ready for review, right? |
Collaborator
Author
Not yet, just a few more things to be done. |
b862c12 to
160f768
Compare
160f768 to
8c0df00
Compare
8c0df00 to
cf6ee08
Compare
Collaborator
Author
|
Concrete example: I restored the exact quotient path and use guarded |
tancheng
approved these changes
Jun 26, 2026
|
|
||
| s.div_quotient @= quotient | ||
| if s.divisor != 0: | ||
| s.div_remainder @= s.dividend % s.divisor |
Owner
There was a problem hiding this comment.
well, we already performed above calculation, then the s.div_remainder can just be:
s.div_remainder @= remainder
no?
HobbitQia
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #292 with a minimized divider operation fix. This PR updates
DivRTL.py, its focused test, andlib/opt_type.pyfor the required REM opcodes.Changes
REMandREM_CONSTsupport.No ExclusiveDiv backpressure rewrite, new ports, or new interfaces are included.