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

Added support to recognize hints instruction in the log #693

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsubaidrehman
Copy link

SAIL was unable to recognize hint operations as hints in the log. Added the support so that hints should be recognizable as hints in the log file

Copy link
Collaborator

@jrtc27 jrtc27 left a comment

Choose a reason for hiding this comment

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

These are not the canonical mnemonics. Destinations with x0 are often hints, but for uncompressed instructions they are written the same as the others, unless another extension claims them in which case they have aliases that are used in preference.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Jan 21, 2025 via email

@Timmmm
Copy link
Collaborator

Timmmm commented Jan 22, 2025

I assume this was intended just to make the log more informational? But yeah I agree with @jrtc27 - we should probably stick to assembly that actually works.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Jan 22, 2025 via email

@jrtc27
Copy link
Collaborator

jrtc27 commented Jan 22, 2025

Sounds like your tool needs a (limited) instruction decoder.

@Timmmm
Copy link
Collaborator

Timmmm commented Jan 22, 2025

Yeah I think the proper way to solve this is with the planned callback API or machine readable log format. You can extract the instructions opcode and then use a simple decoder to see if is a hint.

If it must be in Sail we could potentially add a second instruction_metadata mapping that maps an ast to information like whether it is a hint, which extension it is from, etc. Might be handy.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Jan 22, 2025 via email

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.

4 participants