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

Validate and test gr0 exclude flag for Power #5361

Open
aviansie-ben opened this issue Jul 2, 2020 · 2 comments
Open

Validate and test gr0 exclude flag for Power #5361

aviansie-ben opened this issue Jul 2, 2020 · 2 comments

Comments

@aviansie-ben
Copy link
Contributor

A number of instructions on Power have special behaviour where placing gr0 in the RA field of an instruction may be invalid or result in use of a constant 0 instead of the actual value stored in gr0. In #5325, an instruction property flag was added to control this behaviour, however we have not yet validated that the existing list of gr0 excludes is correct nor added tests to ensure that this functionality works as intended.

Generally, validation of these excludes should follow the same rules as validation of binary encoding: anything with a current format of FORMAT_UNKNOWN need not be checked, as this validation should be performed as support is added for using these instructions in the backend and new tests should be added as this happens.

@gita-omr
Copy link
Contributor

gita-omr commented Jul 2, 2020

Maybe we can somehow parse the Power ISA document to make sure we found all instructions that have that property. My main concern is that somebody may rely on this flag already being set on all instructions that need it.

@aviansie-ben
Copy link
Contributor Author

aviansie-ben commented Jul 2, 2020

I don't see any reliable way of automatically parsing the ISA document to determine this. None of the appendices seem to list this information in tabular format and even the instruction descriptions themselves are inconsistent in how they provide this information (i.e. some use the (RA|0) convention, while others simply have special handling in the pseudocode for RA=0, and still others only mention in the description that using 0 for RA is invalid).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants