Package: rabbitizer
rabbitizerMIPS instruction decoder API.FeaturesShould produce matching assembly.Fully written in C for fast decoding.The library is completely allocation-less, in other wordsrabbitizerdoesn't allocate in anything in the heap by itself.Other language bindings supported in this repo:Python bindingsThe minimal Python version is 3.7, older versions are not guaranteed to work.C++ bindingsRust bindingsSimple per-word instruction decoding.The library doesn't try to be too smart by processing multiple instructions
at a time.Can perform validation checks for instructions.Provides many examination/grouping functions for instructions, allowing to
simplify checking characteristics of an instruction and minimizing the need to
check for specific instructions in a hardcoded way.Includes some minor tools to build your own pointer/symbol detection.Configurable, many features can be turned on and off.MIPS instructions features:Named registers for MIPS VR4300's coprocessors.Support for many pseudo-instructions.Properly handle move to/from coprocessor instructions.Support for numeric, o32, n32 and n64 ABI register names.Some workarounds for some specific compilers/assemblers:SN64:div/divufix: tweaks a bit the produceddiv,divuandbreakinstructions.Multiple MIPS architectures are supported:Main focus on MIPS I, II and III architectures. Partial support for MIPS IV too.N64 RSP instruction decoding support.RSP decoding has been tested to build back to matching assemblies witharmips.R5900 (PS2's Emotion Engine processor) decoding support.Non-featuresIn order to keep it simple and fast the following features will not be added:Pseudo-instructions which expands to more than one instruction.InstallingPython bindingsThe recommended way to install is using from the PyPi release, viapip:pipinstallrabbitizerIn case you want to mess with the latest development version without wanting to
clone the repository, then you could use the following command:pipinstallgit+https://github.com/Decompollaborate/rabbitizer.git@developNOTE: Installing the development version is not recommended. Proceed at your own
risk.See this package athttps://pypi.org/project/rabbitizer/.Rust bindingsAdd this crate to your project with Cargo:cargoaddrabbitizerOr you can add it manually to yourCargo.toml:rabbitizer="1.9.1"See this crate athttps://crates.io/crates/rabbitizer.ReferencesMIPS CPU:MIPS IV Instruction Set (Revision 3.2):https://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdfMIPS Calling Convention Summary:https://courses.cs.washington.edu/courses/cse410/09sp/examples/MIPSCallingConventionsSummary.pdfmipt-mips pseudo instructions:https://github.com/MIPT-ILab/mipt-mips/wiki/MIPS-pseudo-instructionsN64's RSP (Reality Signal Processor):Nintendo Ultra64 RSP Programmer’s Guide:https://ultra64.ca/files/documentation/silicon-graphics/SGI_Nintendo_64_RSP_Programmers_Guide.pdfN64brew Reality Signal Processor/CPU Core:https://n64brew.dev/wiki/Reality_Signal_Processor/CPU_CoreR3000 GTE:PSYQ SDK headers:https://github.com/FoxdieTeam/psyq_sdk/blob/master/psyq_4.4/INCLUDE/INLINE_A.Hno$psx documentation:https://problemkaputt.de/psxspx-gte-opcode-summary.htmno$psx documentation:http://problemkaputt.de/psx-spx.htm#geometrytransformationenginegtehttp://www.raphnet.net/electronique/psx_adaptor/Playstation.txtR5900:EmotionEngine instruction decoding:https://psi-rockin.github.io/ps2tek/#eeinstructiondecodingOfficial documentation from Toshiba:https://wiki.qemu.org/images/2/2a/C790.pdfVU instruction manual:http://lukasz.dk/files/vu-instruction-manual.pdfGNU binutils:https://github.com/bminor/binutils-gdb/blob/master/opcodes/mips-opc.c