FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-98831: Identify instructions that don't use oparg by gvanrossum · Pull Request #100957 · python/cpython · GitHub

/ cpython Public

GH-98831: Identify instructions that don't use oparg - #100957

Merged
gvanrossum merged 4 commits into
python:mainfrom
gvanrossum:cases-oparg
Jan 14, 2023
Merged

GH-98831: Identify instructions that don't use oparg#100957
gvanrossum merged 4 commits into
python:mainfrom
gvanrossum:cases-oparg

Conversation

gvanrossum commented Jan 11, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.

For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.

brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks mostly good, just a bit confused by the register formats you're generating.

fmt = "I" + "B"*num_regs + "_"*num_dummies
else:
fmt = "IB"
if variable_used(inst.block, "oparg"):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We don't know the actual opcode values yet, do we? If so, maybe we want to warn or something if this conflicts with HAVE_ARGUMENT.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Alas, we don't. I'd have to load opcode.py using the hack from your PR, which feels more infrastructure than I want to invest in for now (nothing is using the opcode metadata yet).

Comment thread Python/opcode_metadata.h Outdated
Comment thread Tools/cases_generator/generate_cases.py Outdated

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

Copy link
Copy Markdown

Thanks for making the requested changes!

@brandtbucher: please review the changes made to this pull request.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL