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

i#7199: make adding a new register less error-prone #7200

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

philramsey-arm
Copy link
Collaborator

It is currently easy to miss an important step when adding a new register, as the value of the last register is marked by two alias enums that have to be maintained.

Add a new enum DR_REG_AFTER_LAST_VALID_ENUM to mark the end of the actual registers. This means we can avoid using aliases.

Fixes: #7199

It is currently easy to miss an important step when adding
a new register, as the value of the last register is marked
by two alias enums that have to be maintained.

Add a new enum `DR_REG_AFTER_LAST_VALID_ENUM` to mark the
end of the actual registers. This means we can avoid using
aliases.

Fixes: #7199
@philramsey-arm
Copy link
Collaborator Author

Will fix the Windows build and push again (hopefully tomorrow.)

core/ir/opnd_shared.c Show resolved Hide resolved
core/ir/x86/encode.c Show resolved Hide resolved
core/ir/opnd_api.h Show resolved Hide resolved
core/ir/opnd_api.h Show resolved Hide resolved
@derekbruening derekbruening requested a review from edeiana January 21, 2025 17:51
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.

Adding support for a new register is error-prone
3 participants