-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
I can't see a way for MIPS to change the current ISA in unicorn. #2086
Comments
Ah yeah, good catch. Would you like to contribute? It would be also much appreciated if you could also attach a unit test to |
Added PR for this, but perhaps I need to do it on dev branch? |
Yes, you shall PR to dev branch. |
This was referenced Jan 18, 2025
Closed
Closing, thanks for your contributions! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MIPS supports various 16bit or variable sized instructions formats in addition to the normal 32bit instructions.
This is pretty much the same deal as ARM supporting THUMB instructions.
For MIPS the lowest address bit of PC is even used for change between modes, just like between ARM and THUMB.
I cannot however find any way to perform this change when using unicorn with MIPS.
Perhaps I am missing something?
In "qemu/target/mips/cpu.c" lin 28 you can see how setting the PC is used to set the M16 (mips16 bit mode) flag.
However the code in "qemu/target/mips/unicorn.c" only does this:
I propose to change it to:
This would make it similar to unicorns "set pc" function for arm which is:
The text was updated successfully, but these errors were encountered: