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

Remove double negative from ICPX transfer HUB -> MMU #547

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

OlivierBBB
Copy link
Collaborator

@OlivierBBB OlivierBBB commented Dec 11, 2024

Now for the MMU_INST_invalidCodePrefix instruction we have

  SUCCESS_BIT = 1  <=>  ICPX = 1
                   <=>  [first byte is 0xEF]

Where the first byte is that of the prospective bytecode which the
RETURN instruction is attempting to deploy
@OlivierBBB OlivierBBB self-assigned this Dec 11, 2024
@OlivierBBB OlivierBBB changed the title Remove double negative from ICPX transfer HUB -> MMU Remove double negative from ICPX transfer HUB -> MMU Dec 11, 2024
@@ -276,7 +276,7 @@
;; size ;; size
;; ref_offset ;; reference offset
;; ref_size ;; reference size
(- 1 (return-instruction---exception-flag-ICPX)) ;; success bit; this double negation stuff will be resolved by spec issue #715
(return-instruction---exception-flag-ICPX) ;; success bit; this double negation stuff will be resolved by spec issue #715
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed first negation in the HUB


(defconstraint invalid-code-prefix---setting-the-success-bit (:guard (* MACRO IS_INVALID_CODE_PREFIX))
(begin ;; setting tot nb of mmio inst
;; setting the success bit
(eq! macro/SUCCESS_BIT
(- 1 (next prprc/WCP_RES)))))
(next prprc/WCP_RES))))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed second negation in the MMU

Copy link
Contributor

@lorenzogentile404 lorenzogentile404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent with the spec update.

@OlivierBBB OlivierBBB merged commit 3e903a3 into master Dec 11, 2024
2 checks passed
@OlivierBBB OlivierBBB deleted the MMU-invalid-code-prefix-fix branch December 11, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants