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

Implement pseudoinstructions in Rotor disassembly #380

Merged
merged 23 commits into from
Jun 1, 2024

Conversation

Jean-M22
Copy link

@Jean-M22 Jean-M22 commented May 15, 2024

This pull request adds support for printing pseudoinstructions in rotor disassembly.

Pseudoinstructions are implemented (mostly) according to the RISC-V spec, with a few exceptions noted by comments.

The aim of this pull request was to get Rotor to disassemble instructions as closely as possible to RISC-V objdump

@Jean-M22 Jean-M22 changed the title Create tool for comparing outputs of rotor disassembly and risc-v objdump Implement pseudoinstructions in Rotor disassembly May 29, 2024
@Jean-M22 Jean-M22 marked this pull request as ready for review May 29, 2024 09:54
@Jean-M22 Jean-M22 marked this pull request as draft May 29, 2024 11:27
This looks so much uglier without &&, can we add && to rotor? 😆
@Jean-M22 Jean-M22 marked this pull request as ready for review May 29, 2024 19:59
tools/rotor.c Outdated Show resolved Hide resolved
Copy link
Member

@ckirsch ckirsch left a comment

Choose a reason for hiding this comment

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

@Jean-M22 looks really nice!

Please change the following (all easy to do):

  • avoid changes to .gitignore
  • change the type of rd, rs1, and rs2 to uint64_t, also in print_assembly, and then use get_register_name only in the last moment when printing
  • add a flag for turning off printing of pseudo instructions, default should be on

Thanks a lot!

@Jean-M22 Jean-M22 requested a review from ckirsch May 30, 2024 17:48
@Jean-M22
Copy link
Author

@ckirsch

I have implemented the requested changes.

@ckirsch ckirsch merged commit d9411b6 into cksystemsteaching:rotor Jun 1, 2024
4 checks passed
@Jean-M22 Jean-M22 deleted the objdump-analyzer branch June 1, 2024 20:20
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.

None yet

2 participants