Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

markshannon
Copy link
Member

@markshannonmarkshannon commentedJan 12, 2023
edited by bedevere-bot
Loading

@@ -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)
Copy link
Member

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.

Copy link
MemberAuthor

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.

@markshannonmarkshannon merged commit7b14c2e intopython:mainJan 16, 2023
@markshannonmarkshannon deleted the compare-and-branch-instruction-2 branchSeptember 26, 2023 12:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@markshannon@iritkatriel@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp