#3068·capstone

Clarification on MIPS register aliases

Author: OBarronCSCreated Sep 5, 2026Updated Sep 19, 2026
LabelsenhancementMips

The MIPS general purpose registers have basic names, r0-r31, as well as aliased names, such as r5 == a1.

Additionally, based on the ABI being used, the basic register number is mapped to a different aliased name.

For example, in o32 ABI, the register r8 is t0, while for the n32/n64 ABIs, it corresponds to the aliased name a4. See the mappings here:

Image

Currently, based on my understanding of the code, Capstone always uses the o32 mapping to turn the basic register name to the aliased name.

Could this be configurable? It would be nice to be able to say "use the n64" alias names while disassembling.

Additionally, I have a question about the r30 register. It has two common aliased names, s8 or fp (regardless of the ABI. See the image above). There's a test file that indicates it maps to s8, but when running the latest version of Capstone (v6alpha10) live it shows fp.

Is this test file stale?

https://github.com/capstone-engine/capstone/blob/26d632ecf83967ad3981d65ca28f87ce0e393ec6/suite/MC/Mips/mips64-register-names-n32-n64.s.cs#L32

Additionally, could this mapping be configurable potentially? To say r30 should be displayed as either s8 or fp

Source: capstone-engine/capstone