-
Notifications
You must be signed in to change notification settings - Fork 465
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
Yet another disasm.py speedup #918
Conversation
Co-authored-by: Tharo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also checking it out to do some testing
Co-authored-by: Derek Hensley <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine for me. Always enjoy the speed ups :) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on Mac, code looks good from what I can see, but there's a few issues with the surroundings.
steps { | ||
echo 'Installing Python dependencies' | ||
sh 'python3 -m pip install -r requirements.txt' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could just subrepo it instead, this basically counters all new timesave.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package is written in C, so people would require to build it themselves. They would require to install the python dev package to build it too. People on Windows (cygwin, not wsl) would require the VisualStudio toolchain just to build it. Too much trouble imo.
Also, this step only adds 2 extra seconds on the jenkins side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah subrepo doesn't really help since Jenkins would have to build it anyways, which is almost certainly going to be longer than just installing a few python packages.
tools/asm-processor/prelude.inc
Outdated
|
||
# Floating-point status register | ||
.set $FpcCsr, $31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a subrepo, right? So this should be PR'd to that repo. And the permuter might need it too. And maybe decomp.me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. As every time this topic comes up, the asm processor is not a subrepo... for reasons I can never remember.
If using this register alias is an issue I can disable it on rabbitizer's configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can probably live without this, I expect mips2c m2c wouldn't like it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the use of $FpcCsr
for now instead
Change
disasm.py
to use rabbitizer as the instruction decoder instead of the bundledmips_isa.py
file.The advantage of using this package instead of what we are doing now is this package is a fast MIPS instruction decoder fully written in C, so runtime and memory usage are greatly improved.
For example, running the disasm.py script on current master:
This PR:
(I couldn't get proper memory usage measurements because the multithreading stuff messed up with them. lmk if anybody knows a proper way to measure it)
I cleaned up and de-duplicated some code. It is a bit more readable imo.
I also took this opportunity to clean up the
requirements.txt
file and remove what seems to be dead dependencies and adddiff.py
dependencies andrabbitizer