Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
GH-100982: AddCOMPARE_AND_BRANCH
instruction#100983
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
GH-100982: AddCOMPARE_AND_BRANCH
instruction#100983
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -189,7 +189,8 @@ def pseudo_op(name, op, real_ops): | |||
def_op('DELETE_DEREF', 139) | |||
hasfree.append(139) | |||
jrel_op('JUMP_BACKWARD', 140) # Number of words to skip (backwards) | |||
def_op('COMPARE_AND_BRANCH', 141) # Comparison and jump | |||
hascompare.append(141) |
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 opcode needs to be in hasjrel as well.
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.
The problem is thatdis
seesCOMPARE_AND_BRANCH
, thenPOP_JUMP_IF_
. ThePOP_JUMP_IF_
is where we jump from.
So markingCOMPARE_AND_BRANCH
as a jump confuses dis, it thinks the operator is a jump offset.COMPARE_AND_BRANCH
is effectively a superinstruction.
I could special caseCOMPARE_AND_BRANCH
in dis, but I think it might be better to wait for proper support for longer instructions.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.