Fix issues relating to setting flags on ADDS and SUBS instructions: #6
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.
Fixes #4
To fix 1
setVflag(long result, long op1, long op2)
is split intosetVflagAdd
andsetVflagSub
variants, and the V flag is set based on the table "Overflow conditions for addition and subtraction." in p.190 of the Computer Organization and Design (Arm Edition) textbook.To fix 2
the
ADDSetFlags
andSUBSetFlags
are called before the register value is changed.Building & Testing
I was unable to build the project, and could not find existing tests, so I tested with a simple
main
script inCPU.java
(not committed but attached here for reference).Since I cannot build the project, the packaged web app is unchanged. I was able to download the gws dependency but not the ace one, it would be good to get instructions on how to build the project if possible.