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

Enhance generator for register instructions #48

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

gvanrossum
Copy link

@gvanrossum gvanrossum commented Dec 17, 2022

I updated only UNARY_POSITIVE_R to the new format.

- Syntax `register inst(NAME, (ieffects -- oeffects)) { ... }`
- Map stack effects from/to `REG(opargN)` instead of PEEK()
- Use `Py_XSETREF(REG(opargN), result)` for output effects
- Suppress stack adjustment in epilogue
- Suppress effect of `DECREF_INPUTS()`
- Always go to plain `error` in `ERROR_IF()`

@gvanrossum
Copy link
Author

Hm, I still fail at git. But the diff seems to be all right.

I updated only UNARY_POSITIVE_R to the new format.

- Syntax `register inst(NAME, (ieffects -- oeffects)) { ... }`
- Map stack effects from/to `REG(opargN)` instead of PEEK()
- Use `Py_XSETREF(REG(opargN), result)` for output effects
- Suppress stack adjustment in epilogue
- Suppress effect of `DECREF_INPUTS()`
- Always go to plain `error` in `ERROR_IF()`
@gvanrossum
Copy link
Author

Okay, there should now be a single commit here that's what you want (but you have to add your own versions of the other unary ops.

@iritkatriel iritkatriel merged commit 1e83cb2 into iritkatriel:regmachine Dec 20, 2022
@gvanrossum gvanrossum deleted the register-generator branch January 5, 2023 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants