MIPS instruction decoder
Go to file
2023-05-04 14:00:56 -04:00
.github/workflows fix paths in ci 2023-05-02 19:06:06 -04:00
cplusplus Bindings for InstrIdType 2023-05-04 13:44:22 -04:00
docs table of contents 2022-12-24 20:58:32 -03:00
include Update tests 2023-05-04 14:00:56 -04:00
rabbitizer Bindings for InstrIdType 2023-05-04 13:44:22 -04:00
rust Bindings for InstrIdType 2023-05-04 13:44:22 -04:00
src RabInstrIdType 2023-05-04 12:50:14 -04:00
tables Bindings for InstrIdType 2023-05-04 13:44:22 -04:00
tests Update tests 2023-05-04 14:00:56 -04:00
.clang-format Change column limit to 120 2022-12-20 00:47:17 -03:00
.clang-tidy format tidy 2022-12-19 15:12:12 -03:00
.gitattributes Bindings for InstrIdType 2023-05-04 13:44:22 -04:00
.gitignore Fix C files not being packaged on Rust crates 2022-12-18 19:43:40 -03:00
.markdownlint.json Expand list of instructions not emitted by C compilers 2022-12-26 19:59:23 -03:00
Cargo.toml Move all the tables into a tables folder 2023-05-02 19:01:54 -04:00
LICENSE
Makefile Move all the tables into a tables folder 2023-05-02 19:01:54 -04:00
MANIFEST.in Move all the tables into a tables folder 2023-05-02 19:01:54 -04:00
pyproject.toml Move all the tables into a tables folder 2023-05-02 19:01:54 -04:00
README.md Add R3000GTE instruction set support (#31) 2023-04-29 23:07:07 -04:00
setup.py Move all the tables into a tables folder 2023-05-02 19:01:54 -04:00

rabbitizer

PyPI - Downloads GitHub GitHub release (latest SemVer) PyPI crate.io GitHub contributors

MIPS instruction decoder API.

Features

  • Should produce matching assembly.
  • Fully written in C for fast decoding.
    • The library is completely allocation-less, in other words rabbitizer doesn't allocate in anything in the heap by itself.
  • Other language bindings supported in this repo:
    • Python bindings
      • The minimal Python version is 3.7, older versions are not guaranteed to work.
    • C++ bindings
    • Rust bindings
  • Simple 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/divu fix: tweaks a bit the produced div, divu and break instructions.
  • 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 with armips.
    • R5900 (PS2's Emotion Engine processor) decoding support.

Non-features

In order to keep it simple and fast the following features will not be added:

  • Pseudo-instructions which expands to more than one instruction.

Installing

Python bindings

The recommended way to install is using from the PyPi release, via pip:

pip install rabbitizer

In case you want to mess with the latest development version without wanting to clone the repository, then you could use the following command:

pip install git+https://github.com/Decompollaborate/rabbitizer.git@develop

NOTE: Installing the development version is not recommended. Proceed at your own risk.

See this package at https://pypi.org/project/rabbitizer/.

Rust bindings

Add this crate to your Cargo.toml via:

[build]
rabbitizer = "1.5.8"

See this crate at https://crates.io/crates/rabbitizer.

References