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

Fix Missing Extensions in Pseudo Instructions #262

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

NyembeziIMG
Copy link
Contributor

  • Added code to extend the extension list of a pseudo instruction in the YAML output
  • This ensures that all the extensions that a pseudo instruction can belong to are listed
  • This is in line with what happens for regular and imported instructions
  • No changes to all other output types

- Added code to extend the extension list of a pseudo instruction
in the YAML output
- This ensures that all the extensions that a pseudo instruction
can belong to are listed
- This is in line with what happens for regular and imported
instructions
- No changes to all other output types
@NyembeziIMG
Copy link
Contributor Author

Zip with instr_dict.yaml before and after attached

fix_pseudo_missing_extensions.zip

Copy link
Member

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

Can you explain more about the problem you're solving? What's missing and why should it be included?

(The code looks fine, and thanks for making sure that no other outputs are affected.)

@NyembeziIMG
Copy link
Contributor Author

Many thanks for the quick feedback.

Before this change, not all the extensions that the pseudo instructions belong to were listed under the extension field in instr_dict.yaml
As an example for rev8, only rv64_zks was listed under the extension field:
`rev8:
encoding: 011010111000-----101-----0010011
extension:

  • rv64_zks
    mask: '0xfff0707f'
    match: '0x6b805013'
    variable_fields:
  • rd
  • rs1`

After this change, rev8 lists 5 extensions, i.e. rv64_zks/rv64_zkn/rv64_zk/rv64_zbkb/rv64_zbb:
`rev8:
encoding: 011010111000-----101-----0010011
extension:

  • rv64_zks
  • rv64_zkn
  • rv64_zk
  • rv64_zbkb
  • rv64_zbb
    mask: '0xfff0707f'
    match: '0x6b805013'
    variable_fields:
  • rd
  • rs1`

This would be consistent with regular and imported instructions, which list all the extensions that they belong to.

Copy link
Member

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation, sgtm.

@aswaterman aswaterman merged commit 07b21cc into riscv:master Jul 24, 2024
2 checks passed
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