Update rabbitizer integration for 2.0.0-alpha.9 (#347)

This commit is contained in:
Anghelo Carvajal
2026-07-10 01:46:05 -04:00
committed by GitHub
parent b8f401b0ba
commit 5035f8ec36
2 changed files with 11 additions and 2 deletions
+8 -1
View File
@@ -345,6 +345,13 @@
"name": "Register '$' prefix", "name": "Register '$' prefix",
"description": "Display MIPS register names with a '$' prefix." "description": "Display MIPS register names with a '$' prefix."
}, },
{
"id": "mips.prodgSnAsInvertedRegs",
"type": "boolean",
"default": false,
"name": "ProDG SN AS VU register order",
"description": "Changes the register order for specific R5900EE instructions to match the syntax used by the SN AS from ProDG (-snas flag)."
},
{ {
"id": "ppc.calculatePoolRelocations", "id": "ppc.calculatePoolRelocations",
"type": "boolean", "type": "boolean",
@@ -409,7 +416,7 @@
{ {
"id": "mips", "id": "mips",
"name": "MIPS", "name": "MIPS",
"properties": ["mips.abi", "mips.instrCategory", "mips.registerPrefix"] "properties": ["mips.abi", "mips.instrCategory", "mips.registerPrefix", "mips.prodgSnAsInvertedRegs"]
}, },
{ {
"id": "ppc", "id": "ppc",
+3 -1
View File
@@ -188,6 +188,7 @@ impl ArchMips {
rabbitizer::InstructionDisplayFlags::default() rabbitizer::InstructionDisplayFlags::default()
.with_unknown_instr_comment(false) .with_unknown_instr_comment(false)
.with_use_dollar(diff_config.mips_register_prefix) .with_use_dollar(diff_config.mips_register_prefix)
.with_r5900ee_prodg_sn_as_inverted_regs(diff_config.mips_prodg_sn_as_inverted_regs)
} }
fn parse_ins_ref( fn parse_ins_ref(
@@ -237,7 +238,8 @@ impl Arch for ArchMips {
let instruction = self.parse_ins_ref(resolved.ins_ref, resolved.code, diff_config)?; let instruction = self.parse_ins_ref(resolved.ins_ref, resolved.code, diff_config)?;
let display_flags = self.instruction_display_flags(diff_config); let display_flags = self.instruction_display_flags(diff_config);
let opcode = instruction.opcode(); let opcode = instruction.opcode();
cb(InstructionPart::opcode(opcode.name(), opcode as u16))?; let mnemonic = instruction.mnemonic_display(&display_flags).to_string();
cb(InstructionPart::opcode(mnemonic, opcode as u16))?;
push_args(&instruction, resolved.relocation, &display_flags, cb)?; push_args(&instruction, resolved.relocation, &display_flags, cb)?;
Ok(()) Ok(())
} }