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: exclude decorators while adding asmop #533

Closed
wants to merge 1 commit into from

Conversation

tohrnii
Copy link
Contributor

@tohrnii tohrnii commented Nov 20, 2022

Describe your changes

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

@bobbinth
Copy link
Contributor

These parsers are getting replaced with the new parsing structure. The latest code for that structure is in #532. Could you check if the equivalent change needs to be made there?

@tohrnii
Copy link
Contributor Author

tohrnii commented Nov 21, 2022

@bobbinth I think the fix is already present in the new parser because of the following check:

// if the cycle count is 0, remove the decorator; otherwise update its cycle count
if cycle_count == 0 {
    self.decorators.remove(self.last_asmop_pos);
} else if let Decorator::AsmOp(assembly_op) = assembly_op {
    assembly_op.set_num_cycles(cycle_count as u8)
}

Maybe doc comment for the method can be updated to include decorators as well in the line:

/// If the cycle count is 0, the original decorator is removed from the list. This can happen
/// for instructions which do not contribute any operations to the span block - e.g., exec,
/// call, and syscall

Should I close this PR since these parsers are getting replaced?

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