[Patch] MIPS opcodes: fix transposed FS and FT in vadda and vmsuba

Project / Subsystem

binutils / binutils

Date

2026-07-25

Proposer

"Piotr P. Stefaniak" <pstef@freebsd.org>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Correcting the operand order fixes incorrect calculations but requires updating the opcode definitions.
  • Ensuring accurate instruction decoding is critical for disassemblers and emulators to correctly represent and process MIPS code.

All attributes

project
binutils
subsystem
binutils
patch_id
discussion_id
amTYLdrTAhjBPlZ3@freefall.freebsd.org
source_type
public_inbox
title
[Patch] MIPS opcodes: fix transposed FS and FT in vadda and vmsuba
headline
MIPS opcodes: fix transposed FS and FT in vadda and vmsuba
tldr
Fixes a bug in MIPS opcodes where the order of source operands FS and FT was transposed in vadda and vmsuba instructions.
proposer
"Piotr P. Stefaniak" <pstef@freebsd.org>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Correcting the operand order fixes incorrect calculations but requires updating the opcode definitions.
  • Ensuring accurate instruction decoding is critical for disassemblers and emulators to correctly represent and process MIPS code.
series_id
series_role
standalone
series_parts
[]
tags
  • binutils
  • MIPS
  • disassembler
  • opcode
  • floating point
bugzilla_url
date
2026-07-25T00:00:00.000Z

[Patch] MIPS opcodes: fix transposed FS and FT in vadda and vmsuba

A patch addresses a bug in the MIPS opcode definitions within opcodes/mips-opc.c where the source operands FS and FT were transposed in the vadda and vmsuba instructions. This transposition causes incorrect results in some cases because the PS2 multiplier is not symmetric and the order matters for the Booth recoder, leading to a one ULP difference.